Thank you for the tips provided. On some point I failed to trace the problem (there were many other problems) and complete reinstall of cacti was the resolution for that.gandalf wrote:Please select a failing host and verify, that _this_ data sources has the "numbers of times to ping the host" set properly. But first, you may want to "php rebuild_poller_cache.php" to make sure that all is up to date. Afterwards, please check "Utilities -> Poller Cache" and search for your host to verify, that the settings are seen by the poller
Reinhard
EDIT: Advanced Ping Template Version 1.3 for Cacti 0.8.6g
Moderators: Developers, Moderators
php problem?
Sorry.
I'm new with cacti.
BTW, I successfully installed this advanced ping script and template.
In fact if I run ss_fping.php from command line... that is, from script_server.php I can get some results but.... I also get the php headers:
Content-type: text/html
X-Powered-By: PHP/4.3.8
min:0.2200 avg:0.2467 max:0.3500 dev:0.0468 loss:0.0000
By this, the script/template is not polling anything: the graphic is blank.
My logs (in debug mode) are reporting:
11/25/2006 10:00:12 PM - PHPSVR: Poller[0] DEBUG: INC: '/var/www/cacti/scripts/ss_fping.php' FUNC: 'ss_fping' PARMS: 'ifc-gwr.ifc.cnr.it 20 ICMP'
11/25/2006 10:00:12 PM - CMDPHP: Poller[0] Host[3] DS[181] WARNING: Result from SERVER not valid. Partial Result: Content-type: text/h
11/25/2006 10:00:12 PM - CMDPHP: Poller[0] Host[3] DS[181] SERVER: /var/www/cacti/scripts/ss_fping.php ss_fping ifc-gwr.ifc.cnr.it 20 ICMP , output: U
I'm new with cacti.
BTW, I successfully installed this advanced ping script and template.
In fact if I run ss_fping.php from command line... that is, from script_server.php I can get some results but.... I also get the php headers:
Content-type: text/html
X-Powered-By: PHP/4.3.8
min:0.2200 avg:0.2467 max:0.3500 dev:0.0468 loss:0.0000
By this, the script/template is not polling anything: the graphic is blank.
My logs (in debug mode) are reporting:
11/25/2006 10:00:12 PM - PHPSVR: Poller[0] DEBUG: INC: '/var/www/cacti/scripts/ss_fping.php' FUNC: 'ss_fping' PARMS: 'ifc-gwr.ifc.cnr.it 20 ICMP'
11/25/2006 10:00:12 PM - CMDPHP: Poller[0] Host[3] DS[181] WARNING: Result from SERVER not valid. Partial Result: Content-type: text/h
11/25/2006 10:00:12 PM - CMDPHP: Poller[0] Host[3] DS[181] SERVER: /var/www/cacti/scripts/ss_fping.php ss_fping ifc-gwr.ifc.cnr.it 20 ICMP , output: U
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
The first one is easy: type "php -q" to suppress headers.
The script server should do so as default. Please read http://forums.cacti.net/viewtopic.php?t=7738 for more help
Reinhard
The script server should do so as default. Please read http://forums.cacti.net/viewtopic.php?t=7738 for more help
Reinhard
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
If the ping target is not reachable, the script only spits out a loss value of 100. This will cause rrdtool update errors. To omit those, please consider using the following patch to ss_fping.php
I've only added some U outputs.
Reinhard
Code: Select all
--- ss_fping.php.orig 2006-11-25 22:27:19.000000000 +0100
+++ ss_fping.php 2006-11-25 22:27:23.000000000 +0100
@@ -80,7 +80,7 @@
}
if ($failed_results == $ping_sweeps) {
- return "loss:100.00";
+ return "min:U avg:U max:U dev:U loss:100.00";
}else{
$loss = ($failed_results/$ping_sweeps) * 100;
$avg = $total_time/($ping_sweeps-$failed_results);
Reinhard
Yes I already try, as root.gandalf wrote:So did you try the link I advertised? Please post the results of those tests
Code: Select all
#php /var/www/cacti/script_server.php
PHP Script Server has Started - Parent is cmd
Then I get:
Code: Select all
Content-type: text/html
X-Powered-By: PHP/4.3.8
min:0.6200 avg:0.6790 max:0.8300 dev:0.0542 loss:0.0000
Sorry, I renew the question:
where is the problem if in cacti logs I can find these lines?
where is the problem if in cacti logs I can find these lines?
Code: Select all
11/27/2006 11:00:15 AM - PHPSVR: Poller[0] DEBUG: INC: '/var/www/cacti/scripts/ss_fping.php' FUNC: 'ss_fping' PARMS: '192.168.1.1 20 ICMP'
11/27/2006 11:00:15 AM - CMDPHP: Poller[0] Host[5] DS[58] WARNING: Result from SERVER not valid. Partial Result: Content-type: text/h
11/27/2006 11:00:15 AM - CMDPHP: Poller[0] Host[5] DS[58] SERVER: /var/www/cacti/scripts/ss_fping.php ss_fping 192.168.1.1 20 ICMP , output: U
Help Please
I have 0.8.6i installed on debian. Everything works but when I added the cacti_graph_template_ping_advanced_ping_v1_3.xml from the begining of this post I can not get it to graph and I get this error.
RRDTool Says:
ERROR: invalid rpn expression in: d,0,GT,d,2,GT,UNKN,INF,IF,UNKN,IF
Thank you
RRDTool Says:
ERROR: invalid rpn expression in: d,0,GT,d,2,GT,UNKN,INF,IF,UNKN,IF
Thank you
Re: Help Please
Nevermind figured it out.barney34 wrote:I have 0.8.6i installed on debian. Everything works but when I added the cacti_graph_template_ping_advanced_ping_v1_3.xml from the begining of this post I can not get it to graph and I get this error.
RRDTool Says:
ERROR: invalid rpn expression in: d,0,GT,d,2,GT,UNKN,INF,IF,UNKN,IF
Thank you
i get no data too...
I have 4 ping templates (Advanced ping, Multiping, SmoleLike, Ping Latency), and only Ping Latency work.
FreeBSD 6.1-RELEASE FreeBSD 6.1-RELEASE
cacti-0.8.6i Web-driven graphing interface for RRDTool
cactid-0.8.6.g A multithreaded poller for Cacti written in C
php5-5.1.6_3 PHP Scripting Language (Apache Module and CLI)
php5-bz2-5.1.6_3 The bz2 shared extension for php
php5-gd-5.1.6_3 The gd shared extension for php
php5-mbstring-5.1.6_3 The mbstring shared extension for php
php5-mcrypt-5.1.6_3 The mcrypt shared extension for php
php5-mysql-5.1.6_3 The mysql shared extension for php
php5-openssl-5.1.6_3 The openssl shared extension for php
php5-pcre-5.1.6_3 The pcre shared extension for php
php5-session-5.1.6_3 The session shared extension for php
php5-snmp-5.1.6_3 The snmp shared extension for php
php5-xml-5.1.6_3 The xml shared extension for php
php5-zlib-5.1.6_3 The zlib shared extension for php
rrdtool-1.2.15 Round Robin Database Tools
root@stat> ping 123.123.123.123 < /usr/local/share/cacti/scripts >
PING 123.123.123.123 (123.123.123.123): 56 data bytes
64 bytes from 123.123.123.123: icmp_seq=0 ttl=255 time=0.328 ms
64 bytes from 123.123.123.123: icmp_seq=1 ttl=255 time=0.313 ms
64 bytes from 123.123.123.123: icmp_seq=2 ttl=255 time=0.293 ms
^C
--- 123.123.123.123 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.293/0.311/0.328/0.014 ms
root@stat> php /usr/local/share/cacti/script_server.php < /usr/local/share/cacti/scripts >
PHP Script Server has Started - Parent is cmd
ss_fping.php ss_fping 123.123.123.123 20 ICMP
min:0.0000 avg:0.0000 max:0.0000 dev:0.0000 loss:0.0000
root@stat> php ss_fping.php 123.123.123.123 ICMP < /usr/local/share/cacti/scripts >
Notice: Undefined index: snmp_community in /usr/local/share/cacti/lib/ping.php on line 537
Notice: Undefined index: snmp_community in /usr/local/share/cacti/lib/ping.php on line 537
root@stat> php ss_fping.php 123.123.123.123 ICMP < /usr/local/share/cacti/scripts >
Notice: Undefined index: snmp_community in /usr/local/share/cacti/lib/ping.php on line 537
root@stat> < /usr/local/share/cacti/scripts >
root@stat> cactid --verbosity=5 -S
<...>
DEBUG: MySQL Query ID '109': OK
Host[36] DEBUG: The POPEN returned the following File Descriptor 26
Host[36] DS[184] SCRIPT: perl /usr/local/bin/ping_latency.pl 123.123.123.123, output: roundtrip:U packetloss:100
Host[36] DEBUG: The POPEN returned the following File Descriptor 26
Host[36] ERROR: The POPEN timed out
Host[36] DS[188] WARNING: Result from SCRIPT not valid. Partial Result: ...
Host[36] DS[188] SCRIPT: perl /usr/local/share/cacti/scripts/multi_ping.pl, output: U
Host[36] DEBUG: The POPEN returned the following File Descriptor 26
Host[36] DS[185] SCRIPT: perl /usr/local/share/cacti/scripts/ping.pl 123.123.123.123, output: 44.404
Host[36] DEBUG: The POPEN returned the following File Descriptor 26
Host[36] DS[187] WARNING: Result from SCRIPT not valid. Partial Result:
Notice: Undefined i...
Host[36] DS[187] SCRIPT: php /usr/local/share/cacti/scripts/ss_fping.php 123.123.123.123 20 ICMP , output: U
Host[36] DEBUG: The POPEN returned the following File Descriptor 26
Host[36] DS[186] WARNING: Result from SCRIPT not valid. Partial Result:
Notice: Undefined i...
Host[36] DS[186] SCRIPT: php /usr/local/share/cacti/scripts/ss_fping.php 123.123.123.123 20 ICMP , output: U
DEBUG: MySQL Insert ID '59': 'INSERT INTO poller_output (local_data_id, rrd_name, time, output) VALUES (184,'','2006-12-19 12:44:08','roundtrip:U packetloss:1
00'),(188,'','2006-12-19 12:44:08','U'),(185,'ping','2006-12-19 12:44:08','44.404'),(187,'','2006-12-19 12:44:08','U'),(186,'','2006-12-19 12:44:08','U')'
DEBUG: MySQL Insert ID '59': OK
Host[36] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
DEBUG: The Value of Active Threads is 0
DEBUG: Valid Thread to be Created
DEBUG: The Value of Active Threads is 1
DEBUG: In Poller, About to Start Polling of Host
MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
MYSQL: Connected to MySQL database 'cacti' on 'localhost'...
<...>
I have 4 ping templates (Advanced ping, Multiping, SmoleLike, Ping Latency), and only Ping Latency work.
FreeBSD 6.1-RELEASE FreeBSD 6.1-RELEASE
cacti-0.8.6i Web-driven graphing interface for RRDTool
cactid-0.8.6.g A multithreaded poller for Cacti written in C
php5-5.1.6_3 PHP Scripting Language (Apache Module and CLI)
php5-bz2-5.1.6_3 The bz2 shared extension for php
php5-gd-5.1.6_3 The gd shared extension for php
php5-mbstring-5.1.6_3 The mbstring shared extension for php
php5-mcrypt-5.1.6_3 The mcrypt shared extension for php
php5-mysql-5.1.6_3 The mysql shared extension for php
php5-openssl-5.1.6_3 The openssl shared extension for php
php5-pcre-5.1.6_3 The pcre shared extension for php
php5-session-5.1.6_3 The session shared extension for php
php5-snmp-5.1.6_3 The snmp shared extension for php
php5-xml-5.1.6_3 The xml shared extension for php
php5-zlib-5.1.6_3 The zlib shared extension for php
rrdtool-1.2.15 Round Robin Database Tools
root@stat> ping 123.123.123.123 < /usr/local/share/cacti/scripts >
PING 123.123.123.123 (123.123.123.123): 56 data bytes
64 bytes from 123.123.123.123: icmp_seq=0 ttl=255 time=0.328 ms
64 bytes from 123.123.123.123: icmp_seq=1 ttl=255 time=0.313 ms
64 bytes from 123.123.123.123: icmp_seq=2 ttl=255 time=0.293 ms
^C
--- 123.123.123.123 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.293/0.311/0.328/0.014 ms
root@stat> php /usr/local/share/cacti/script_server.php < /usr/local/share/cacti/scripts >
PHP Script Server has Started - Parent is cmd
ss_fping.php ss_fping 123.123.123.123 20 ICMP
min:0.0000 avg:0.0000 max:0.0000 dev:0.0000 loss:0.0000
root@stat> php ss_fping.php 123.123.123.123 ICMP < /usr/local/share/cacti/scripts >
Notice: Undefined index: snmp_community in /usr/local/share/cacti/lib/ping.php on line 537
Notice: Undefined index: snmp_community in /usr/local/share/cacti/lib/ping.php on line 537
root@stat> php ss_fping.php 123.123.123.123 ICMP < /usr/local/share/cacti/scripts >
Notice: Undefined index: snmp_community in /usr/local/share/cacti/lib/ping.php on line 537
root@stat> < /usr/local/share/cacti/scripts >
root@stat> cactid --verbosity=5 -S
<...>
DEBUG: MySQL Query ID '109': OK
Host[36] DEBUG: The POPEN returned the following File Descriptor 26
Host[36] DS[184] SCRIPT: perl /usr/local/bin/ping_latency.pl 123.123.123.123, output: roundtrip:U packetloss:100
Host[36] DEBUG: The POPEN returned the following File Descriptor 26
Host[36] ERROR: The POPEN timed out
Host[36] DS[188] WARNING: Result from SCRIPT not valid. Partial Result: ...
Host[36] DS[188] SCRIPT: perl /usr/local/share/cacti/scripts/multi_ping.pl, output: U
Host[36] DEBUG: The POPEN returned the following File Descriptor 26
Host[36] DS[185] SCRIPT: perl /usr/local/share/cacti/scripts/ping.pl 123.123.123.123, output: 44.404
Host[36] DEBUG: The POPEN returned the following File Descriptor 26
Host[36] DS[187] WARNING: Result from SCRIPT not valid. Partial Result:
Notice: Undefined i...
Host[36] DS[187] SCRIPT: php /usr/local/share/cacti/scripts/ss_fping.php 123.123.123.123 20 ICMP , output: U
Host[36] DEBUG: The POPEN returned the following File Descriptor 26
Host[36] DS[186] WARNING: Result from SCRIPT not valid. Partial Result:
Notice: Undefined i...
Host[36] DS[186] SCRIPT: php /usr/local/share/cacti/scripts/ss_fping.php 123.123.123.123 20 ICMP , output: U
DEBUG: MySQL Insert ID '59': 'INSERT INTO poller_output (local_data_id, rrd_name, time, output) VALUES (184,'','2006-12-19 12:44:08','roundtrip:U packetloss:1
00'),(188,'','2006-12-19 12:44:08','U'),(185,'ping','2006-12-19 12:44:08','44.404'),(187,'','2006-12-19 12:44:08','U'),(186,'','2006-12-19 12:44:08','U')'
DEBUG: MySQL Insert ID '59': OK
Host[36] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
DEBUG: The Value of Active Threads is 0
DEBUG: Valid Thread to be Created
DEBUG: The Value of Active Threads is 1
DEBUG: In Poller, About to Start Polling of Host
MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
MYSQL: Connected to MySQL database 'cacti' on 'localhost'...
<...>
I have the same problem on solaris9:
# /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
# /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
Anyone can help?
# /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
# /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
Anyone can help?
Who is online
Users browsing this forum: No registered users and 1 guest