EDIT: Advanced Ping Template Version 1.3 for Cacti 0.8.6g

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
fairlylarge
Posts: 3
Joined: Wed Aug 08, 2007 6:53 am

Post by fairlylarge »

I've tracked the issue down to the following file:

lib/rrd.php

lines 853-855:

Code: Select all

if (($field_array["process_no_legend"] == false) && (isset($graph_data_array["graph_nolegend"]))) {
continue; 
}
I've basically commented these lines out and it seems to fix the problem. I can't see any nasty side-effects from this but I could be wrong! :roll:
aleu
Cacti User
Posts: 216
Joined: Mon Dec 11, 2006 10:17 am

Post by aleu »

Hmm, something does not look right to me. Do you guys get similar graphs to the one that I have included below? How can I read this graph? What do different shaded colors mean? What is the meaning of the "real" colors (red, blue, green etc.) Should not there be a color associated with the "unknown" word? Can somebody explain this to me?

Thanks
Attachments
data.png
data.png (25.85 KiB) Viewed 11074 times
NWA Cacti Admin
Posts: 24
Joined: Mon Nov 20, 2006 7:25 pm
Location: Oregon, USA

Advanced Ping Display Problem

Post by NWA Cacti Admin »

Hello,

We have a problem where our Advanced Ping graphs do not display on the top level graph pages (see attachment for how they look under both Firefox and Internet Explorer).

However, clicking on any of these brings up the detailed view (with the day, week, month, year) and these come up just fine. So we are getting data, it displays correctly on the detailed pages but not the summary page. Whatever our problem is, it only affects the Advanved Ping graphs. All other graphs work just fine.

We are using Advanced Ping to test the response time of all the Windows servers on our internal network so having the top level views is important so we can get an overview of the network on a single page.

We are running Cacti 0.8.6j on a Fedora Server. As far as I know we are current on all patches. Note: this problem existed prior to installing the Threshold plug-in.

Any ideas?

Thanks.
Attachments
Display Problem on Firefox and IE
Display Problem on Firefox and IE
image001.jpg (44.38 KiB) Viewed 11034 times
fairlylarge
Posts: 3
Joined: Wed Aug 08, 2007 6:53 am

Post by fairlylarge »

Try the fix I posted since I had the same issues and this seems to have resolved the problem without any nasty side effects.
NWA Cacti Admin
Posts: 24
Joined: Mon Nov 20, 2006 7:25 pm
Location: Oregon, USA

Post by NWA Cacti Admin »

Thanks fairlylarge. I saw your post but thought it referred to something else. Odd that no one else appears to be having the same problem... :-?
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

Could sombody please post some nice install steps.

Post by chrisgapske »

This would include how to setup this up so that you can allow the ICMP to work.

I have
*/5 * * * * root php /var/www/html/cacti/poller.php > /dev/null 2>&1

This does not help me. I am not how to set my socket permissions. I have seen over 20 times in this thread where people have asked for this and the topic gets overlooked. I am sure there are many people out there doing UDP or TCP pings when they want to be doing ICMP pings.

I am not awear of how to set the socket permissions but sombody out there must be.

Please help the humble ones that need the help.

I still get this error and I have no idea how to fix it. I have read this thread front to back and back to front again.

09/17/2007 04:46:06 PM - CMDPHP: Poller[0] Host[125] DS[1090] SERVER: /var/www/html/scripts/ss_fping.php ss_fping 192.168.30.2 20 ICMP , output: loss:100.00
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

OK I am still getting problems.

Post by chrisgapske »

Resolved issue.
eddievenus
Cacti User
Posts: 60
Joined: Mon Jul 18, 2005 7:01 pm

Re: OK I am still getting problems.

Post by eddievenus »

chrisgapske wrote:Resolved issue.
how did you resolve it exactly? I am curious to know.

I had this working just fine on CactiEZ0.1 (and CactiEZ0.2 beta)where I could do ICMP pings while running the cronjob as apache. However once I upgraded to CactiEZ0.2 (not beta) and then upgraded to Cacti 8.6j, I can not longer do ICMP pings.

I still have other Cacti installs out there running the older CactiEZs and happily ICMP pinging while running the cronjob under apache.

I would like to know what change you made to enable ICMP pings while running the cronjob as the non root user.

Eddievenus
eddievenus
Cacti User
Posts: 60
Joined: Mon Jul 18, 2005 7:01 pm

Post by eddievenus »

Ok so it turns out that I did not have this script running under apache after all, I had another ping script based on a different ping script, I simply modified it to resemble what I modified the Advanced Ping 1.3 graphs to look like. I forgot that it was the older ping template I was seeing on those other Cacti boxes.

Please disregard the references to running ICMP pings under Apache successfully.

For now I am running the cron jobs as root until I can find a way to have the ICMP pings work under apache.
ryusez
Posts: 25
Joined: Thu Sep 28, 2006 9:36 pm

Post by ryusez »

i can't found the advance ping in the cacti 0.8.7 beta4

can i use import to 0.8.7
inzeos
Posts: 13
Joined: Wed Aug 15, 2007 9:46 am

Post by inzeos »

aleu wrote:How can I read this graph? What do different shaded colors mean? What is the meaning of the "real" colors (red, blue, green etc.) Should not there be a color associated with the "unknown" word? Can somebody explain this to me?
Hi,

I'm wondering if anyone has answered this post or if there is another thread explaining how to properly interpret this graph?

What is the Dev statistic represent on the legend?

Are the shades of gray showing the range of latency for that time period? the bottom being the min and the top being max latency measured?

Will the colored legend values only show up in a situation where you are actually dropping pockets to that device?
Attachments
Here is an example of what the graph looks like for my initial test.
Here is an example of what the graph looks like for my initial test.
advanced-ping.png (24.59 KiB) Viewed 10318 times
inzeos
Posts: 13
Joined: Wed Aug 15, 2007 9:46 am

Post by inzeos »

I believe I have answered one of my questions, which was the use of colors in the graph to depict loss. However, the other questions I would appreciate feedback on.

Attached is an example graph showing loss, which may be useful for others to see;
Attachments
Shows usage of color coded loss.
Shows usage of color coded loss.
advanced-ping-2.png (30.01 KiB) Viewed 10316 times
nemako
Posts: 1
Joined: Thu Oct 04, 2007 11:28 am

Post by nemako »

giulioharding wrote:
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]*

Hi all,

The simplest way I find to continue to use the cactiuser for the poller is to modify the cmd.php file.

1. Add the following line in /etc/sudoers. Note that it is recommanded to use visudo to edit it:
cactiuser ALL=NOPASSWD: /usr/bin/php

2. Then modify the cmd.php file line 130 as following. I just add the sudo word before read_config_option.
$cactiphp = proc_open("sudo ".read_config_option("path_php_binary") . " -q " . $config["base_path"] . "/script_server.php cmd", $cactides, $pipes);


I now it's a bit awfull, but it is the only php script I used so....

Now everything works well under cactiuser :)

++
Sarlok
Posts: 2
Joined: Fri Sep 22, 2006 9:01 pm

Post by Sarlok »

inzeos wrote:I believe I have answered one of my questions, which was the use of colors in the graph to depict loss. However, the other questions I would appreciate feedback on.

Attached is an example graph showing loss, which may be useful for others to see;
The faint green line represents minimum latency for the polled duration. The shaded grey peaks represent the difference between the minimum and maximum latency seen for the poll's duration.
Let's take your graph with the loss as an example.
For the 13:00 to 13:05 poll period, looks great - A flatline of about 75ms
For 13:05 to 13:10, we saw a minimum of about 105ms, a maximum of about 390ms, and between 6-10% packet loss.
Hope that helps.
User avatar
Levente
Posts: 5
Joined: Mon Jan 09, 2006 3:09 am
Location: Resita - ROMANIA
Contact:

Post by Levente »

Hi,

I was just wondering if I can set the graph name automatically to something like this.

The Default graph title is: |host_description| - Advanced Ping

I would like to change it to something like: |host_description| - <IP to ping> - <Ping type ICMP,UDP> - <Number of pings> - Advanced Ping

So, <IP to ping>, <Ping type ICMP,UDP,TCP>, <Number of pings>, are all variables that I use when I create each graph. Is there any way that I can use them in each graph title except manually adding them?

Short version:

Before

Graph title -> Advance Ping Host - Advanced Ping


After

Graph title -> Advance Ping Host - 12.34.56.78 - ICMP - 20 - Advanced Ping


Can I do that ?

I hope I made myself clear.

Thank you.
FreeBSD 6.2 | PHP 5.2.3 (cli) | MySQL 5.0.45 | Apache/2.2.4 | gcc 3.4.6 | RRDtool 1.2.23 | cacti-0.8.6i

[url=http://airguns.ro/]Air Guns - Air Rifles - Pellets - Optics - Accessories[/url]
[url=http://www.cartea-albastra.com/]Cartea Albastra - Cartea de Telefoane si Coduri Postale[/url]
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest