nicolargo / glances

Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
http://nicolargo.github.io/glances/
Other
26.27k stars 1.49k forks source link

Glances(Docker) - Grafana missing some info #1427

Open saitoh183 opened 5 years ago

saitoh183 commented 5 years ago

Before filling this issue, please read the manual (https://glances.readthedocs.io/en/latest/) and search if the bug do not already exists in the database (https://github.com/nicolargo/glances/issues).

Description

I setup glance in docker and it seems that not all the info is showing up in Grafana. I dont know where to look to fix it. in Grafana, the Host, interface and disk are empty. Container only has "All" as option.

image

image

[influxdb]
# Configuration for the --export influxdb option
# https://influxdb.com/
host=172.20.0.17
port=8086
user=influx
password=influx
db=glances

For an enhancement or new feature: Describe your needs.

Versions

Docker version tag:latest host: ubuntu 18.04.1

Logs

the log has this line in repetition: ERROR -- Cannot export localhost.gpu stats to InfluxDB (400: {"error":"unable to parse 'localhost.gpu ': invalid field format"}

But this is because im on a ovh dedi server

saitoh183 commented 5 years ago

It seems to have started working on its own except for the disk information which is what i need the most

saitoh183 commented 5 years ago

Ok still dont understand how this works. No matter what disk i choose, no info changes. If i change the query to SELECT mean("/etc/hostname.percent") FROM "localhost.fs" WHERE $timeFilter GROUP BY time($__interval) I get the disk info of the host that i want...but what about the others? image

nicolargo commented 5 years ago

I will have a look on my side.

123dev commented 4 years ago

@saitoh183 Re: Host, interface and disk being empty Those are grafana dashboard variables. While in Dashboard click on the gear and the select variables.

If your influxdb name is glances (lowercase) and it's being populated properly then the default variables should work, otherwise adjust the db name accordingly.

Another thing you have to make sure is to set prefix=localhost in glances.conf for influxdb, that is because the dashboard is hardcoded to look for localhost, so the host value is really useless in the dropdown variable, unless you adjust every metric to use $host variable instead of localhost.

TheDK commented 3 years ago

@123dev I have the same problem and can't figure it out. This manual query works: SELECT mean("rx") AS "mean_rx" FROM "glances"."autogen"."localhost.network"

This in the "old" dashboard json from the Grafana webpage shows same behaviour as above: SELECT mean("$interface.rx")/mean("$interface.time_since_update")*8 FROM "localhost.network"

I can only select localhost, rest does not populate.

The newer json found here only shows me the grafana docker as host (I am using Home Assistant OS) and no data at all.

Can you point me in the right direction?

rickarddahlstrand commented 2 months ago

My InfluxDB is missing a lot of data as well. Is there any way to obtain detailed logs for debugging?

RazCrimson commented 2 months ago

@rickarddahlstrand Please checkout https://glances.readthedocs.io/en/latest/config.html#logging

rickarddahlstrand commented 2 months ago

Here are some debug-output:

2024-06-30 11:06:19,614 -- DEBUG -- PluginModel glances.plugins.sensors update return [{'label': 'Composite', 'unit': 'C', 'value': 30, 'warning': 80, 'critical': 84, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Composite 1', 'unit': 'C', 'value': 27, 'warning': 80, 'critical': 84, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Core 0', 'unit': 'C', 'value': 33, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Core 12', 'unit': 'C', 'value': 30, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Core 16', 'unit': 'C', 'value': 36, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Core 20', 'unit': 'C', 'value': 28, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Core 24', 'unit': 'C', 'value': 28, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Core 25', 'unit': 'C', 'value': 28, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Core 26', 'unit': 'C', 'value': 28, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Core 27', 'unit': 'C', 'value': 28, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Core 28', 'unit': 'C', 'value': 26, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Core 29', 'unit': 'C', 'value': 26, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Core 30', 'unit': 'C', 'value': 25, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Core 31', 'unit': 'C', 'value': 25, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Core 4', 'unit': 'C', 'value': 45, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Core 8', 'unit': 'C', 'value': 42, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Package id 0', 'unit': 'C', 'value': 42, 'warning': 80, 'critical': 100, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Sensor 1', 'unit': 'C', 'value': 30, 'warning': 65261, 'critical': 65261, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Sensor 1 2', 'unit': 'C', 'value': 27, 'warning': 65261, 'critical': 65261, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Sensor 2', 'unit': 'C', 'value': 29, 'warning': 65261, 'critical': 65261, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'Sensor 2 3', 'unit': 'C', 'value': 30, 'warning': 65261, 'critical': 65261, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}, {'label': 'acpitz 0', 'unit': 'C', 'value': 27, 'warning': 105, 'critical': 105, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'}] in 0.139119 seconds

2024-06-30 11:06:22,570 -- DEBUG -- Cannot export sensors stats to InfluxDB ('SensorType.CPU_TEMP')

What could be the issue?

RazCrimson commented 2 months ago

@rickarddahlstrand What version of glances are you on?

This issue should have been fixed in 4.1.1

rickarddahlstrand commented 2 months ago

Thanks, that solved it. I was running 4.0.8. I had forgot I used pip and that apt-get upgrade didn't do anything. Thanks for the heads up.

murilopereirame commented 2 months ago

@rickarddahlstrand What version of glances are you on?

This issue should have been fixed in 4.1.1

Does the FS data is back for you? I just updated my glances instance to 4.1.1 and got the sensors back but no filesystem info yet

rickarddahlstrand commented 2 months ago

Not sure. I was at this point only focused on sensors.