EDIT: Advanced Ping Template Version 1.3 for Cacti 0.8.6g

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

Moderators: Developers, Moderators

Post Reply
bltst2
Posts: 4
Joined: Tue Sep 12, 2006 3:54 pm

Still having problems...

Post by bltst2 »

I'm still having this issue, no solution has been found yet. I'd appreciate some help...

Graph is being created, but is empty of data. Any ideas?

[root@linux scripts]# php ss_fping.php 4.2.2.1 ICMP
PHP Fatal error: Class 'Net_Ping' not found in /var/lib/cacti/scripts/ss_fping.php on line 25
[root@linux scripts]# pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.1 stable
Console_Getopt 1.2 stable
Math_Stats 0.8.5 stable
Net_Ping 2.4.1 stable
PEAR 1.4.11 stable
XML_RPC 1.5.0 stable



It seems to be pulling data:
here is the Data Source Debug:
Data Source Debug

/usr/bin/rrdtool create \
/usr/share/cacti/rra/gte_dns_server_loss_40.rrd \
--step 300 \
DS:min:GAUGE:450:0:500 \
DS:dev:GAUGE:450:0:500 \
DS:max:GAUGE:450:0:500 \
DS:avg:GAUGE:450:0:500 \
DS:loss:GAUGE:450:0:100 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \
rr
Posts: 19
Joined: Fri Oct 06, 2006 9:17 am

I do not want to run the poller as root

Post by rr »

I do not want to run the poller as root just for ss_fping. Should I
put a setuid C wrapper which calls execve() for php? This
is suggested for perl scripts.

Also, I have a fping binary installed. How can I get it to work with
this template instead of the php version?

Does ss_fping.php ping hosts in parallell to save time?

It would be nice if there was some permanent url to the latest
version of this template/scripts so you do not have to search many forum posts and still not knowing if you have the latest version.

And also it would be nice if the script was distributed as a unified diff (unix diff command) instead of new files.
airwalk
Cacti User
Posts: 103
Joined: Fri Aug 18, 2006 11:22 am
Location: MSK, RU

Post by airwalk »

After upgrading from 0.8.6h to 0.8.6i all existing graphs show the following. Manual run of ss_fping returns "loss: 100".

Where to dig? Thanks in advance.
Attachments
untitled.png
untitled.png (23.78 KiB) Viewed 10709 times
ss_fping.PNG
ss_fping.PNG (2.31 KiB) Viewed 10709 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The parameters for the fping script are wrong. It should read "20 TCP" where you find "TCP" only. The number reflects the number of tests to run. Please visit the Data Sources and add the number
Reinhard
airwalk
Cacti User
Posts: 103
Joined: Fri Aug 18, 2006 11:22 am
Location: MSK, RU

Post by airwalk »

Sorry, I've used wrong parameters for command line in screenshot. Now I attach the right one. As you see if I run ss_fping from command line everything is OK. The problem started after I upgraded from 0.8.6h to 0.8.i. Moreover this problem persists only on a number of hosts, not all while all have absolutely equal settings.
Attachments
cmd.PNG
cmd.PNG (3.13 KiB) Viewed 10649 times
data.source.PNG
data.source.PNG (7.25 KiB) Viewed 10649 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please select a failing host and verify, that _this_ data sources has the "numbers of times to ping the host" set properly. But first, you may want to "php rebuild_poller_cache.php" to make sure that all is up to date. Afterwards, please check "Utilities -> Poller Cache" and search for your host to verify, that the settings are seen by the poller
Reinhard
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

just wanted to clarify, this works for windows cacti install?

EDIT: it works for windows thanks :)
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

is there a way to make advance ping poll every minute and not every five minutes like cacti? thanks
pikes
Posts: 12
Joined: Fri Jun 30, 2006 2:14 pm

Post by pikes »

flipflap wrote:is there a way to make advance ping poll every minute and not every five minutes like cacti? thanks
Doesn't the newest version of cacti (0.8.6i) allow you to change the polling to one minute?

Also, for anyone concerned, I may have solved the problem with advanced ping not returning a value when a device is down. I went into cacti's polling options and changed down host detection to "SNMP - Reliable" and also changed the ping type from UDP to ICMP. I have a threshold set up that sends an email when packet loss > 1. When a device would go into a "downed" state, first it will send me an email saying that it went above the threshold of 1 to 88.6667. The next poll will say it "restored to normal threshold with value " (not giving a value). At least it sends one email saying it is down...
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Pikes,

This is an integration issue. There are many changes that I had planned for 0.9 and this is one of them. I have been finding it difficult to focus on 0.9. I spend too much time on the forums and writing excellent plug-ins.

TheWitness
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?
konan
Posts: 3
Joined: Thu Nov 02, 2006 1:36 am

Post by konan »

TheWitness wrote:I think maybe the lack of black bar could be the lack/number of successful ping results. You could add some delay using the usleep(xxx) function in ss_fping.php between ping attempts, where xxx are microseconds.

TheWitness
Where exactly in ss_fping.php should I put usleep(xxx) function, to get higher timeout?


Thanx for help!
konan
Posts: 3
Joined: Thu Nov 02, 2006 1:36 am

Advanced Ping rrdtool

Post by konan »

When my host goes down, cacti stops makeing graf for advanced ping. But when host comes back up, cacti have to execute 2 pooler-s, before graf continue to render again.

What could cause the problem?
pikes
Posts: 12
Joined: Fri Jun 30, 2006 2:14 pm

Post by pikes »

TheWitness wrote:
writing excellent plug-ins.
Tooting your own horn a bit? :D Just kidding, keep up the good work!
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

pikes wrote:
flipflap wrote:is there a way to make advance ping poll every minute and not every five minutes like cacti? thanks
Doesn't the newest version of cacti (0.8.6i) allow you to change the polling to one minute?
where in "i" variant do you change the polling interval to 1 minute? thanks
leo2016
Posts: 2
Joined: Tue May 02, 2006 4:03 am

Post by leo2016 »

some bady help me
i use ss_fping.php ping www.google.com.tw
why ss_fping.php use php_sockets.dll ><

Code: Select all

localhost ~ # php /var/www/localhost/htdocs/cacti/scripts/ss_fping.php www.google.com.tw 20 ICMP
PHP Warning:  Unknown(): Unable to load dynamic library '/usr/lib/php4/lib/php/extensions/no-debug-non-zts-20020429/php_sockets.dll' - /usr/lib/php4/lib/php/extensions/no-debug-non-zts-20020429/php_sockets.dll: cannot open shared object file: No such file or directory in Unknown on line 0

Fatal error: Call to undefined function:  socket_create() in /var/www/localhost/htdocs/cacti/lib/ping.php on line 117
localhost ~ #

Kernel Version 2.6.17-gentoo-r8 (SMP)
Distro Name Gentoo Base System version 1.12.5
Processors 2
Model Intel(R) Xeon(TM) CPU 3.00GHz
CPU Speed 3 GHz
Cache Size 2048 KB
System Bogomips 12024.04
PCI Devices 00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE
00:0f.0 VGA compatible controller: VMware Inc [VMware SVGA II] PCI Display Adapter
00:10.0 SCSI storage controller: BusLogic BT-946C
00:11.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
IDE Devices hdc: VMware Virtual IDE CDROM Drive
SCSI Devices VMware, VMware Virtual S (Direct-Access)

Php Versionphp-4.4.4-r6
Cacti Version 0.8.6h
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests