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
The00Dustin
Posts: 24
Joined: Thu Jan 05, 2006 5:52 pm

Post by The00Dustin »

Hey all, here's my output:

Code: Select all

[12:31:45] admin - /usr/local/cacti> sudo php script_server.php
Password:
PHP Script Server has Started - Parent is cmd
/usr/bin/php /usr/local/cacti/scripts/ss_fping.php ss_fping (server) 20 ICMP
PHP Warning:  Unexpected character in input:  '' (ASCII=15) state=1 in /usr/bin/php on line 3796
PHP Warning:  Unexpected character in input:  '' (ASCII=15) state=1 in /usr/bin/php on line 3796
PHP Parse error:  parse error, unexpected T_STRING in /usr/bin/php on line 3796
Content-type: text/html
X-Powered-By: PHP/4.3.9
Any suggestions? TIA
KaiB
Posts: 14
Joined: Sun Mar 19, 2006 11:04 am
Location: Norway

Post by KaiB »

Managed to sort my problem out.

Found out I had to explicitly state the path to php.exe

I changed this:
php <path_cacti>/scripts/ss_fping.php <hostname> <attempts> <protocol> <port>

Into this.
c:/php/php.exe <path_cacti>/scripts/ss_fping.php <hostname> <attempts> <protocol> <port>

And now it works excellent with cactid. :D
Regards
User avatar
chercen
Posts: 41
Joined: Sun Apr 09, 2006 4:16 pm
Location: Spain

Post by chercen »

Hello,

I would like to try the "Advanced ping", but I am running cacti on RHEL3 and this distro offers only php 4 packages. I have found some php5 rpms for RHEL3 compiled from CentOS SRPMS, but I am not sure if this will affect stability of our server...

I suppose the new version of "Advanced ping" is quite better, so I would like to try it (old one did support php 4...). Do you know if there is any way to workaround this? Any "Advanced Ping 1.3" for php 4 with the updates you have made to the new one?

Regards,

Cesar


TheWitness wrote:Hello,

I have made some additional speedups as well as support for IPv6 in ping.php. Please keep in mind that you must have PHP 5.x or better.

Also, please note, that I have moved to the dark side (Linux) as of yesterday and saw some nasty things relative to DNS caching. Therefore, I made some additional changes to speed that stuff up.

I think you will like these enhancements.

Regards,

TheWitness
claranet
Posts: 9
Joined: Wed May 10, 2006 3:09 am

Still problems with U return !!

Post by claranet »

Hi all,

I have still problems with this template.

Versions:

Code: Select all

ii  cacti            0.8.6h-3
ii  cacti-cactid     0.8.6g-2+b1
ii  rrdtool          1.2.11-0.5
ii  php-net-socket   1.0.6-2
ii  php4             v 4.4.2-1
ii  php4-common      4.4.2-1+b1
ii  php4-mysql       4.4.2-1+b1
ii  php4-snmp        4.4.2-1+b1
ii  php5-common      5.1.2-1+b1
The OS is debian testing (etch).

I have also installed the last versions of ping.php, ss_fping.php and the xml template (v 1.3).

In manual mode all is ok:

Code: Select all

gauss:/usr/share/cacti/site# php script_server.php
PHP Script Server has Started - Parent is cmd
/usr/share/cacti/site/scripts/ss_fping.php ss_fping 80.48.53.32 20


min:0.4700 avg:0.5365 max:0.9800 dev:0.1216 loss:0.0000
/usr/share/cacti/site/scripts/ss_fping.php ss_fping www.google.es 20
min:25.3100 avg:25.5655 max:25.9400 dev:0.1961 loss:0.0000
/usr/share/cacti/site/scripts/ss_fping.php ss_fping 80.48.53.32 20
min:0.4500 avg:0.5690 max:0.9800 dev:0.1656 loss:0.0000
quit
PHP Script Server Shutdown request received, exiting
And the poller is cmd.php.

But, the graph is not painted (always NaN) and the return of the cacti.log is:

Code: Select all

05/11/2006 08:44:02 AM - CMDPHP: Poller[0] Host[4] DS[141] WARNING: Result from SERVER not valid.  Partial Result:
05/11/2006 08:44:02 AM - CMDPHP: Poller[0] Host[4] DS[141] SERVER: /usr/share/cacti/site/scripts/ss_fping.php ss_fping 80.48.53.32 20 ICMP, output: U
05/11/2006 08:44:03 AM - CMDPHP: Poller[0] Host[9] DS[142] WARNING: Result from SERVER not valid.  Partial Result:
05/11/2006 08:44:03 AM - CMDPHP: Poller[0] Host[9] DS[142] SERVER: /usr/share/cacti/site/scripts/ss_fping.php ss_fping www.google.es 20 ICMP, output: U
Olny when I make Advanced Pings to TCP 80 is ok:

Code: Select all

05/11/2006 08:50:03 AM - CMDPHP: Poller[0] Host[9] DS[142] SERVER: /usr/share/cacti/site/scripts/ss_fping.php ss_fping www.google.es 20 ICMP, output: U
05/11/2006 08:50:03 AM - CMDPHP: Poller[0] Host[10] DS[143] SERVER: /usr/share/cacti/site/scripts/ss_fping.php ss_fping www.google.com 20 TCP 80, output: min:0.5200 avg:0.8650 max:1.4500 dev:0.3385 loss:0.0000
But I need to do ICMP pings.

I've change the user to the poller, but nothing solved:

Code: Select all

gauss:/usr/share/cacti/site# cat /etc/cron.d/cacti
MAILTO=root
*/1 * * * * root /usr/share/cacti/site/poller.php >/dev/null 2>/var/log/cacti/poller-error.log
Only works a litle bit when I change the poller from cmd.php to cactid, but if I do that, the perl scripts for localhost doesn't work:

Code: Select all

gauss:/usr/share/cacti/site# php poller.php
CACTID: Host[1] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/site/scripts/linux_memory.pl MemFree:'
CACTID: Host[1] DS[3] WARNING: Result from SCRIPT not valid. Partial Result: ...
I've said a litle bit, because the ICMP pings to the router (the IP), still doesn't work:

Code: Select all

05/11/2006 08:59:02 AM - CACTID: Poller[0] Host[4] DS[141] SS[0] SERVER: /usr/share/cacti/site/scripts/ss_fping.php ss_fping 80.48.53.32 20 ICMP, output: U
05/11/2006 08:59:03 AM - CACTID: Poller[0] Host[9] DS[142] SS[0] SERVER: /usr/share/cacti/site/scripts/ss_fping.php ss_fping www.google.es 20 ICMP, output: min:0.5200 avg:0.7065 max:2.2000 dev:0.3622 loss:0.0000
05/11/2006 08:59:03 AM - CACTID: Poller[0] Host[10] DS[143] SS[0] SERVER: /usr/share/cacti/site/scripts/ss_fping.php ss_fping www.google.com 20 TCP 80, output: min:25.3900 avg:25.7840 max:26.2300 dev:0.2357 loss:0.0000

Any idea to fix one thing or the other, in cmd.php or in cactid, and achive the ICMP pings to 80.48.53.32?

Sorry for the extension, but I am desperate :cry: ...
ste81
Posts: 8
Joined: Fri Apr 21, 2006 9:23 am
Location: Milan, Italy
Contact:

Remote smokeping?

Post by ste81 »

Ok, smokeping is very very great and usefull, but for example: I need to trace smokeping not from cacti server to another host, but throught two different host.

How can be deployed? It's possibile?


Thanks
Ste
Ste
http://www.stefanocislaghi.it/
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Cisco SAA stats. You can utilize the smokeping like graphs for it's statistics.

TheWitness

Here are some relevant posts. It works best as a data query for pre-defined SAA probes, but bulek has a point.

http://forums.cacti.net/viewtopic.php?t ... hlight=saa
http://forums.cacti.net/viewtopic.php?t=2807
http://forums.cacti.net/viewtopic.php?t ... hlight=saa
http://forums.cacti.net/viewtopic.php?t ... hlight=saa
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?
iep
Posts: 2
Joined: Mon Apr 04, 2005 4:01 am

Post by iep »

I'm experiencing one little problem with this template.

I would like to just do a smokeping to an external host. So I added this host to my devices.
Since this device is not mine and thus not responding to snmp packets, I get an SNMP error, and this host gets marked as down within cacti.

Now when this happens I do not get any graphs for my ping, because the ping does not get executed since the host seems down for snmp.

Can this be fixed in any way ?

Thx
IEP
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

claranet,

To run the ICMP version fo the advanced ping template in *nix, you need to either set PHP as an "asroot" permissable application, or run the poller as root.

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?
qwertz
Cacti User
Posts: 98
Joined: Thu Feb 16, 2006 9:20 am

Post by qwertz »

Hello,

I tried to monitor cisco with this beautiful template but i have often holes in the graph. Do you know why?

Thanks

Qwertz
Attachments
cisco.jpg
cisco.jpg (41.71 KiB) Viewed 9653 times
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

1) Server duplex mismatch
2) Ping timeout set too low.

For item 2) see Settings->Poller for more information.

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?
claranet
Posts: 9
Joined: Wed May 10, 2006 3:09 am

Post by claranet »

Hi WitNess,

I do execute poller as root:

Code: Select all

gauss:/usr/share/cacti/site# cat /etc/cron.d/cacti
MAILTO=root
*/1 * * * * root /usr/share/cacti/site/poller.php >/dev/null 2>/var/log/cacti/poller-error.log
But nothing
qwertz
Cacti User
Posts: 98
Joined: Thu Feb 16, 2006 9:20 am

Post by qwertz »

Thanks Witness

Below is my poller settings.


Do you thing i should change something

Thanks
Qwertz
Attachments
poller.JPG
poller.JPG (123.78 KiB) Viewed 9589 times
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

It all looks good to me. Don't know what's going on.

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?
qwertz
Cacti User
Posts: 98
Joined: Thu Feb 16, 2006 9:20 am

Post by qwertz »

It seems to be because of my Netscreen NS 500 FireWall because the script are working fine without going trough it. I jhave to notice that i have a problem with a another perl script (weathermap) where the TCP connection stay ESTABLISHED and never close. this causes the processes to increase without limit ... until the crash
For me it must me a "problem" with the FireWall Netcreen NS-500

Thanks
Qwertz
User avatar
deneken01
Posts: 20
Joined: Tue Nov 26, 2002 4:07 am
Location: Netherlands
Contact:

Post by deneken01 »

Hello,

When using this script I get a strange output;

On my localhost the script works without a problem, but when I am using this script on a Cisco router the graph is not being updated. From the cli I can see that the script is working fine, also in the log file the script works fine,

I am using the latest version of CactiEZ.
Could any one tell me what is going on, or help me to solve this.

Thanks in advanced.
Lucas Deneken
Attachments
Smoking ping on remote router
Smoking ping on remote router
smokingping-BE.jpg (33.57 KiB) Viewed 9321 times
Smoking ping on localhost
Smoking ping on localhost
smokingping-localhost.jpg (33.28 KiB) Viewed 9321 times
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests