google / cadvisor

Analyzes resource usage and performance characteristics of running containers.
Other
17.25k stars 2.33k forks source link

What are the Influxdb metrics? #2571

Open sereysethy opened 4 years ago

sereysethy commented 4 years ago

Hi, I use influxdb as storage from cadvisor, and I only see the following measurements.

Before I use prometheus to query metrics and save them to influxdb, they are quite different, the one with prometheus are more rich.

My question is that are the tables that I get in my influxdb correct?

> show measurements
name: measurements
name
----
cpu_usage_per_cpu
cpu_usage_system
cpu_usage_total
cpu_usage_user
fs_limit
fs_usage
load_average
memory_usage
memory_working_set
rx_bytes
rx_errors
tx_bytes
tx_errors

I supposed rx and tx are network receive and transmit?

dashpole commented 4 years ago

yes, they are receive and transmit. The prometheus metrics tend to be the most complete, as we generally only add metrics to the storage driver-based metrics when they are requested.

By the way, what did you use to query prometheus and send to influxdb? Were you using the prometheus server as the intermediary, or something else?

sereysethy commented 4 years ago

I have two different configurations, just for testing for now:

I use the second one because I though I would almost obtain real time data but I think there are some delay before data can be pushed to influxdb.

So the data that I can get from cadvisor are the ones that I showed in my previous post?

Do you think if I can use the web interface api, will I get almost real time data?

Please advise, I want to get the most recent stats for of docker containers as fast as I can. What is a proper way to do it?

Thanks.

Le mer. 3 juin 2020 à 22:32, David Ashpole notifications@github.com a écrit :

yes, they are receive and transmit. The prometheus metrics tend to be the most complete, as we generally only add metrics to the storage driver-based metrics when they are requested.

By the way, what did you use to query prometheus and send to influxdb? Were you using the prometheus server as the intermediary, or something else?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/cadvisor/issues/2571#issuecomment-638445774, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADDENBA5J3SFGBRNA4DVF4DRU2XNDANCNFSM4NR7TRLQ .

dashpole commented 4 years ago

cAdvisor collects metrics asynchronously, based on the --housekeeping_interval. It exports metrics based on the storage_driver_buffer_duration flag. A shorter interval will make it send more often. It looks like it is 1 minute by default.

sereysethy commented 4 years ago

I saw those options too but I only modified the storage_driver_buffer_duration and I didn’t see any noticeable change. I will test them both together.

Is there a way to tell cadvisor to only monitor a particular container?

Le mer. 3 juin 2020 à 23:37, David Ashpole notifications@github.com a écrit :

cAdvisor collects metrics asynchronously, based on the --housekeeping_interval. It exports metrics based on the storage_driver_buffer_duration flag. A shorter interval will make it send more often.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/cadvisor/issues/2571#issuecomment-638475409, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADDENBHPK36ESA4WMBNXAGTRU27C7ANCNFSM4NR7TRLQ .

dashpole commented 4 years ago

Also, what is your definition of "almost real time" 1 second, 10 seconds, 1 minute?

dashpole commented 4 years ago

There isn't a way to monitor only one container

sereysethy commented 4 years ago

Yes almost a second or less than a second.

Le mer. 3 juin 2020 à 23:53, David Ashpole notifications@github.com a écrit :

There isn't a way to monitor only one container

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/cadvisor/issues/2571#issuecomment-638481356, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADDENBFBUGBNCTHBT6DQB23RU3A5TANCNFSM4NR7TRLQ .