[solved] Help with home grown data source template

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

Moderators: Developers, Moderators

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

[solved] Help with home grown data source template

Post by camerabob »

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 609 times
After that, I get Nan.
poll2.png
poll2.png (122.07 KiB) Viewed 609 times
Real time polling:
pollRT.png
pollRT.png (39.74 KiB) Viewed 607 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

[root@CBCactiTest scripts]# perl icmp_statistics.pl 8.8.8.8 19
icmpAverage:6.36 icmpPacketLoss:0 icmpPingMin:5.54 icmpPingMax:7.61
[root@CBCactiTest 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.
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
camerabob
Cacti User
Posts: 386
Joined: Fri Feb 10, 2017 2:45 pm
Location: Long Island, New York, USA
Contact:

Re: Help with home grown data source template

Post by camerabob »

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 598 times
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
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

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

Post by Osiris »

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

Who is online

Users browsing this forum: No registered users and 1 guest