EDIT: Advanced Ping Template Version 1.3 for Cacti 0.8.6g

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

Moderators: Moderators, Developers

Post Reply
Author
Message
tsnww
Posts: 17
Joined: Wed Mar 15, 2006 8:59 am

#181 Post by tsnww » Wed Jul 12, 2006 2:30 pm

[[email protected] scripts]# php ss_fping.php www.google.com 20 ICMP

min:14.9500 avg:15.0125 max:15.3500 dev:0.1000 loss:0.0000

Can you get this to work?

make sure you are root, and try it.

abadaba
Cacti User
Posts: 52
Joined: Wed Nov 23, 2005 10:43 pm

#182 Post by abadaba » Wed Jul 12, 2006 4:19 pm

It works all day as root...But if i try running it as any other in the CLI...i get permission errors...
| Cacti 0.8.6h | MySQL 5.0.22 | PHP 5.1.2
|Apache2.20 | RRDtool 1.2.13 | CentOS 4.3 | P4 3200Mhz | 2.5GB |

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

#183 Post by TheWitness » Wed Jul 12, 2006 11:02 pm

In Unix/Linux, you must be root to generate ICMP packets. It's a long story, but I did place an experimental change in lib/ping.php to allow ping to run if you set php to have as root privileges and have to POSIX PHP module loaded in that version of PHP. You should give it a test, but I would make sure that copy of PHP is not used for your web server, only the poller.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

pikes
Posts: 12
Joined: Fri Jun 30, 2006 2:14 pm

Re: no reply

#184 Post by pikes » Wed Jul 19, 2006 8:23 am

CoolTom wrote:everything is ok, but when is the destination down (no ping reply) i didnt get RED color like 100% packet loss but this "WHITE HOLE". Where is problem? Or its correct? May be its when ping get answer:

Reply from xx.xx.xx.85: Destination host unreachable.

thnx for help or answ :-) Tom

--
end where is green staff at AVG LATENCY 0:-)
TheWitness: could you fix this bug? I have a threshold set up to send notification if packet loss goes over a certain amount but it's not going to throw a notification if there's 100% packet loss becuase it simply won't show any loss :/

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

#185 Post by TheWitness » Wed Jul 19, 2006 9:14 am

The intent was to fix this in 0.9. But being that it's delayed, I will see what I can do.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

stlaw
Posts: 4
Joined: Fri Jul 28, 2006 7:00 am

#186 Post by stlaw » Fri Jul 28, 2006 7:05 am

I cant get info detecting UDP port.

[[email protected] cacti]# php ./scripts/ss_fping.php 127.0.0.1 20 UDP 161
loss:100.00

but TCP is right.
[[email protected] cacti]# php ./scripts/ss_fping.php 127.0.0.1 20 TCP 199
min:0.0800 avg:0.5645 max:3.1300 dev:0.6705 loss:0.0000

anyone knows why?

thanks

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

#187 Post by TheWitness » Fri Jul 28, 2006 12:59 pm

Well, first of all SNMP is connectionless. So there is no guarentee that a UDP ping will generate a reponse. This is especially true with SNMP because it is designed not to respond unless thier is a request with a valid community string.

You are better off performing a UDP ping with an unknown port. That will generate a ICMP response of "port not found". This is only true if your routers are configured to allow this return ICMP traffic to travel the WAN of course.

TheWitness
Last edited by TheWitness on Mon Jul 31, 2006 5:30 am, edited 1 time in total.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

stlaw
Posts: 4
Joined: Fri Jul 28, 2006 7:00 am

#188 Post by stlaw » Mon Jul 31, 2006 12:20 am

i see, thanks, Witness, I'd confused UDP with TCP.

pikes
Posts: 12
Joined: Fri Jun 30, 2006 2:14 pm

#189 Post by pikes » Mon Jul 31, 2006 9:04 am

TheWitness wrote:The intent was to fix this in 0.9. But being that it's delayed, I will see what I can do.

TheWitness
Thanks! In the meantime, is there any way to set up a threshold that will trigger when there's 100% packet loss? I don't know how I could say "when average ping goes below %nan" or if there's an alternative.

enliang
Posts: 4
Joined: Wed Aug 02, 2006 5:46 am

#190 Post by enliang » Wed Aug 02, 2006 5:50 am

can i user this template to monitor a host without setting up snmp function?

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

#191 Post by TheWitness » Wed Aug 02, 2006 6:00 am

Simply leave the community string blank.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

enliang
Posts: 4
Joined: Wed Aug 02, 2006 5:46 am

#192 Post by enliang » Wed Aug 02, 2006 6:07 am

TheWitness wrote:Simply leave the community string blank.
yes, i have tried, but no picture appeared.

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

#193 Post by TheWitness » Wed Aug 02, 2006 4:53 pm

What is in the Cacti log? Can you post the graphic?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

jolramospr
Posts: 32
Joined: Mon Aug 07, 2006 2:32 pm
Location: PR
Contact:

NEW Advanced Ping Template Version 1.3 for Cacti 0.8.6g

#194 Post by jolramospr » Mon Aug 07, 2006 5:35 pm

I have installed the Advanced Ping Template on Cacti EZ, I test the script and it is working but the graphs shows 100% packet loss.

Any Idea???

[[email protected] AdvancedPing]# php /var/www/html/scripts/ss_fping.php 192.168.28.253 20 ICMP
Content-type: text/html
X-Powered-By: PHP/4.3.9

min:11.1000 avg:13.6755 max:32.6200 dev:5.9406 loss:0.0000

Allen K
Posts: 22
Joined: Sat Oct 15, 2005 9:34 pm

question

#195 Post by Allen K » Mon Aug 21, 2006 5:12 pm

everything is ok, but when is the destination down (no ping reply) i didnt get RED color like 100% packet loss but this "WHITE HOLE". Where is problem? Or its correct? May be its when ping get answer:
I'm curious if there is a patch that I can apply to any of the scripts? I'm currently in the same situation where a failed link will not show 100% loss.

Thanks!!

Post Reply