Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri May 24, 2019 6:28 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 527 posts ]  Go to page Previous  1 ... 25, 26, 27, 28, 29, 30, 31 ... 36  Next
Author Message
 Post subject:
PostPosted: Wed Apr 22, 2009 5:24 pm 
Offline
Cacti User

Joined: Wed Apr 08, 2009 12:24 pm
Posts: 52
I am getting some wierd poller issues.

Basically, I have the most recent version.

1) I added the LAST on my RRA's as a default
2) I added the missing include global.php in ss_fping.php

For alot of hosts----- its working great. But every once and a while I am getting some wierd poller issues. SEE IMAGE.

My poller is starting to run out of time too...... its maxing out at 298 seconds for example.


Attachments:
ScreenHunter_04 Apr. 22 14.48.gif
ScreenHunter_04 Apr. 22 14.48.gif [ 22.91 KiB | Viewed 26141 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 03, 2009 7:39 pm 
Offline
Cacti User

Joined: Tue Mar 31, 2009 10:05 am
Posts: 278
Trying to get this running on .8.7d, and I get this when I run the command from the poller:

PHP Fatal error: Call to undefined function read_config_option() in /usr/local/cacti-0.8.7b/scripts/ss_fping.php on line 38

PHP is installed and running fine as we have other PHP scripts that are working. Any suggestions? This is on SLES 10 SP2 with PHP 5.2.5.


Top
 Profile  
 
 Post subject: Graphs empty
PostPosted: Fri Aug 14, 2009 5:50 am 
Offline

Joined: Thu Aug 13, 2009 5:38 am
Posts: 2
I'm install Advanced Ping on my cacti but my Graphics is empty and latency is NAN. What's wrong? Please, help.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 15, 2009 7:36 am 
Offline

Joined: Mon Jun 13, 2005 1:10 pm
Posts: 43
on 0.8.7e I imported this and get this error in debug mode of the graph:

ERROR: the RRD does not contain an RRA matching the chosen CF


I can't figure out what CF is missing. Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 23, 2009 5:15 am 
Offline

Joined: Fri Oct 10, 2008 5:20 am
Posts: 4
Location: Italy
Hello,

this are the new templates for cacti version 0.8.7 as there some basic things changed and old scripts and templates won't work anymore :-?

As andreagabellini told us in his post (thanks for your explanation) on new installation MIN and LAST CF's are not created by default. As the Graph-Template used this CF's you got error on creating the Graph.

I include in this post the new version of ss_fping.php (including now the requested global.php instead of the config.php) and the modified Graphtemplate which now does *not* use LAST and MIN but only AVERAGE and MAX.

Hope this works again for all of you.

Have fun,

Jug


Attachments:
File comment: Modified php file ss_fping.php which now includes global.php instead of config.php. Unzip this and put it into the scripts directory of your installation.
ss_fping.zip [1.56 KiB]
Downloaded 5808 times
File comment: Cacti Template for Advanced PING for cacti version 0.8.7. Import this from your cacti web frontend.
cacti_graph_template_ping_advanced_ping_v2_2.xml [42.42 KiB]
Downloaded 7559 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 01, 2009 2:03 pm 
Offline

Joined: Mon Jun 13, 2005 1:10 pm
Posts: 43
Just wanted to let you know I installed 2.2 and it works fine with 0.8.7e for me. Thanks!


Top
 Profile  
 
 Post subject: Ping and Adv Ping side by side?
PostPosted: Wed Oct 07, 2009 11:24 am 
Offline

Joined: Thu Jun 11, 2009 9:28 am
Posts: 35
Hello....

Can we use both Ping and Adv Ping on the same box? When I try, all my normal ping graphs will stop working and Adv Ping will start working. I would love to have both without having to blow away my ping graph everytime I try Adv Ping.


Jason


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 20, 2009 3:53 am 
Offline
Cacti User
User avatar

Joined: Wed Jul 20, 2005 10:48 am
Posts: 165
Location: UK - Cambridge
srossen wrote:
Just wanted to let you know I installed 2.2 and it works fine with 0.8.7e for me. Thanks!


Same here - upgraded from 0.8.7d > 0.9.7e and PA 2.5 and all working well, thanks :)

_________________
---- lard007skype ----


Top
 Profile  
 
 Post subject: Can adding a function, " bind a local ip "
PostPosted: Fri Dec 04, 2009 10:34 pm 
Offline

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

can adding one function . can be bind a local IP ..

if cacti pc have multiple ip . can be assing one ip to ping ...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 01, 2010 7:51 pm 
Offline
User avatar

Joined: Tue Feb 19, 2008 9:57 pm
Posts: 27
Location: Silicon Valley, USA
Hmm....seems to run just fine from Script Server, but my graphs always show 100% packet loss.

I'm running Cacti 0.8.7e


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 01, 2010 7:57 pm 
Offline
User avatar

Joined: Tue Feb 19, 2008 9:57 pm
Posts: 27
Location: Silicon Valley, USA
Script Server output looks good:

Code:
> php /home/cacti/script_server.php
PHP Script Server has Started - Parent is cmd
/home/cacti/scripts/ss_fping.php ss_fping myrouter.example.com 10 ICMP
min:27.7970 avg:29.8557 max:34.0310 dev:1.6493 loss:0.0000


But graph shows 100% packet loss


Attachments:
graph_image.php.png
graph_image.php.png [ 5.56 KiB | Viewed 21698 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 02, 2010 2:25 pm 
Offline
User avatar

Joined: Tue Feb 19, 2008 9:57 pm
Posts: 27
Location: Silicon Valley, USA
Hmm...so I tried switching to UDP and TCP ping rather than ICMP. UDP showed a 60% packet loss, but TCP worked just great.

It's still a mystery why it worked just fine from the CLI. My guess is it was some type of network I/O issue, and ICMP and UDP ping had problems when run at the same as Cacti polling.


Attachments:
graph_image.php.png
graph_image.php.png [ 6.17 KiB | Viewed 21643 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 09, 2010 3:43 am 
Offline

Joined: Tue Mar 09, 2010 3:38 am
Posts: 1
hi!
If I want to monitor multi ports in one host,
can Advanced Ping do this?How?


Top
 Profile  
 
 Post subject: problem with ICMP. Please help me
PostPosted: Wed Mar 24, 2010 12:06 pm 
Offline
Cacti User
User avatar

Joined: Thu May 03, 2007 3:17 pm
Posts: 244
Location: Italy
giulioharding wrote:
TheWitness wrote:
If you are running UNIX, the script_server has to have rights to create a RAW socket (aka root or asroot). Otherwise use something like "TCP 80" or something similar. Windows does not care.

TheWitness



I noticed that a lot of people have had this 'Operation not permitted' problem using ICMP pings on Linux - I've had the same problem, and despite a lot of research, couldn't find any suggestions on how to fix it.

The issue, in my case, is that the gateway I wish to ping, to monitor our internet link, only responds to ICMP pings - there are no TCP/UDP ports open for me to use, so that rules out using those protocols as a work-around. I need ICMP, therefore, cacti needs elevated priveleges somehow.

I don't want to run cacti in it's entirety as root, so in the absence of any other ideas, or knowledge of the cacti script mechanism, or PHP, I hacked up a little modification to the ss_fping.php script, using sudo to give it elevated privileges :)

It's ugly, but it works - in case anyone else might find this handy, here's the summary of the changes I made: (Cacti 0.8.6g, up-to-date Fedora Core 4 install)

1.) Install sudo if you haven't got it already, and add the following lines to /etc/sudoers: (you may need to change 'cacti' to whatever user is running the poller)

# Allow cacti user to run ping script with elevated privileges (so it can send ICMP pings)
cacti ALL=NOPASSWD: /usr/bin/php /var/www/cacti/scripts/ss_fping_exec.php [0-9a-zA-Z]*

2.) Rename ss_fping.php to ss_fping_exec.php

3.) Create a new ss_fping.php with the following code snippet (ripped from ss_fping.php) - change the ''/var/www/cacti/" reference to match the path to your cacti installation.

<?php
#!/usr/bin/php -q

//STANDARD SCRIPT SERVER HEADER!!!
$no_http_headers = true;

/* display No errors */
error_reporting(E_ERROR);

if (!isset($called_by_script_server)) {
array_shift($_SERVER["argv"]);
print call_user_func_array("ss_fping", $_SERVER["argv"]);
}
//End header.

function ss_fping($hostname, $ping_sweeps=6, $ping_type="ICMP", $port=80) {
return exec('sudo /usr/bin/php /var/www/cacti/scripts/ss_fping_exec.php '.$hostname.' '.$ping_sweeps.' '.$ping_type.' '.$port);
}
?>

4.) That's it! (I think :) The ss_fping.php wrapper script should now invoke the real ss_fping script using sudo, without requiring a password, allowing ICMP pings to be sent without running anything else as root.

This isn't ideal, from a security point of view (I haven't looked over the ss_fping script to see if the root privileges could be exploited somehow by passing bogus parameter values), but it works, so I'm happy enough :)

If anyone wants to make any suggestions, or point out some horrid mistake I've made, please do so!


guys.

I have implemented this workaround.

All is working through cli, with root and cacti user.

The problem is that from Cacti the output is this.

03/24/2010 06:00:13 PM - CMDPHP: Poller[0] Host[1329] DS[253] SERVER: /var/www/cacti/scripts/ss_fping.php ss_fping ixlfsMICES01 20 ICMP , output: U

The path of the data input is the original of the template.

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

The graphs are not updated, like rra of each graphs.

The version of my cacti is 0.87d.

I have tried to import the last xml 2.2 .. but i obtain this error :

Error: XML: Hash version does not exist.

please help me
zorro


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 20, 2010 11:41 am 
Offline

Joined: Fri Mar 25, 2005 3:05 am
Posts: 29
Johnny Lingo wrote:
Script Server output looks good:

Code:
> php /home/cacti/script_server.php
PHP Script Server has Started - Parent is cmd
/home/cacti/scripts/ss_fping.php ss_fping myrouter.example.com 10 ICMP
min:27.7970 avg:29.8557 max:34.0310 dev:1.6493 loss:0.0000


But graph shows 100% packet loss


The same problem here. Works fine from command line:
% sudo -u cacti -s
> php ss_fping.php myhost 10 ICMP
min:1.3740 avg:1.5888 max:1.6370 dev:0.0961 loss:0.0000>

But draws 100% loss.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 527 posts ]  Go to page Previous  1 ... 25, 26, 27, 28, 29, 30, 31 ... 36  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 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:  
cron

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