Advanced Ping Template for Cacti 0.8.6f

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

Post Reply
kakteen
Posts: 3
Joined: Thu Aug 04, 2005 8:57 pm

Post by kakteen »

same here, did de pre-patches.

Code: Select all

$ su www-data
sh-3.00$ php ss_fping.php localhost

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 98
[[cut two dozens of these]]
AV:U PL:100sh-3.00$ exit
qpduong
Posts: 11
Joined: Tue Jul 26, 2005 7:59 pm
Contact:

Post by qpduong »

on win32 environment I got following error msg:

C:\>c:\wamp\php\php.exe c:/wamp/www/cacti/script_server.php
PHP Script Server has Started - Parent is cmd
c:\wamp\www\cacti\scripts\ss_fping.php ss_fping 192.168.100.25 6
#!/usr/bin/php -q

Fatal error: Call to undefined function socket_create() in c:\wamp\www\cacti\lib
\ping.php on line 99

Do I need to change something to make it work on Win32?
mvam
Cacti User
Posts: 87
Joined: Wed Jun 01, 2005 2:00 pm
Location: Seattle

Post by mvam »

once i realized that this only worked when attached to a host, it finally started to draw a graph and actually execute. however something went wrong and the output of ss_host_disk.php started returning the value of ss_fping.php. as you can see from this example

Code: Select all

08/04/2005 07:10:04 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /home/cacti/rra/killpool_loss_121.rrd --template  1123207801:U
08/04/2005 07:15:04 PM - PHPSVR: Poller[0] SERVER: /home/cacti/scripts/ss_fping.php ss_fping www.speakeasy.net 10 output min:10.2900 avg:10.9730 max:11.6900 dev:0.7000 loss:0.0000
08/04/2005 07:15:04 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /home/cacti/rra/killpool_loss_121.rrd --template  1123208101:U
08/04/2005 07:15:08 PM - CMDPHP: Poller[0] Host[3] DS[58] SERVER: /home/cacti/scripts/ss_host_disk.php ss_host_disk 192.168.1.1 pub 2 3 161 500 get used 7, output: min:10.2900 avg:10.9730 max:11.6900 dev:0.7000 loss:0.0000
i decided to to delete the disk graphs for the host 192.168.1.1 and not only did the disk graphs delete so did the ping graph. i recreated both of them and the same thing happened.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You must apply the patches on the web site. The patch to lib/ping.php addresses this issue.

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?
kakteen
Posts: 3
Joined: Thu Aug 04, 2005 8:57 pm

Post by kakteen »

Code: Select all

sh-3.00$ php ss_fping.php localhost 1
Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 98
Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 99
Warning: socket_set_option() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 108
AV:U PL:100sh-3.00$
No go. It seems to be a permissions issue. Are you positive that replacing ping.php resolves it?
Last edited by kakteen on Fri Aug 05, 2005 9:42 am, edited 1 time in total.
vtmgr
Posts: 27
Joined: Wed Aug 11, 2004 2:23 pm
Location: Vermont, USA

still Win32 problems

Post by vtmgr »

I applied the patches (I assume that since the directory is labelled "pre-patched", one just replaces the existing files of the same name), but I still have the same problem/behavior.

Any other diagnostic tests I can run to narrow down the suspects?

tx.
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
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

Forgive me for being stupid or asking a stupid question.....To use this script and template say on google.com or any site/// Do you have to add a device, say called google or websites?? then adding the associated graph template to ping.?? I guess i got confused on this one!!

HA

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

Post by TheWitness »

Yes this is a permissions issue. You must be root to create RAW sockets. I think that I need to improve the template to give you Unix/Linux guys more options. Won't happen this weekend though. Out of town.

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?
rpingar
Cacti User
Posts: 86
Joined: Mon Jun 07, 2004 8:17 am

Post by rpingar »

I tested the script using php server script on 0.86f patched cacti.

My os is winxp and php4

I got:
PHP Script Server has Started - Parent is cmd
c:/apache2/apache2/htdocs/cacti/scripts/ss_fping.php ss_fping www.google.au 20
AV:U PL:100
c:/apache2/apache2/htdocs/cacti/scripts/ss_fping.php ss_fping www.google.au 5
AV:U PL:100

My os is an Italian version! is this a problem? (because i had to build my on ping some time ago giving the different linguage), is this the case?

Thanks
rpingar
Cacti User
Posts: 86
Joined: Mon Jun 07, 2004 8:17 am

Post by rpingar »

sorry!!!!

i wa spinging an unpingable host!

sorry again
rpingar
Cacti User
Posts: 86
Joined: Mon Jun 07, 2004 8:17 am

Post by rpingar »

now I have a problem to import the graph template.

When I try to import it I get:
Error: XML: Cacti version does not exist.

my cacti is 0.8.6f+patches+thold

Any support?

thanks
rpingar
Cacti User
Posts: 86
Joined: Mon Jun 07, 2004 8:17 am

Post by rpingar »

fixed!
added:
"0.8.6f" => "0009"

to config_array.php

bye
rpingar
Cacti User
Posts: 86
Joined: Mon Jun 07, 2004 8:17 am

Post by rpingar »

created the data source, created the graph.

now i get:
ERROR: can't parse ':'

Everything seems fine, the graph template is associated to a host.

What's the cause of my problem?

Thanks
rpingar
Cacti User
Posts: 86
Joined: Mon Jun 07, 2004 8:17 am

Post by rpingar »

very strange, it is related to a lin4 (packet loss), that it is not able to get the data source.

Asap I manually set the datasource everything seems to work.

I checked the graph template and it is fine. Asap I saved the graph template every graph corrected their link to packet loss data source.

very very strange.
ioiioi
Cacti User
Posts: 52
Joined: Mon Mar 28, 2005 8:57 am

Post by ioiioi »

:cry: To use the Advanced Ping 1.2, I upgrade My cacti to 0.8.6f, and import the template, then create AdvancedPing graph, the following were cacti log:
08/07/2005 06:16:04 PM - POLLER: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe update C:\apache2\Apache2\htdocs\cacti\rra\shunde_salecenterc2620_min_102.rrd --template min:avg:max:dev:loss 1123409760:26.4200:27.3150:28.2000:0.8900:0.0000
08/07/2005 06:16:04 PM - POLLER: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe update C:\apache2\Apache2\htdocs\cacti\rra\shunde_salecenterc2620_min_104.rrd --template min:avg:max:dev:loss 1123409760:26.2000:31.9405:56.3000:15.0500:0.0000

AND THE FOLLOWING was the graph log( I turned on the debug mode)

08/07/2005 06:16:45 PM - WEBLOG: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe graph - --imgformat=PNG --start=1123323404 --end=1123409804 --title="ShunDe - SaleCenter(c2620) - Advanced Ping" --base=1000 --height=120 --width=500 --upper-limit=10 --lower-limit=0 --units-exponent=1 COMMENT:"From 2005/08/06 18:16:44 To 2005/08/07 18:16:44\c" COMMENT:" \n" --vertical-label="milliseconds" DEF:a="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":min:AVERAGE DEF:b="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":avg:AVERAGE DEF:c="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":max:AVERAGE DEF:d="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:e="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":dev:AVERAGE DEF:f="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:g="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:h="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:i="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:j="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:ba="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:bb="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:bc="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":avg:AVERAGE DEF:bd="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":max:AVERAGE DEF:be="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":max:AVERAGE DEF:bf="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":max:AVERAGE DEF:bg="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":max:AVERAGE DEF:bh="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":max:AVERAGE DEF:bi="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:bj="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:ca="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:cb="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:cc="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:cd="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:ce="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":loss:AVERAGE DEF:cf="C\:\apache2\Apache2\htdocs\cacti/rra/shunde_salecenterc2620_min_104.rrd":avg:AVERAGE CDEF:cdefg=d,0,GT,d,2,GT,UNKN,INF,IF,UNKN,IF CDEF:cdefh=d,3,GT,d,5,GT,UNKN,INF,IF,UNKN,IF CDEF:cdefi=d,5,GT,d,10,GT,UNKN,INF,IF,UNKN,IF CDEF:cdefj=d,10,GT,d,15,GT,UNKN,INF,IF,UNKN,IF CDEF:cdefba=d,15,GT,d,50,GT,UNKN,INF,IF,UNKN,IF CDEF:cdefbb=d,50,GT,d,95,GT,UNKN,INF,IF,UNKN,IF CDEF:cdefbc=d,95,GT,d,100,GT,UNKN,INF,IF,UNKN,IF CDEF:cdefbd=d,UN,1,EQ,TIME,300,+,NOW,GT,UNKN,INF,IF,d,95,GT,INF,UNKN,IF,IF CDEF:cdefbf=e,2,/ CDEF:cdefbh=c,b,-,e,-,3,/ CDEF:cdefcd=d,0,GT,d,2,GT,UNKN,b,IF,UNKN,IF CDEF:cdefce=d,3,GT,d,5,GT,UNKN,b,IF,UNKN,IF CDEF:cdefcf=d,5,GT,d,10,GT,UNKN,b,IF,UNKN,IF CDEF:cdefcg=d,10,GT,d,15,GT,UNKN,b,IF,UNKN,IF CDEF:cdefch=d,15,GT,d,50,GT,b,INF,IF,UNKN,IF CDEF:cdefci=d,50,GT,d,95,GT,UNKN,b,IF,UNKN,IF CDEF:cdefcj=d,95,GT,d,100,GT,UNKN,b,IF,UNKN,IF LINE1:a:"" LINE1:cf:"" LINE1:bh:"" LINE1:ce:"" LINE1:e:"" COMMENT:" Pkt Loss:" AREA:cdefg#AFECED:"1-2%" AREA:cdefh#55D6D3:"3-5%" AREA:cdefi#7CB3F1:"6-10%" AREA:cdefj#4668E4:"11-15%" AREA:cdefba#A150AA:"16-50%" AREA:cdefbb#FF00FF:"51-95%" AREA:cdefbc#F51D30:"96-100%" COMMENT:"Unknown\n" AREA:cf#FFFFFF:"" STACK:cdefbf#333333:"" STACK:cdefbf#555555:"" STACK:cdefbh#888888:"" STACK:cdefbh#AAAAAA:"" STACK:cdefbh#CCCCCC:"" GPRINT:ce:AVERAGE:" Avg Loss\:%6.2lf%%" GPRINT:ce:MAX:"Max Loss\:%6.2lf%%\n" COMMENT:" Latency:" AREA:cdefcd#AFECED:"" AREA:cdefce#55D6D3:"" AREA:cdefcf#7CB3F1:"" AREA:cdefcg#4668E4:"" AREA:cdefch#A150AA:"" AREA:cdefci#FF00FF:"" AREA:cdefcj#F51D30:"" GPRINT:a:AVERAGE:"Min\:%8.2lf ms" GPRINT:cf:AVERAGE:"Avg\:%8.2lf ms" GPRINT:bh:MAX:"Max\:%8.2lf ms" GPRINT:e:AVERAGE:"Dev\:%8.2lf ms\n" COMMENT:"Avg Latency:" LINE1:cf#00BD27:"."

The rra file counld be found within directory ..cacti\rra\shunde_salecenterc2620_min_104.rrd, but the graph coundn't be displayed, why ,can anybody help me?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests