[solved] Help with home grown data source template

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
camerabob
Cacti User
Posts: 275
Joined: Fri Feb 10, 2017 2:45 pm
Location: Long Island, New York, USA
Contact:

[solved] Help with home grown data source template

#1 Post by camerabob » Mon Jan 07, 2019 10:58 am

I have been pulling my hair out for months on this and I'm finally giving in to the masses for aid. I created a custom data template to try to get a bit more data from a PING only template. I have written the PERL script and it works fine from the command line and from the real time poller in the graph tab. When it comes to the CRON, the very first poll pulls good data.
poll1.png
poll1.png (141.4 KiB) Viewed 148 times
After that, I get Nan.
poll2.png
poll2.png (122.07 KiB) Viewed 148 times
Real time polling:
pollRT.png
pollRT.png (39.74 KiB) Viewed 146 times
The file permissions are all good. I have checked them over and over again. The script successfully writes to an offline debug file, so I know it executes and provides valid data. I'm stumped here... Anyone?

Much appreciated in advance

Bob

Sample output below:

Code: Select all

[[email protected] scripts]# perl icmp_statistics.pl 8.8.8.8 19
icmpAverage:6.36 icmpPacketLoss:0 icmpPingMin:5.54 icmpPingMax:7.61
[[email protected] scripts]# cat /tmp/icmp_statistics.txt


Round trip values    = 5.54 5.56 5.57 5.59 5.61 5.64 5.67 5.79 5.83 5.85 6.53 6.60 6.62 7.16 7.22 7.32 7.51 7.53 7.61
Total Count          = 19
Total Value          = 120.75
Average              = 6.36

INPUT:
ARGV[0](hostname)    = 8.8.8.8
ARGV[1](count)       = 19

OUTPUT:
ICMP ave. round trip = 6.36
ICMP % packet loss   = 0
ICMP ping min        = 5.54
ICMP ping max        = 7.61
Last edited by camerabob on Tue Jan 08, 2019 10:22 am, edited 1 time in total.
See the Cacti 1.x templates I use at: http://www.camerabob.com/cacti

Live: Cacti 1.2.3 @ CentOS 7-6.1810.2.el7 & PHP 5.4.16-46.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Test: Cacti 1.2.4 @ CentOS 7-6.1810.2.el7 & PHP 5.4.16-46.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

User avatar
camerabob
Cacti User
Posts: 275
Joined: Fri Feb 10, 2017 2:45 pm
Location: Long Island, New York, USA
Contact:

Re: Help with home grown data source template

#2 Post by camerabob » Tue Jan 08, 2019 10:22 am

This has been solved. Sometime during an upgrade, all of the profiles had been renamed to "Upgrade Profile 1". I had been picking that profile arbitrarily thinking that it was unique. After discovering this and naming the profiles adequately (1 minute polling..., 5 minute polling..., etc.) I now see good data in my graphs. The funny thing is during the overnight, real time graphing stopped working. I'll deal with that should it become necessary.
pollgood.png
pollgood.png (67.85 KiB) Viewed 137 times
See the Cacti 1.x templates I use at: http://www.camerabob.com/cacti

Live: Cacti 1.2.3 @ CentOS 7-6.1810.2.el7 & PHP 5.4.16-46.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Test: Cacti 1.2.4 @ CentOS 7-6.1810.2.el7 & PHP 5.4.16-46.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

User avatar
Osiris
Cacti Pro User
Posts: 835
Joined: Mon Jan 05, 2015 10:10 am

Re: [solved] Help with home grown data source template

#3 Post by Osiris » Tue Jan 08, 2019 6:52 pm

That might be worth a bug report on GitHub. Can you log it?
Before history, there was a paradise, now dust.

Post Reply