Advanced Ping Template for Cacti 0.8.6f

Addons for Cacti and discussion about those addons

Moderators: Moderators, Developers

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

Advanced Ping Template for Cacti 0.8.6f

#1 Post by TheWitness » Tue Aug 02, 2005 9:54 pm

All,

This template and associated PHP Script Server Script are identical to the thread below and should replace them automatically. However, existing Graphs and Data Sources may be impacted negatively.

http://forums.cacti.net/viewtopic.php?t=8503

If you are not using the SmokePing Like, then you should not have any issues with this new template. Thanks goes to Drose12 for developing the original.

Please note that on unix systems that are not running the poller process as root, cacti will attempt to utilize UDP pinging. I suggest that the poller process runs as root to reduce issues.

TheWitness

EDIT: 2005/08/03 - Updated Fixed ss_fping.php Script
Attachments
ss_fping.zip
PHP Script Server Script FPing Emulator
(795 Bytes) Downloaded 3145 times
Google Ping.JPG
Google Ping.JPG (27.46 KiB) Viewed 36729 times
cacti_graph_template_ping_advanced_ping_v1_2.xml
Graph Template with All Dependencies
(37.06 KiB) Downloaded 4681 times
Last edited by TheWitness on Thu Oct 27, 2005 9:52 pm, edited 2 times 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.

User avatar
fmangeant
Cacti Guru User
Posts: 2326
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

#2 Post by fmangeant » Wed Aug 03, 2005 7:32 am

Hi Larry

thanks for this template. I'd like to keep the poller running as non-root, do you think it would possible to use your script with someting like sudo (I usually run fping with sudo) ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]

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

#3 Post by TheWitness » Wed Aug 03, 2005 2:14 pm

What I could do is provide an option to perform a TCP, UDP, or ICMP pings specifying a port number as an option? What do you think?

Therefore instead of simply specifying:
1) Number of retries

You would specify:
1) Number of retries
2) Ping Type: TCP/UDP/ICMP
3) Port Number for (TCP/UDP)

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.

websat
Cacti User
Posts: 58
Joined: Wed Jun 22, 2005 3:00 pm
Contact:

#4 Post by websat » Wed Aug 03, 2005 3:34 pm

Hi

when i try to import the xml file i have that errot:

Error: XML: Hash version does not exist.
Visit my web site: http://www.websat-telecom.com

mvam
Cacti User
Posts: 87
Joined: Wed Jun 01, 2005 2:00 pm
Location: Seattle

#5 Post by mvam » Wed Aug 03, 2005 4:11 pm

same here

User avatar
rony
Developer/Forum Admin
Posts: 6016
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

#6 Post by rony » Wed Aug 03, 2005 4:51 pm

Template is made in 0.8.6f, you will need 0.8.6f to import it.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]

mvam
Cacti User
Posts: 87
Joined: Wed Jun 01, 2005 2:00 pm
Location: Seattle

#7 Post by mvam » Wed Aug 03, 2005 6:00 pm

rony wrote:Template is made in 0.8.6f, you will need 0.8.6f to import it.
running 0.8.6f here.. doesnt import properly.

mvam
Cacti User
Posts: 87
Joined: Wed Jun 01, 2005 2:00 pm
Location: Seattle

#8 Post by mvam » Wed Aug 03, 2005 6:11 pm

very wierd, i tried the import one more time and it worked. no idea what happened there.

mvam
Cacti User
Posts: 87
Joined: Wed Jun 01, 2005 2:00 pm
Location: Seattle

#9 Post by mvam » Wed Aug 03, 2005 10:58 pm

i created a DS and graph with using the templates and:

RRDTool Says:

ERROR: can't parse ':'


i turned off the template on the graph and check each graph item. looks like they all have a DS associated with them. did i miss something?

fanu
Posts: 18
Joined: Thu Oct 07, 2004 2:53 pm
Location: Paris, France

#10 Post by fanu » Thu Aug 04, 2005 4:45 am

I have exactly the same problem : Error: XML: Hash version does not exist.

I have cacti version 0.8.6f

Thanks for your help.

Fanu.

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

#11 Post by TheWitness » Thu Aug 04, 2005 8:17 am

This is likely my issue. Let me do a fresh install in the next day or so and repost if I find something.

Larry
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.

vtmgr
Posts: 27
Joined: Wed Aug 11, 2004 2:23 pm
Location: Vermont, USA

Almost working...

#12 Post by vtmgr » Thu Aug 04, 2005 12:14 pm

I am running this on a Win32 Platform. When I run it from the Script Server console, per the Witness's excellent instructions, it appears to return perfectly useful and sane results.

However, when it is running in Cacti itself, it doesn't appear to give me output.

Running in Debug, it seems that it always returns "output: AV:U PL:100".

Looking in the script code, it seems to indicate an error condition, but:

a) my PHP is no where near good enough to figure out what.

and

b) why does it seem to run fine from the command line?

If someone knows the magical incantation to correct this, I would be most grateful.
Cacti 0.8.6f
CMD
MySQL 4.0.20
Net-SNMP 5.1.1
IIS 6
PHP 5.0.2
RRDtool 1.2.10
Windows 2003 Server

vtmgr
Posts: 27
Joined: Wed Aug 11, 2004 2:23 pm
Location: Vermont, USA

permissions on win32

#13 Post by vtmgr » Thu Aug 04, 2005 2:22 pm

well, it appears to be a permissions issue. if I try to run it from the account I have the poller running as, it comes back with that error.

That said, I haven't found out where yet.

I have given that account to read/execute ping, lib\ping.php, and the script_server script, but it doesn't seem to help.
Cacti 0.8.6f
CMD
MySQL 4.0.20
Net-SNMP 5.1.1
IIS 6
PHP 5.0.2
RRDtool 1.2.10
Windows 2003 Server

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

#14 Post by TheWitness » Thu Aug 04, 2005 2:38 pm

You need to apply the patches at:

http://www.cacti.net/downloads/patches/ ... re-patched

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.

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

#15 Post by TheWitness » Thu Aug 04, 2005 3:02 pm

Once I had applied the patches in my production Windows environment, it worked like a champ.

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.

Post Reply