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

#301 Post by TheWitness » Fri Oct 19, 2007 7:41 pm

|host_description| - |host_hostname| - Advanced Ping.
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
nahun
Cacti User
Posts: 92
Joined: Wed Feb 15, 2006 11:27 pm
Location: Idaho
Contact:

socket option

#302 Post by nahun » Tue Oct 23, 2007 5:38 pm

I'm using 0.8.7 beta 4 until it releases and just trying ss_fping.php from CLI.

Code: Select all

$sudo php ss_fping.php 127.0.0.1
Warning: socket_set_option(): unable to set socket option [99]: Option not supported by protocol in /export/htdocs/cacti/lib/ping.php on line 162
I get that warning for every attempt. And just for ICMP. I took an old ping.php from the server I'm replacing and it works fine, I don't get that error, but I'm sure thats not a good idea. Its from 0.8.6h or something. Any ideas?
[size=75]Solaris 10 x86 [color=red][b]||[/b][/color] Cacti - 0.8.7 [color=red][b]||[/b][/color] MySQL - 5.0.45 [color=red][b]||[/b][/color] PHP - 5.2.6 [color=red][b]||[/b][/color] RRDTool - 1.2.23 [color=red][b]||[/b][/color] NET-SNMP - 5.4.1 [color=red][b]||[/b][/color] Syslog-ng 2.0.5
[url=http://www.indigo-networks.com]indigo-networks.com[/url][/size]

User avatar
feathers1664
Posts: 9
Joined: Tue Oct 30, 2007 7:13 am
Location: United Kingdom

#303 Post by feathers1664 » Wed Nov 07, 2007 5:49 pm

Is the v1.3 advanced ping template compatible with the 0.8.7 release?

Many thanks.

User avatar
chrisgapske
Cacti User
Posts: 278
Joined: Tue May 22, 2007 7:56 am
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL

#304 Post by chrisgapske » Wed Nov 07, 2007 9:36 pm

feathers1664 wrote:Is the v1.3 advanced ping template compatible with the 0.8.7 release?

Many thanks.
I have been using it with 0.8.7

abdulcc
Cacti User
Posts: 52
Joined: Fri Jul 14, 2006 7:06 am

Any ideas about this error message

#305 Post by abdulcc » Sun Nov 11, 2007 1:53 pm

[[email protected] ~]# php -q /var/www/html/cacti/scripts/ss_fping.php ss_fping 196.207.224.161 23 ICMP
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 60
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 384
PHP Warning: socket_write(): unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 407
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 60
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 384
PHP Warning: socket_write(): unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 407
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 60
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 384
PHP Warning: socket_write(): unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 407
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 60
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 384
PHP Warning: socket_write(): unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 407
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 60
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 384
PHP Warning: socket_write(): unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 407
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 60
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 384
PHP Warning: socket_write(): unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 407
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 60
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 384
PHP Warning: socket_write(): unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 407
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 60
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 384
PHP Warning: socket_write(): unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 407
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 60
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 384
PHP Warning: socket_write(): unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 407
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 60
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 384
PHP Warning: socket_write(): unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 407
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 60
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 384
PHP Warning: socket_write(): unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 407


Please help,

I do have php sockets installed and I am running poller as root. Please help?

mandor101
Posts: 8
Joined: Wed Jun 13, 2007 8:51 am

#306 Post by mandor101 » Sun Nov 11, 2007 5:23 pm

Just did any upgrade to 0.8.7 and just installed advanced ping and seem to be having a problem with ss_fping.php. Looks like the script it trying to find:

$script_timeout = read_config_option("script_timeout");
$ping_timeout = read_config_option("ping_timeout");

And can't....I added a line to include

include_once(dirname(__FILE__) . "/../include/global_settings.php

and that took care of the script_timeout value, but the ping_timeout is still give me some fits...What's the value of ping_timeout supposed to be?

Thanks

achea
Posts: 6
Joined: Mon Sep 24, 2007 10:01 pm

#307 Post by achea » Sun Nov 11, 2007 9:07 pm

please help
i have some trouble in advance ping
after import the template and add device
cant catch any data

here is my test:
php script_server.php
/var/www/html/cacti/scripts/ss_fping.php ss_fping www.google.com 20 TCP 80
==>
min:0.0000 avg:0.0000 max:0.0000 dev:0.0000 loss:0.0000

php scripts/ss_fping.php www.google.com 20 TCP 80
==>
Notice: Undefined index: snmp_community in /var/www/html/cacti/lib/ping.php on line 537
min:0.0000 avg:0.0000 max:0.0000 dev:0.0000 loss:0.0000

whats wrong
my hostinfo is
Cacti Version 0.8.6i
Plugin Architecture 1.1
Poller Type Cactid v0.8.6i
Server Info Linux 2.6.15-1.2054_FC5
Web Server Apache/2.2.2 (Fedora)
PHP Version 5.2.3
PHP Extensions xmlwriter, libxml, dom, xmlreader, xml, tokenizer, session, pcre, SimpleXML, SPL, PDO, SQLite, standard, Reflection, posix, pdo_sqlite, mysql, json, iconv, hash, gd, filter, date, ctype, zlib, apache2handler
MySQL Version 5.0.40-log
RRDTool Version 1.2.23
SNMP Version 5.3

i have enable '--enable-socket' when install php
please help

User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Re: Any ideas about this error message

#308 Post by johnrembo » Tue Nov 13, 2007 8:51 am

abdulcc wrote:[[email protected] ~]# php -q /var/www/html/cacti/scripts/ss_fping.php ss_fping 196.207.224.161 23 ICMP
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 60
PHP Warning: socket_connect() expects parameter 3 to be long, string (...)
Please help,

I do have php sockets installed and I am running poller as root. Please help?
simply perform the following (worked form me):
Attachments
ss_fping.png
delete ss_fping argument from "Input string"
ss_fping.png (21.33 KiB) Viewed 12777 times

User avatar
feathers1664
Posts: 9
Joined: Tue Oct 30, 2007 7:13 am
Location: United Kingdom

#309 Post by feathers1664 » Tue Nov 13, 2007 11:18 am

Is it possible to have the ping template run at a higher interval (ie. one minute polling) but keep the other SNMP collections at a 5 minute interval?

abdulcc
Cacti User
Posts: 52
Joined: Fri Jul 14, 2006 7:06 am

I tried that

#310 Post by abdulcc » Tue Nov 13, 2007 2:20 pm

11/13/2007 07:00:52 PM - CMDPHP: Poller[0] Host[44] DS[3216] SERVER: /var/www/html/cacti/scripts/ss_fping.php 64.233.183.104 10 ICMP , output: U
11/13/2007 07:00:52 PM - CMDPHP: Poller[0] Host[43] DS[3215] SERVER: /var/www/html/cacti/scripts/ss_fping.php 217.12.3.11 10 ICMP , output: U
11/13/2007 07:00:52 PM - CMDPHP: Poller[0] Host[41] DS[3210] SERVER: /var/www/html/cacti/scripts/ss_fping.php 213.136.100.241 10 ICMP , output: U
11/13/2007 07:00:49 PM - CMDPHP: Poller[0] Host[38] DS[3209] SERVER: /var/www/html/cacti/scripts/ss_fping.php 196.207.224.161 10 ICMP , output: U
11/13/2007 07:00:49 PM - CMDPHP: Poller[0] Host[38] DS[3208] SERVER: /var/www/html/cacti/scripts/ss_fping.php 196.207.224.161 20 ICMP 20, output: U

This is what I get

ryusez
Posts: 25
Joined: Thu Sep 28, 2006 9:36 pm

#311 Post by ryusez » Tue Nov 27, 2007 7:18 pm

i am installl cacti 0.8.7a
and only import "cacti_graph_template_ping_advanced_ping_v1_3.xml" file

because i found the "ss_fping.php" on cacti 0.8.7a

but when i creat new graphen , i got some errors meesage
11/28/2007 08:15:32 AM - CMDPHP: Poller[0] Host[3] DS[14] SERVER: /var/www/html/cacti/scripts/ss_fping.php 10.82.31.107 20 ICMP , output: U
11/28/2007 08:15:32 AM - CMDPHP: Poller[0] Host[3] DS[14] WARNING: Result from SERVER not valid. Partial Result: WARNING: Function do
11/28/2007 08:15:32 AM - PHPSVR: Poller[0] WARNING: Function does not exist

----------------------------
11/28/2007 08:14:32 AM - SPINE: Poller[0] Host[2] DS[13] SS[0] SERVER: /var/www/html/cacti/scripts/ss_fping.php 10.82.31.243 20 ICMP , output: U
11/28/2007 08:14:32 AM - SPINE: Poller[0] Host[2] DS[13] SS[0] WARNING: Result from SERVER not valid. Partial Result: ...
11/28/2007 08:14:32 AM - PHPSVR: Poller[0] WARNING: Function does not exist



can any one tell me how to solve it..

thank you

===============is my sys info =======
General Information
Date Wed, 28 Nov 2007 08:30:55 +0800
Cacti Version 0.8.7a
Cacti OS unix
SNMP Version net-snmp
RRDTool Version RRDTool 1.2.x
Hosts 3
Graphs 6
Data Sources Script/Command: 7
Total: 7
Poller Information
Interval 30
Type spine
Items Action[1]: 7
Total: 7
Concurrent Processes 10
Max Threads 2
PHP Servers 3
Script Timeout 15
Max OID 10
Last Run Statistics Time:1.4265 Method:spine Processes:10 Threads:2 Hosts:4 HostsPerProcess:1 DataSources:1 RRDsProcessed:1
PHP Information
PHP Version 4.3.9
PHP OS Linux
PHP uname Linux cacti-mrtg.cmo.com.tw 2.6.9-55.ELsmp #1 SMP Wed May 2 14:28:44 EDT 2007 i686
PHP SNMP Installed
max_execution_time 30
memory_limit 24M

cricrou
Posts: 12
Joined: Wed Oct 17, 2007 3:35 am

#312 Post by cricrou » Wed Dec 05, 2007 5:08 am

Using cacti 0.8.7a, I do have the same problems.

I figured it out using the following method :

Continue using the script "ss_fping.php" bundled in the 0.8.7a release
Add the script "ping.php" to the cacti/lib directory
If you do "ICMP" ping, launch the poller with root instead of the cacti user

Pay attention to the syntax of the data input script, it must look like :

Code: Select all

<path_cacti>/scripts/ss_fping.php ss_fping <hostname> <attempts> <protocol> <port>

felimwhiteley
Posts: 26
Joined: Mon Dec 10, 2007 10:14 am

#313 Post by felimwhiteley » Mon Dec 10, 2007 10:18 am

Hi there,

I'm having trouble with local export of this plugin. I have many hosts, my graph export only take about 50secs for so far 1600+ graphs. All of my other graphs export but the Advanced Ping v1.3 only exports a thumbnail.

The graphs them selves do actually exist. I'm using Classic Export using Classic Presentation and doing it every 5mins.

I cna't understand why it won't do it unless there is something I'm missing. I have verified that the Graph Export is ticked in the Graph Template so I'm a bit lost, I don't see any errors in the log file.

Thanks in advance,

Félim

felimwhiteley
Posts: 26
Joined: Mon Dec 10, 2007 10:14 am

#314 Post by felimwhiteley » Mon Dec 10, 2007 10:19 am

Ah I failed to mention it's version 0.8.6j from the default Ubuntu Gutsy release. Cheers

rootik
Posts: 8
Joined: Tue Feb 05, 2002 7:00 pm
Location: Ukraine
Contact:

Re: Any ideas about this error message

#315 Post by rootik » Fri Dec 14, 2007 4:13 am

johnrembo wrote:
abdulcc wrote:[[email protected] ~]# php -q /var/www/html/cacti/scripts/ss_fping.php ss_fping 196.207.224.161 23 ICMP
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 60
PHP Warning: socket_connect() expects parameter 3 to be long, string (...)
Please help,

I do have php sockets installed and I am running poller as root. Please help?
simply perform the following (worked form me):
Sorry, but you're wrong.
Function name shuld be present for sript server tu run.
To test ss_fping at the command line, just ommit first parameter, function name. Like that:
php -q /var/www/html/cacti/scripts/ss_fping.php 196.207.224.161 23 ICMP

I think "Function does not exist " errors in cacti stands for permission problem.

Post Reply