Data source returns correct value, graph still Nan

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
burek123
Posts: 6
Joined: Sun May 06, 2018 4:12 pm

Data source returns correct value, graph still Nan

Post by burek123 »

- SNMP from console returns correct raw value
- Data source is added in GUI
- Data source is added to graph items
- Cacti log shows correct output value

Graph still Nan

SNMP raw value from console:

root@pihole: snmpget -c public -v 2c localhost hrSystem.8
HOST-RESOURCES-MIB::hrSystem.8 = Gauge32: 54230 (this value is divided by 1000 via CDEF function)

Data source template:
Image

Graph template:
Image

Cacti log file, output is correct:
2018/05/13 18:30:03 - POLLER: Poller[Main Poller] Device[11] Device[Pihole] Graphs[RPI CPU temperature, RPI CPU temperature] DS[Pihole - RPI CPU temperature] SNMP: v1: 192.168.0.6, dsname: rpi_temp, oid: hrSystem.8, output: 54768

Cacti graph log file:
2018/05/13 18:30:03 - POLLER: Poller[Main Poller] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/rra/pihole_temp_196.rrd --template rpi_temp 1526229003:U

Image

Any ideas how to solve this?
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Data source returns correct value, graph still Nan

Post by netniV »

Are there any values in the graph debug? If all that shows are NaN, this would suggest that the poller isn't polling for the graph.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
burek123
Posts: 6
Joined: Sun May 06, 2018 4:12 pm

Re: Data source returns correct value, graph still Nan

Post by burek123 »

Graph debug:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start='-180000' \
--end='-300' \
--pango-markup \
--title='RPI CPU temperature' \
--vertical-label='Celsius' \
--slope-mode \
--base=1000 \
--height=150 \
--width=500 \
--alt-autoscale-max \
--lower-limit='0' \
--color BACK#F3F3F3 \
--color CANVAS#FDFDFD \
--color SHADEA#CBCBCB \
--color SHADEB#999999 \
--color FONT#000000 \
--color AXIS#2C4D43 \
--color ARROW#2C4D43 \
--color FRAME#2C4D43 \
--border 1 --font TITLE:11:'Arial' \
--font AXIS:8:'Arial' \
--font LEGEND:8:'Courier' \
--font UNIT:8:'Arial' \
--font WATERMARK:6:'Arial' \
--slope-mode \
--watermark 'Generated by Cacti®' \
DEF:a='/var/www/html/rra/pihole_temp_196.rrd':'rpi_temp':AVERAGE \
CDEF:cdefa='a,1000,/' \
LINE1:cdefa#C04000FF:'Temperature' \
GPRINT:cdefa:LAST:'Current\:%8.2lf %s' \
GPRINT:cdefa:MIN:'Min\:%8.2lf %s' \
GPRINT:cdefa:MAX:'Max\:%8.2lf %s\n'
RRDtool Says:
OK

Data source info:

Image
burek123
Posts: 6
Joined: Sun May 06, 2018 4:12 pm

Re: Data source returns correct value, graph still Nan

Post by burek123 »

I have removed some other default generic SNMP queries for that host and it suddenly started to work. I still don't know what was the cause ...
User avatar
camerabob
Cacti User
Posts: 386
Joined: Fri Feb 10, 2017 2:45 pm
Location: Long Island, New York, USA
Contact:

Re: Data source returns correct value, graph still Nan

Post by camerabob »

Did you check the poller logs when the query was failing? Perhaps the timeout value was too small and Cacti stopped looking for a response before it was returned? Just throwing stuff at the wall to see what sticks.
Prod: Cacti 1.2.15 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
User avatar
brononi
Cacti User
Posts: 123
Joined: Tue Aug 29, 2006 1:58 am
Location: Belgium
Contact:

Re: Data source returns correct value, graph still Nan

Post by brononi »

Hello,

I'm getting the same issue here with a new installation.
What I've done?

- Installation of Proxmox Virtual machine (=Ubuntu 18.04 LTS)
- Installation of cacti with 'apt install cacti' (= cacti 1.1.38)
- Add the local machine (= with his own IP 192.168.111.4)
Snmp v2, gets nicely connected.
- Add it with the 'local linux Machine' Template
- Add all graphs for this one (Linux Memory Usuage, Unix Load Average, Unix Logged in Users, Unix Processes, Unix Mounted Partitions).

And only the Load Average is being filled. All other graphs stay empty. :$

I've done this installation 2 times from scratch, just to check I've something went wrong during the installation on my side...
In the first installation, I've changed some things in order to get rid of the error you can see below. But that didn't solved the 'nan-value' issue.

In the second installation, I didn't change anything on OS level or cacti. So everything is 'out of the box'...


A snmpwalk:
snmpwalk.txt
(332.18 KiB) Downloaded 94 times
An example of the views:
graphs.png
graphs.png (401.54 KiB) Viewed 2909 times
An example of the debug:
Debug_Memory.png
Debug_Memory.png (110.44 KiB) Viewed 2909 times
A screenshot of the clog:
clog.png
clog.png (459.14 KiB) Viewed 2909 times
I've also added several remote servers, and with the same result. The standard graphs like snmp interface aren't being filled in. With another cacti server in the same network, I don't have these issues... The other one is running since several months, but is on the same level of OS and cacti version. In time, I've done this installation manually.
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Data source returns correct value, graph still Nan

Post by cigamit »

The local linux machine templates don't use SNMP. You will want to use different graph templates to utilize SNMP vs the local scripts that they are running. You can also increase the logging level to see what the local scripts are doing.
User avatar
brononi
Cacti User
Posts: 123
Joined: Tue Aug 29, 2006 1:58 am
Location: Belgium
Contact:

Re: Data source returns correct value, graph still Nan

Post by brononi »

I just added an external network interface, and it seems to getting the values now...
Strange, yesterday, this resulted in all nan-values.

I'll try to add some additional once...
Attachments
remoteSnmpB.png
remoteSnmpB.png (70.12 KiB) Viewed 2904 times
remoteSnmpA.png
remoteSnmpA.png (89.53 KiB) Viewed 2904 times
  • Cacti: 0.8.8f / Plugin Architecture Version: 3.1 / Linuxbased
  • Third Party: Apache 2.4.12 / PHP 5.6.11 / NET-SNMP version 5.3.2.2 / RRDTool 1.5.4
  • Plugins: Configmanager 0.826 / Aggregate 0.70B2 / Manage 0.6.2 / Weathermap 0.97a / Thold 0.4.9 / Quicktree 0.2 / Realtime 0.5 / Settings 0.7
  • Data:Host 1341 / Graphs 6752
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Data source returns correct value, graph still Nan

Post by netniV »

Sorry, I'm not clear on whether there is still a problem or yesterday there was but today there isn't?
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
ozgurerdogan
Posts: 1
Joined: Wed May 24, 2023 2:48 pm

Re: Data source returns correct value, graph still Nan

Post by ozgurerdogan »

I am having same issue... Graphs are emtpy...
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests