Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Dec 17, 2018 5:24 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 524 posts ]  Go to page Previous  1 ... 13, 14, 15, 16, 17, 18, 19 ... 35  Next
Author Message
 Post subject:
PostPosted: Mon Nov 20, 2006 4:48 am 
Offline
Cacti User

Joined: Fri Aug 18, 2006 11:22 am
Posts: 103
Location: MSK, RU
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


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.


Top
 Profile  
 
 Post subject: php problem?
PostPosted: Sat Nov 25, 2006 4:10 pm 
Offline

Joined: Sat Nov 25, 2006 3:57 pm
Posts: 6
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


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 25, 2006 4:25 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
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

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 25, 2006 4:31 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
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
Code:
--- 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);

I've only added some U outputs.

Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 25, 2006 4:57 pm 
Offline

Joined: Sat Nov 25, 2006 3:57 pm
Posts: 6
gandalf wrote:
The script server should do so as default.


well, in my case it seems not doing that.... :(
the logs says that:
WARNING: Result from SERVER not valid. Partial Result: Content-type: text/h

... I have php-4.3.8 and cacti-0.8.6i


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 25, 2006 4:58 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
So did you try the link I advertised? Please post the results of those tests
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 25, 2006 5:09 pm 
Offline

Joined: Sat Nov 25, 2006 3:57 pm
Posts: 6
gandalf wrote:
So did you try the link I advertised? Please post the results of those tests


Yes I already try, as root.

Code:
#php /var/www/cacti/script_server.php
PHP Script Server has Started - Parent is cmd


Here I put /var/www/cacti/scripts/ss_fping.php ss_fping 192.168.1.1 20 ICMP

Then I get:

Code:
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


Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 26, 2006 6:44 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
You should run it as cactiuser, the user who runs the poller from cron. Then you'll see, that ICMP ping requires root or setuid root
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 26, 2006 5:34 pm 
Offline

Joined: Sat Nov 25, 2006 3:57 pm
Posts: 6
gandalf wrote:
You should run it as cactiuser, the user who runs the poller from cron. Then you'll see, that ICMP ping requires root or setuid root
Reinhard


The problem is the http header printed by php, not the icmp or udp method... btw running it as cactiuser give me headers.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 5:04 am 
Offline

Joined: Sat Nov 25, 2006 3:57 pm
Posts: 6
Sorry, I renew the question:
where is the problem if in cacti logs I can find these lines?

Code:
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


Top
 Profile  
 
 Post subject: Help Please
PostPosted: Tue Dec 05, 2006 11:03 pm 
Offline

Joined: Tue Dec 05, 2006 10:34 pm
Posts: 6
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


Top
 Profile  
 
 Post subject: Re: Help Please
PostPosted: Tue Dec 05, 2006 11:08 pm 
Offline

Joined: Tue Dec 05, 2006 10:34 pm
Posts: 6
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


Nevermind figured it out.


Top
 Profile  
 
 Post subject: no data
PostPosted: Tue Dec 12, 2006 1:55 am 
Offline

Joined: Tue Dec 12, 2006 1:54 am
Posts: 2
i get no data at all..

no idea why i do have a graph but nothin in it..

anyway to debug ? i get 0's for all data
using i version etc.

RRDtool 1.0.49


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 12, 2006 2:18 am 
Offline

Joined: Tue Dec 12, 2006 2:08 am
Posts: 1
i get no data too... :roll:

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



[email protected]> 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


[email protected]> 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



[email protected]> 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

[email protected]> 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
[email protected]> < /usr/local/share/cacti/scripts >


[email protected]> 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'...


<...>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 29, 2006 12:01 pm 
Offline

Joined: Sun Dec 25, 2005 9:02 pm
Posts: 42
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 524 posts ]  Go to page Previous  1 ... 13, 14, 15, 16, 17, 18, 19 ... 35  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group