zottelbeyer / QNAP-collectdinfluxdbgrafana

A simple to use Grafana Dashboard for your QNAP NAS
66 stars 6 forks source link

collectd config not working properly on collectd 5.9.0 #7

Closed wojtekrogala closed 2 years ago

wojtekrogala commented 3 years ago

Hello,

I was migrating config to new server. On old one I have collectd v 5.7.2 while on new one it's 5.9.0. Not all data is pooled, and some of the pooled is inproper (uptime for example) I think it's a matter of collectd config.

Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "network" successfully loaded. Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "disk" successfully loaded. Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "df" successfully loaded. Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "interface" successfully loaded. Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "users" successfully loaded. Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "cpu" successfully loaded. Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "load" successfully loaded. Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "memory" successfully loaded. Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "swap" successfully loaded. Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "uptime" successfully loaded. Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "processes" successfully loaded. Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "exec" successfully loaded. Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "snmp" successfully loaded. Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_cpu_temp: Option Instance' is deprecated, please use optionTypeInstance'. Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_system_temp: Option Instance' is deprecated, please use optionTypeInstance'. Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_hdd_temp: Option InstancePrefix' is deprecated, please use optionTypeInstancePrefix'. Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_hdd_temp: Option Instance' is deprecated, please use optionTypeInstanceOID'. Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_fan_rpm: Option InstancePrefix' is deprecated, please use optionTypeInstancePrefix'. Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_fan_rpm: Option Instance' is deprecated, please use optionTypeInstanceOID'. Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_cache_read_hitrate: Option Instance' is deprecated, please use optionTypeInstance'. Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_cache_write_hitrate: Option Instance' is deprecated, please use optionTypeInstance'. Nov 2 13:20:45 ubuntu-serv collectd[5510]: Systemd detected, trying to signal readiness. Nov 2 13:20:45 ubuntu-serv systemd[1]: Started Statistics collection and monitoring daemon. Nov 2 13:20:45 ubuntu-serv collectd[5510]: Initialization complete, entering read-loop.

image

image

wojtekrogala commented 3 years ago

Collectd pooled snmp data from local host, instead of qnap, regardless of IP configured under snmp plugin.

zottelbeyer commented 3 years ago

sorry I didn't see this before. Uptime and a number of other metrics are not collected from SNMP source but from the machine running the collectd instance. So while running influxdb and grafana on another machine works just fine, collectd has to run on the NAS itself.

If you want to move collectd of the machine you would have to look at the MIB to port all metrics to SNMP and adjust the dashboard accordingly. I just never found the time.

As for the SNMP Plugin syntax being deprecated I will look into that.

wojtekrogala commented 3 years ago

No worries, thanks for time to look on that anyway. Yeah, after couple of hours I figured it out that there is a valid reason to run it on NAS itself :) And I've spend another couple of hours to figure out SNMP MIBs already, but they are really limited, and some data is passed as string (total/free memory) and not as int or other value witch would be easier for someone with my database query skills to play.

When it comes to SNMP Plugin syntax, it's easy, just follow instruction provided by plugin itself like : "Option Instance' is deprecated, please use option TypeInstance'. "

Again thanks for your time and kudos for awesome job with dashboard!

zottelbeyer commented 3 years ago

You're welcome. The Syntax change is not yet documented on the collectd wiki and I'm not sure it's backwards-compatible so that's why I will need to look into it.

From the look of your screenshot you're using an older version of the dashboard. Check out the updated screenshot and decide for yourself if you want to switch to what I found to be a more useful composition.

zottelbeyer commented 2 years ago

The latest collectd sample.config fixes this.