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
jdr
Posts: 42
Joined: Sun Dec 25, 2005 9:02 pm

Post by jdr »

I had the same problem on solaris9:

Code: Select all

# /usr/local/bin/php -q /var/htdocs/cacti/scripts/ss_fping.php 127.0.0.1 10 ICMP

Notice: Undefined index:  snmp_community in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 537

Notice: Undefined index:  snmp_community in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 537

Notice: Undefined index:  snmp_community in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 537

Notice: Undefined index:  snmp_community in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 537

Notice: Undefined index:  snmp_community in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 537

Notice: Undefined index:  snmp_community in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 537

Notice: Undefined index:  snmp_community in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 537

Notice: Undefined index:  snmp_community in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 537

Notice: Undefined index:  snmp_community in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 537

Notice: Undefined index:  snmp_community in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 537
min:0.0000 avg:0.0000 max:0.0000 dev:0.0000 loss:0.0000

Code: Select all

# /usr/local/bin/php --version
PHP 5.2.0 (cli) (built: Dec 21 2006 22:12:07)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
You should add snmp support to your php, then:

Code: Select all

# /usr/local/bin/php /var/htdocs/cacti/scripts/ss_fping.php 127.0.0.1 10 ICMP

Warning: socket_set_option(): unable to set socket option [99]: Option not supported by protocol in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 164

Warning: socket_set_option(): unable to set socket option [99]: Option not supported by protocol in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 164

Warning: socket_set_option(): unable to set socket option [99]: Option not supported by protocol in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 164

Warning: socket_set_option(): unable to set socket option [99]: Option not supported by protocol in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 164

Warning: socket_set_option(): unable to set socket option [99]: Option not supported by protocol in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 164

Warning: socket_set_option(): unable to set socket option [99]: Option not supported by protocol in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 164

Warning: socket_set_option(): unable to set socket option [99]: Option not supported by protocol in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 164

Warning: socket_set_option(): unable to set socket option [99]: Option not supported by protocol in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 164

Warning: socket_set_option(): unable to set socket option [99]: Option not supported by protocol in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 164

Warning: socket_set_option(): unable to set socket option [99]: Option not supported by protocol in /usr/local/apache2/htdocs/cacti/lib/ping.php on line 164
min:0.1200 avg:0.1410 max:0.3000 dev:0.0537 loss:0.0000
Maybe this is not greatest solution i've ever seen, since socket_set_option() still fails, but at least ping works.
beorn
Posts: 7
Joined: Mon Nov 13, 2006 10:50 am
Location: Muenster, Westf.

Strange Problem using this plugin

Post by beorn »

I installed this plugin as described at the start of this thread.
Pinging a host via the script works fine.

The strange thing is, that it ignores any parameters i give to it via cacti e.g. I get the following output when running a check on a host in our network:

CACTID: Poller[0] Host[0] DS[557] SCRIPT: /data/cacti.dbap.de/scripts/ss_fping.php 20 ICMP , output: U

As data source i even defined the IP address of that host and changed the number of pings that should be send, but to no avail.

What is even stranger is that i cleared (just to see what happens) the default values in the data template, still i get the same line as above...

Anybody got an idea as to what is going wrong?

Any help would be greatly appreaciated!

Have a nice weekend everybody!

I'm running cacti Version 0.8.6i on a linux box
Poller: cactid
P.S. Sorry for the multiple entries above. Message board got a hickup because of me using a backtick character. Didn't notice that the entries were made anyway...
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Hi, I thought I'd try this out today, with no luck (well it installs and I can run it from the command line, but the graph just shows 100% loss).

I'm just trying it with ICMP at the moment - as from Command line I get 100% loss with any TCP ports anyway.

Troubleshooting....

Why has the command line for the Input String got "<path_cacti>/scripts/ss_fping.php ss_fping <hostname> <attempts> <protocol> <port>"
when you run it from command line you don't use the ss_fping parameter (From something LVM mentioned). So tried it without the ss_fping parameter...

OK, so, what next?

Does Cacti have to run as root - or can Apache be put in the "root" group, BTW its the most recent install of CactiEZ.

Here is the info about my machine
Cacti Version - 0.8.6i
Plugin Architecture - 1.0
Poller Type - Cactid v0.8.6i
Server Info - Linux 2.6.9-42.0.3.EL
Web Server - Apache/2.0.52 (CentOS)
PHP - 4.3.9
PHP Extensions - yp, xml, wddx, tokenizer, sysvshm, sysvsem, standard, sockets, shmop, session, pspell, posix, pcre, overload, mime_magic, iconv, gmp, gettext, ftp, exif, dio, dbx, dba, curl, ctype, calendar, bz2, bcmath, zlib, openssl, apache2handler, gd, mysql, snmp, eAccelerator
MySQL - 4.1.20
RRDTool - 1.2.15
SNMP - 5.1.2
Plugins
  • PHP Network Weathermap (weathermap - v0.82)
    Thresholds (thold - v0.3.0)
    Device Monitoring (monitor - v0.7)
    Network Discovery (discovery - v0.7)
    Network Tools (tools - v0.2)
    Syslog Monitoring (haloe - v0.4)
    mactrack
    PHP Network Managing (manage - v0.4)
    Report Creator (reports - v0.1)
    RRD Cleaner (rrdclean - v1.1)
    Update Checker (update - v0.3)
    FlowView (flowview - v0.3)
    Host Info (hostinfo - v0.1)
    Error Images (errorimage - v0.1)
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Freddy2
Posts: 7
Joined: Tue Dec 19, 2006 5:11 pm

Number of pings

Post by Freddy2 »

TheWitness,
should I set number of pings to 40 if I use this template?

From what I see in the thread about "Smokelike ping", the lowest 2 categories of your template (1-2%, 3-5%) do not make sense using 20 pings.

On the other hand, 40 pings is somewhat too big for my environment, thus I'd prefer to stay on 20.

P.S. it runs fine!
Freddy
0.8.6.i unpatched, w2003, iis6, mysql 5, php 5.0.5, net-snmp 5.35, cygwin1.dll 1005.21.0.0
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Hayelp - can't get Advanced Ping to work...

Post by argon0 »

as above, posted most of my troubleshooting steps...

Can get it to run ss_fping ICMP from command line as root, but just get nan or 100% loss in cacti...

Adding apache user to root group makes no difference...

Doing TCP on port 23 on a router, which is being "managed" by the manage plugin (so I know Cacti can do the test on port 23)....

As I said, hayelp
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

OK, I've given in and made the cron jobs run as root, that seems to get it to work....

Although I've got a slightly odd thing happening - Cacti isn't creating the rrd file for one particular host - which I am not monitorring anything else on, but I can create other new graphs - and thus rrd files....
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

OK, one final word on this topic (I hope)...

How can you get it so that the graph automatically displays both the Protocol and the Port you are "pinging"?

I'd have thought you could do something in the Graph title along the lines of

|host_description| - Advanced Ping - |protocol|: |port|

But that doesn't seem to work.....

Maybe include it in the "Body" of the graph... Hmmm... Nope can't see how to do that...

The other thing Cacti needs (hopefully be there in .9) is the ability to create the same graph for multiple hosts....
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
echelon360
Posts: 24
Joined: Tue Mar 28, 2006 2:40 am

Loss all readings on ping

Post by echelon360 »

I'm running the advanced ping 1.3. It's been running stable for some 6 months now. For two days now, the graphs just turn up blank

what i've done
-check that the host is still responding to ping.
-i've manually run ss_fping on command prompt.

There are no issue found.

Is there more i should be doing to narrow down what's causing this?

Pls advice
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Was there any change two days ago? Some sw upgrade or the like?
Reinhard
echelon360
Posts: 24
Joined: Tue Mar 28, 2006 2:40 am

Post by echelon360 »

gandalf wrote:Was there any change two days ago? Some sw upgrade or the like?
Reinhard
no nothing like that. I dug deeper in the thraeds and ran the "rebuild_poller_cache" command. That made it come back.

Is there a reason why this is happening?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Changes e.g. to scripts will not make it automatically into the poller cache. This would require rebuild_poller_cache.php
Reinhard
CRCinAU
Posts: 4
Joined: Tue Feb 06, 2007 9:12 am

Post by CRCinAU »

I have to say, I love the graph output of Advanced Ping - it's MUCH better than the standard included ping...

What I would like to know however is that if I set 3 of these going on different hosts (by allowing the 'ip' to be set to a user entered field), the first one to be run fails (the other 2 succeed).

Does anyone have any ideas why this would be so?
rsharpe
Posts: 6
Joined: Mon Dec 12, 2005 12:38 pm

Post by rsharpe »

TheWitness wrote:I might add the packet size thingy to the next version of Cacti either the next point version or 0.9.

TheWitness
Has there been any advancement on this?

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

Post by TheWitness »

CRCinAU,

It is likely that you are getting warnings when you initialize the script server. Please use the testing procedure to eliminate ALL PHP warnings, otherwise things don't work so well.

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?
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

rsharpe,

Only that I am swamped with things to do and have not had any time for this.

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?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest