Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon May 27, 2019 12:15 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 527 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12, 13 ... 36  Next
Author Message
 Post subject:
PostPosted: Fri Mar 03, 2006 5:43 am 
Offline

Joined: Thu Mar 02, 2006 7:15 am
Posts: 13
Location: Warsaw, Poland
I like this advanced ping graph template very much, but as I understand
by the way it works it measures ping latency to the host being monitored.

What I'd like to do is to graph ping latency from host being monitored
to machine X
(lets say google.com), preferably fetched by SNMP.
How to achive that?

My current idea is to:
1. write a shell script that pings X and returns 5 vaules
2. add this script command as exec into snmpd.conf of monitored host
3. exec will put ping results into ucd mib
4. creade 5 new DS in cacti for that oids
5. bind that DS to advanced ping tempate 1.3 :D

WDYF?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 9:43 am 
Offline

Joined: Mon Mar 13, 2006 9:32 am
Posts: 5
I'm having the same issue as nerdtalker. I've upgraded cacti and cactid from the previous to the latest version (0.8.6g to h and f to g respectively) and suddenly the graphs started to report 100% packet loss on all devices.

I've tried running the ss_fping.php command through the script server:

Code:
# php script_server.php
PHP Script Server has Started - Parent is cmd
/var/www/html/cacti/scripts/ss_fping.php ss_fping db1 20 ICMP
min:0.1700 avg:0.1845 max:0.2300 dev:0.0140 loss:0.0000


values match my classic unix ping and there's no packet loss. the graphs however still show 100% packet loss. I've increased the poller logging level to medium and checked the logfile:

Code:
03/13/2006 03:35:03 PM - CACTID: Poller[0] Host[43] DS[311] SS[0] SERVER: /var/www/html/cacti/scripts/ss_fping.php ss_fping db1 20 ICMP, output: min:0.1700 avg:0.1860 max:0.2400 dev:0.0177 loss:0.0000


I don't see any obvious errors in the log. I've never seen this behavior until I upgraded cacti this morning.

Running RHEL3, rrdtool 1.0.x, net-snmp 5.0.x. I used the SRPMS and rebuilt them myself (rpmbuild --rebuild).

Any help would be appreciated


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 15, 2006 2:19 pm 
Offline

Joined: Mon Mar 13, 2006 9:39 am
Posts: 11
TomekN wrote:
I like this advanced ping graph template very much, but as I understand
by the way it works it measures ping latency to the host being monitored.

What I'd like to do is to graph ping latency from host being monitored
to machine X
(lets say google.com), preferably fetched by SNMP.
How to achive that?

My current idea is to:
1. write a shell script that pings X and returns 5 vaules
2. add this script command as exec into snmpd.conf of monitored host
3. exec will put ping results into ucd mib
4. creade 5 new DS in cacti for that oids
5. bind that DS to advanced ping tempate 1.3 :D

WDYF?


I'm not sure how that would differ from having a ping running from your management station (cacti) to each of the devices then a single ping to "google.com" just place you management station close to the perimeter of your network, frees up a few extra bps for your wan link and gives google a break :)

I am assuming you would be better to monitor the individual devices latency across your network rather than that of the Internet which would be the same from any device, besides wouldn't the graph always show the weakest point which would be out in the wilds of the Internet..


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 15, 2006 7:28 pm 
Offline
Cacti User

Joined: Fri Oct 10, 2003 7:23 am
Posts: 91
I have a small issue with this script. I get the following poller error:

Quote:
03/16/2006 01:22:34 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/kn2z12r_loss_89.rrd --template 1142468552:U
ERROR: Not enough arguments


But if I run the script as root it works fine (exactly what I find i the poller cache):

Quote:
php /usr/share/cacti/scripts/ss_fping.php kn2-z12r.stokab.net 20
min:0.7300 avg:1.1875 max:1.5400 dev:0.1732 loss:0.0000


Update: It seems to be related to the ss_fping in the "Input String":
<path_cacti>/scripts/ss_fping.php ss_fping <hostname> <attempts> <protocol> <port>

If I try with it looking like above it works, I get the graph, but with 100% loss. (same running the script as root, 100% lost). When I take out the ss_fping I get good results running the script as root, but the poller says "Not enough arguments" in debug mode and I get no graph.

running the script as the Input String in the scriptserver (as root) works fine, but not when I run the scriptserver as cactiuser (100% loss).

Permission problem? Where? :)

/Carl


Top
 Profile  
 
 Post subject: Beginning Troubleshooting Pointer?
PostPosted: Fri Mar 17, 2006 1:34 pm 
Offline

Joined: Thu Jan 05, 2006 5:52 pm
Posts: 24
I have the latest version of everything for Advanced Ping Template 1.3 downloaded and I get nan for everything. I use Cactid and cronjob is run by root. I read some things I thought would fix it, but then I didn't have time (this was some time ago) and now I can't remember what they were or find them again. It could most certainly be very simple and I would apprecaite a pointer to step-bysstep installation instructions along with a pointer to step-by-step troubleshooting instructions for the most typical problems (if such instructions exist). I know all the info is here somewhere, but I suck with keywords. TIA


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 20, 2006 3:24 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5311
Location: United Kingdom
Is there some actual technical reason why the Advanced Ping template creates it's own ping packets rather than using an existing (SUID root) ping program like fping? I can see why you wouldn't use the system's ping command because the output varies greatly, but fping was specifically designed for this type of thing, and can even parallelise the pings to multiple hosts.

As I see it, if you have a device that only responds to 'real' pings, like the WAN side of some DSL routers, then UDP/TCP pings don't help, sadly.

_________________
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)


Top
 Profile  
 
 Post subject: hostname tcp:192.168.1.1
PostPosted: Thu Mar 23, 2006 7:16 am 
Offline

Joined: Mon Oct 27, 2003 9:13 am
Posts: 24
Location: Germany, Potsdam
Hallo,

if that hostname like tcp:192.168.1.1 the script ss_fping.php not work correct.
That patch solve this problem.

bye uk


Attachments:
ss_fping.php.zip [409 Bytes]
Downloaded 670 times
Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 28, 2006 1:52 pm 
Offline

Joined: Sun Mar 19, 2006 11:04 am
Posts: 14
Location: Norway
Heya.

Im a bit stuck with this addon.

Some info on my setup:

Webserver: IIS 6.0
Cacti: 0.8.6h
Cactid:0.8.6g
MySQL: 4.1.18
PHP: 5.1.2
RRDTool: 1.2 Cygwin zip
Net-SNMP: 5.3.0.1-1

Basicly the script works excelent in CLI but Cacti doesnt want to update the rrd file.
I have tried using it against an already monitored cisco router and a local computer.
Both ICMP and TCP gives same result wich is:

Code:
03/28/2006 08:38:05 PM - CACTID: Poller[0] Host[28] DS[139] SS[0] SERVER: /Cacti/scripts/ss_fping.php ss_fping 10.6.1.207 20 ICMP, output: U 
03/28/2006 08:38:05 PM - CACTID: Poller[0] Host[28] DS[139] SS[0] WARNING: Result from SERVER not valid. Partial Result: ... 

Manual entry gives this:

Code:
Cacti\scripts>php ss_fping.php 10.6.1.207 20 ICMP
min:0.7300 avg:0.9125 max:1.3900 dev:0.1322 loss:0.0000


I dont have any problems with traffic monitoring of hosts if that helps.

_________________
Regards


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 06, 2006 8:08 am 
Offline

Joined: Sun Mar 19, 2006 11:04 am
Posts: 14
Location: Norway
OK, I have tried everything I coud come up with now and I just cant seem to get cactid to work with this script.

Manually I get expected result from cmd line and the script server, if I change to Script/Command instead and modify the armgument thereafter i get the "Not enough arguments" instead.

Cant find any permission issues in Filemon in any case either.

cmd.php works fine though, but uses like twise the time of cactid and im getting nasty close to a new run when the last finished so I cant add more data sources until I get this issue resolved :(

Any ideas anyone?

_________________
Regards


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 07, 2006 11:09 pm 
Offline

Joined: Fri Apr 07, 2006 11:07 pm
Posts: 7
TheWitness wrote:
Please debug the script server from the command line:

a) Start the Script Server

cd <cacti_root>
php script_server

b) Obtain the script line from the poller cache

System Utilities->View Poller Cache
Search for "Action: 2" that contains the ss_fping.php line

c) Run from the script server

Paste the entire line ending in "TCP 80" into the script server window and hit <CR>

d) Quit the script server

quit <CR>

Post the output.

TheWitness


I had the same issue and below is my output -

[[email protected] rra]# /usr/local/php/bin/php ../script_server.php
PHP Script Server has Started - Parent is cmd
/usr/local/apache/htdocs/cacti/scripts/ss_fping.php ss_fping 127.0.0.1 20 80
->refused->refused->refused->refused->refused->refused->refused->refused->refused->refused->refused->refused->refused->refused->refused->refused->refused->refused->refused->refusedmin:0.0400 avg:0.0475 max:0.1100 dev:0.0151 loss:0.0000


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 08, 2006 5:25 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
parameters supplied are wrong. This should look like
Code:
ss_fping.php ss_fping <target> 20 TCP 80
for "pinging" against TCP Port 80
Reinhard

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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 10, 2006 1:36 am 
Offline

Joined: Fri Apr 07, 2006 11:07 pm
Posts: 7
lvm wrote:
parameters supplied are wrong. This should look like
Code:
ss_fping.php ss_fping <target> 20 TCP 80
for "pinging" against TCP Port 80
Reinhard


Thanks. It works:

Code:
[[email protected] cacti]# /usr/local/bin/php script_server.php
PHP Script Server has Started - Parent is cmd
/usr/local/apache/htdocs/cacti/scripts/ss_fping.php ss_fping 127.0.0.1 20 TCP 80
min:0.3800 avg:0.6170 max:2.6000 dev:0.4702 loss:0.0000
quit
PHP Script Server Shutdown request received, exiting


But for ICMP, i still get the RED graphic showing 100% loss.


Attachments:
untitled.JPG
untitled.JPG [ 29.47 KiB | Viewed 8469 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 10, 2006 8:05 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
ICMP Ping required root permissions. Personally, I don't recommend running the poller as root. AFAIK, latest cactid from svn should supply some workaround for that. But I haven't tried this yet
Reinhard

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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 10, 2006 8:26 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5311
Location: United Kingdom
lvm wrote:
ICMP Ping required root permissions. Personally, I don't recommend running the poller as root. AFAIK, latest cactid from svn should supply some workaround for that. But I haven't tried this yet
Reinhard


If I get any spare time, I am hoping to make a patch to use an external ping program as a workaround for this (on unix using fping). If I ever do have the time, I'll post it here.

_________________
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 11, 2006 8:38 pm 
Offline

Joined: Fri Apr 07, 2006 11:07 pm
Posts: 7
lvm wrote:
ICMP Ping required root permissions. Personally, I don't recommend running the poller as root. AFAIK, latest cactid from svn should supply some workaround for that. But I haven't tried this yet
Reinhard



Thanks so much.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 527 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12, 13 ... 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:  

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