OK, got it with the excellent help of the folks @ ITPA www.ipta.org.au . Basically the data value that I was putting in had a trailling \r\n. Finding this out was done with…
root@whisk:~# echo “$myvar” | od -a
0000000 0 . 7 8 cr nl
0000006
and:
printf "%f" "$myvar"
: invalid number.78
0.000000
This occurred because it was the last field (column) in the file, so “cut” was grabbing the carriage return as part of the last field.
I fixed it by adding an additional dummy field to the returned sql, so that instead of grabbing the last field in the data set I’m now grabbing the second last field.
So now I get:
echo “$myvar” | od -a
0000000 b nul fs 0 . 7 8 b nul gs nl
0000013
now which works OK and there’s aggregate data appearing in rrds now.
Cheers,
Chris
[HOWTO] Debug NaN's in your graphs
Moderators: Developers, Moderators
-
- Posts: 16
- Joined: Thu Feb 28, 2019 12:37 am
Re: [HOWTO] Debug NaN's in your graphs
I cannot follow these steps, they are quite difficult to me, can you guys provide me assistance?
Re: [HOWTO] Debug NaN's in your graphs
One of issues I found that was causing "nan" in place of actual data points was McAfee Endpoint Security for Linux (ENS) interfering with rrdtool. White listing spine and rrdtool, and the entire /var/lib/cacti/ directory resolved the issue.
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: [HOWTO] Debug NaN's in your graphs
McAfee, the company notorious for writing their own virus'. Research George Webb and find out. He worked for John years ago, and his team wrote viruses to keep the software company viable. Lovely how that works. It's like politics.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 1 guest