Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed May 22, 2019 5:56 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [solved] Help with home grown data source template
PostPosted: Mon Jan 07, 2019 10:58 am 
Offline
Cacti User
User avatar

Joined: Fri Feb 10, 2017 2:45 pm
Posts: 237
Location: Long Island, New York, USA
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.
Attachment:
poll1.png
poll1.png [ 141.4 KiB | Viewed 91 times ]


After that, I get Nan.
Attachment:
poll2.png
poll2.png [ 122.07 KiB | Viewed 91 times ]


Real time polling:
Attachment:
pollRT.png
pollRT.png [ 39.74 KiB | Viewed 89 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:
[[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

_________________
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.e17
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Test: Cacti 1.2.3 @ CentOS 7-6.1810.2.el7 & PHP 5.4.45-17.e17.remi
Maint @ 1.2
Monitor @ 2.3.4
Thold @ 1.0.4


Last edited by camerabob on Tue Jan 08, 2019 10:22 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Help with home grown data source template
PostPosted: Tue Jan 08, 2019 10:22 am 
Offline
Cacti User
User avatar

Joined: Fri Feb 10, 2017 2:45 pm
Posts: 237
Location: Long Island, New York, USA
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.
Attachment:
pollgood.png
pollgood.png [ 67.85 KiB | Viewed 80 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.e17
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Test: Cacti 1.2.3 @ CentOS 7-6.1810.2.el7 & PHP 5.4.45-17.e17.remi
Maint @ 1.2
Monitor @ 2.3.4
Thold @ 1.0.4


Top
 Profile  
 
 Post subject: Re: [solved] Help with home grown data source template
PostPosted: Tue Jan 08, 2019 6:52 pm 
Offline
Cacti Pro User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 753
That might be worth a bug report on GitHub. Can you log it?

_________________
Before history, there was a paradise, now dust.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group