New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade InfluxDB storage to InfluxDB 0.9 #1040
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
Unrelated flakes... Travis failing because of
|
99cb43b
to
46eded2
Compare
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
46eded2
to
b903b75
Compare
Shall we refactor the function of |
@carmark Unless you feel strongly about it I'd leave it as is. |
- Fix google#743 - Rewrite InfluxDB storage for new InfluxDB API data structures. - Store each measurement separately instead of storing all measurements in a single big "table" with many columns/fields. - Use tags add metadata to points, such as the container name. Tags are a new feature in InfluxDB 0.9.
b903b75
to
49ee94d
Compare
This passing tests now - would like to get this merged ASAP |
/cc @vishh |
👍 |
colContainerName string = "container_name" | ||
colCpuCumulativeUsage string = "cpu_cumulative_usage" | ||
// Cumulative CPU usage | ||
serCpuUsageTotal string = "cpu_usage_total" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use -
instead? Also why drop the cumulative
keyword?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using -
may mean users have to quote everything in their queries, otherwise might be seen as operator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cumulative
dropped to be consistent with other serCpuUsage*
vars below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. May be we can document the schema instead of including the cumulative
keyword.
IN general LGTM. We can fix those comments later. |
@jimmidyson I hope I get some time to build local and verify in case this tests pass... |
@jimmidyson Fine for me, may modify them later. |
@marcellodesales Tests pass so please try locally when you can. @vishh Happy to merge then? We can clean up anything afterwards if need be but all LGTM. |
Upgrade InfluxDB storage to InfluxDB 0.9
@jimmidyson I will try to build and verify this weekend! Thanks a lot for merging this! |
which version does contain this commit? |
@svenmueller apparently not released yet... Sorry... took me a while to try to verify this... @jimmidyson, I apparently can't get it to work yet... I just built an image at https://hub.docker.com/r/marcellodesales/google-cadvisor/, tag UPDATE: IT WORKS! How I builtCould you please verify if that's correct? I did the following (https://hub.docker.com/r/marcellodesales/google-cadvisor/)
Build InstructionsGot the code
Checked out the merge commit
Built, verified
Ran Unit test cases
Generated the new Docker Image to push to https://hub.docker.com/r/marcellodesales/google-cadvisor/.
InfluxDB setup
I created the default user I also created the default database
cAdvisor LogsSo, I tried to run locally and I still cannot see anything in InfluxDB, default parameters...
Here's the output... Is there any switch to turn on debugger around the connector?
I do see activity on the cAdvisor container through the UI, but I don't see any measurements on the influxDB side. I do see the measurements for the @jimmidyson, @carmark, @vishh, @christianhuening @carmark @mnuessler Is there anything that can help me debug this? |
I think you may be missing the |
@mnuessler I finally can confirm the PR is working as expected! Thanks a lot for spotting this mistake 👍 @jimmidyson I can finally confirm this is working for me!!! Thanks a lot! I do se the first line of the logs
Now I can see the measuremnts. |
@mnuessler Good spot! @marcellodesales Yay! Thanks for trying it out & confirming it all works as expected. |
@jimmidyson No problem!!! Any plans to release a version with this? |
Here's a influxdbData:
image: busybox
volumes:
- ./data/influxdb:/data
influxdb:
image: tutum/influxdb
environment:
- PRE_CREATE_DB=cadvisor
ports:
- "8083:8083"
- "8086:8086"
expose:
- "8090"
- "8099"
volumes_from:
- "influxdbData"
cadvisor:
image: marcellodesales/google-cadvisor:influxdb-0.9
command: -storage_driver=influxdb -storage_driver_db=cadvisor -storage_driver_host=influxsrv:8086
ports:
- "9090:8080"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
links:
- influxdb:influxsrv |
As discussed at #794 (comment), the fix is apparently only applied to tag influxdbData:
image: busybox
volumes:
- ./data/influxdb:/data
influxdb:
image: tutum/influxdb
environment:
- PRE_CREATE_DB=cadvisor
ports:
- "8083:8083"
- "8086:8086"
expose:
- "8090"
- "8099"
volumes_from:
- "influxdbData"
cadvisor:
image: google/cadvisor:v0.20.5
command: -storage_driver=influxdb -storage_driver_db=cadvisor -storage_driver_host=influxsrv:8086
ports:
- "9090:8080"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
links:
- influxdb:influxsrv This worked properly and the logs show the events being properly written.
The latest tag still results in the 404 errors.
|
This commit upgrades docker-compose with the latest cAdvisor, compatible with the latest version of InfluxDB. This was part of the google/cadvisor#1040 (comment).
Thanks a Lot @marcellodesales |
You're very welcome @nuxman! |
Supersedes #800 by adding missing godeps.
Fixes #743, #1028
/cc @marcellodesales @christianhuening @carmark @mnuessler