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
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

general errors

Post by ehall »

I'm not sure what's going on here. This was working for one host but not for some others. Now its not working for any of them.

Here's success from the command line:

Code: Select all

[ root# ] php /usr/share/cacti/scripts/ss_fping.php goose.ntrg.com 20 TCP
min:60.2800 avg:61.8845 max:64.1400 dev:0.6830 loss:0.0000
But output from the logs shows partial error:

Code: Select all

12/15/2005 03:25:01 AM - CMDPHP: Poller[0] Host[2] DS[153] CMD: perl /usr/share/cacti/scripts/ping.pl rhino.labs.ntrg.com, output: U
12/15/2005 03:25:01 AM - CMDPHP: Poller[0] Host[2] DS[157] SERVER: /usr/share/cacti/scripts/ss_fping.php rhino.labs.ntrg.com 20 TCP, output: U
12/15/2005 03:25:02 AM - CMDPHP: Poller[0] Host[6] DS[158] SERVER: /usr/share/cacti/scripts/ss_fping.php goose.ehsco.com 20 TCP 80, output: U
12/15/2005 03:25:03 AM - CMDPHP: Poller[0] Host[12] DS[163] SERVER: /usr/share/cacti/scripts/ss_fping.php omega.hall.family-and-friends.us 20 TCP, output: U
Here's the output from cmd.php:

Code: Select all

12/15/2005 03:21:59 AM - CMDPHP: Poller[0] Host[2] DS[153] CMD: perl /usr/share/cacti/scripts/ping.pl rhino.labs.ntrg.com, output: 0.036
12/15/2005 03:21:59 AM - CMDPHP: Poller[0] Host[2] DS[157] WARNING: Result from SERVER not valid.  Partial Result: WARNING: Function do
12/15/2005 03:21:59 AM - CMDPHP: Poller[0] Host[2] DS[157] SERVER: /usr/share/cacti/scripts/ss_fping.php rhino.labs.ntrg.com 20 TCP, output: U
Any suggestions? Thanks
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Did you apply all the patched files including ping.php?

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?
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

Yes I installed all the files in this thread. I've since rolled back and am going to try again.

What PHP modules are needed for this? I should check that first.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

php_sockets

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?
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

k I've got that installed already (it was my first roadblock heh)

I'm running 0.8.6g so just to be sure, all I need are the PHP objects provided in this thread, correct? There don't appear to be any relevant patches to 0.8.6g but I want to make sure.

The other possibility is that I'm having problems checking availability. I'm currently using SNMP for system availability and I seem to recollect that some of the systems went unavailable after the install.
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

Once I got the regular ICMP pings working with cactid (fixed by running the cron job under root), Advanced Ping also worked on the next install.
mikes1p
Posts: 8
Joined: Mon Oct 10, 2005 5:46 pm

Post by mikes1p »

OK back at this. The user is an admin account that has permissions, the directories are there, and I set the permissions to be wide open for everyone. Still get the problem

If I run "c:\php\php.exe foo" at a command prompt I get the same "creating dirs" output. Must be something to do with PHP but I haven't been able to find out how to fix it

BTW, PHP is a fresh install, per the Cacti Windows install instructions. Any tips or pointers to get PHP happy?

Thanks
Mike
TheWitness wrote:Your user does not have permission to create the directories. Please create them and then allow the poller user to wrx to them..
mikes1p wrote:
TheWitness wrote:Does the "creating directory..." happen every time? Otherwise, please wait a polling cycle or two for the graph to appear. Also, what happens when your run "php <path_cacti>/cmd.php" at MEDIUM logging level?
Yes the "creating dirs" happend every time.

Yep I waited several polling cycles to see if was working, the empty graph I posted was for two hours after I had created the graph
the_sphynx
Posts: 21
Joined: Wed Aug 04, 2004 4:28 pm
Location: Thornton, CO

My Graph looks weird...

Post by the_sphynx »

There's like half a "U" down beside my 96-100% field at the bottom of the graph? Any ideas?
Attachments
Advanced_Ping_v1.3.JPG
Advanced_Ping_v1.3.JPG (30.1 KiB) Viewed 17124 times
Thanks,

Bryan
InfInIte
Posts: 23
Joined: Wed Apr 14, 2004 12:27 pm

Post by InfInIte »

Hi, I'm trying to run this script but it's not going verry well.
The problem is that the attached image is all the output on the graph I get.

in the cacti log file i've got the following entries:

Code: Select all

12/30/2005 12:25:01 AM - PHPSVR: Poller[0] DEBUG: INCLUDE: '/home/httpd/vhosts/xxxxxx/subdomains/cacti/httpdocs/scripts/ss_fping.php' SCRIPT: 'ss_fping' CMD: 'www.belnet.be 20 ICMP'
12/30/2005 12:25:01 AM - CACTID: Poller[0] Host[1] SERVER: /home/httpd/vhosts/xxxxx/subdomains/cacti/httpdocs/scripts/ss_fping.php ss_fping www.belnet.be 20 ICMP, output: min:5.2100
12/30/2005 12:25:01 AM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (166,'','2005-12-30 00:25:00','min:5.2100')
12/30/2005 12:25:01 AM - PHPSVR: Poller[0] SERVER: /home/httpd/vhosts/xxxxxx/subdomains/cacti/httpdocs/scripts/ss_fping.php ss_fping www.belnet.be 20 ICMP output min:5.2100 avg:6.2235 max:7.8900 dev:0.5927 loss:0.0000
I'm using cactid as poller, and the cron job is run by the root user.
PHP version is 4.3.11 and the cacti version is 0.8.6g and my OS is Fedora Core 2 (32 bit).
Attachments
graph_image.php.png
graph_image.php.png (22.85 KiB) Viewed 17070 times
InfInIte
Posts: 23
Joined: Wed Apr 14, 2004 12:27 pm

Post by InfInIte »

This is how the RRD file looks like when fetching some data with rrdtool:

Code: Select all

1136161200: nan nan nan nan 5.0000000000e-02
1136161500: nan nan nan nan 5.0000000000e-02
1136161800: nan nan nan nan 5.0000000000e-02
1136162100: nan nan nan nan 5.0000000000e-02
1136162400: nan nan nan nan 5.0000000000e-02
1136162700: nan nan nan nan 5.0000000000e-02
I'm using RRDTool 1.2.11
Could this be causing the problem? and if, how do i fix it?
tarpat1
Posts: 17
Joined: Sun Jan 01, 2006 11:39 pm

Post by tarpat1 »

I am bumping this because I am getting the same error.

Any ideas?

Phobos182 wrote:I get this error when trying to import the template.

Error: XML: Cacti version does not exist.

I've verified that I'm running the current version

mysql> select * from version\G
*************************** 1. row ***************************
cacti: 0.8.6g
1 row in set (0.00 sec)

How do I solve this?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

InfInIte wrote:

Code: Select all

12/30/2005 12:25:01 AM - PHPSVR: Poller[0] DEBUG: INCLUDE: '/home/httpd/vhosts/xxxxxx/subdomains/cacti/httpdocs/scripts/ss_fping.php' SCRIPT: 'ss_fping' CMD: 'www.belnet.be 20 ICMP'
12/30/2005 12:25:01 AM - CACTID: Poller[0] Host[1] SERVER: /home/httpd/vhosts/xxxxx/subdomains/cacti/httpdocs/scripts/ss_fping.php ss_fping www.belnet.be 20 ICMP, output: min:5.2100
12/30/2005 12:25:01 AM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (166,'','2005-12-30 00:25:00','min:5.2100')
12/30/2005 12:25:01 AM - PHPSVR: Poller[0] SERVER: /home/httpd/vhosts/xxxxxx/subdomains/cacti/httpdocs/scripts/ss_fping.php ss_fping www.belnet.be 20 ICMP output min:5.2100 avg:6.2235 max:7.8900 dev:0.5927 loss:0.0000
This issue happend to me when using an "old" cactid poller. It was resolved at least with cactid 0.8.6g (for me).
Reinhard
InfInIte
Posts: 23
Joined: Wed Apr 14, 2004 12:27 pm

Post by InfInIte »

lvm wrote:This issue happend to me when using an "old" cactid poller. It was resolved at least with cactid 0.8.6g (for me).
Reinhard
That helped :D

I also noticed that regardless the address I fill in into the address field when making the datasource, it keeps using the devive's hostname value according to the poller cache :-?
rayvd
Posts: 6
Joined: Mon Apr 18, 2005 6:22 pm
Location: Chico, CA

Post by rayvd »

Had an interesting issue with this script...

I was getting 100% loss all the time, and investigated my logfile. The ss_fping script was getting called as such:

/var/www/html/noc/cacti/scripts/ss_fping.php ss_fping asterisk-master.domain.com 20 UDP 5060

So ss_fping was being used as the hostname in the ss_fping.php script.

To fix this behavior, I added an additional array_shift() call at the top of the ss_fping.php file. All is working now.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

InfInIte wrote:I also noticed that regardless the address I fill in into the address field when making the datasource, it keeps using the devive's hostname value according to the poller cache :-?
System Utilities -> Clear Poller Cache will help
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests