Ping Graph without values

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
jmit
Posts: 13
Joined: Tue Feb 21, 2006 8:39 am

Ping Graph without values

Post by jmit »

Hello,

yesterday I have update my debian cacti maschine from debian 5.0.5 to 6.0.4. During this update also cacti was updated to version 0.8.7g. Every works fine, but only the graphs for ping latency are empty. I can create new graphs for ping latency, but the graph will also show any value.
ping latency.jpg
ping latency.jpg (51.97 KiB) Viewed 1201 times
Thank you very much for help.

Jörg
jmit
Posts: 13
Joined: Tue Feb 21, 2006 8:39 am

Re: Ping Graph without values

Post by jmit »

Hello,

Cacti writes every 5 minutes in the rrd-file for this graph, this file exists in the folder /var/lib/cacti/rra.
All other graphs (errors, non-Unicast, unicast) are correctly displayed, and the rrd-files are in the same folder.
I think the permissions are correct, because other graphs are ok.

Jörg
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Ping Graph without values

Post by paulgevers »

Please inspect the log files, either via the cacti menu's or directly in /var/log/cacti/ and see if there is anything suspicious there.

You can also test if you get a proper answer by running the "ping" script manually.

Code: Select all

perl /usr/share/cacti/site/scripts/ping.pl 127.0.0.1
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
jmit
Posts: 13
Joined: Tue Feb 21, 2006 8:39 am

Re: Ping Graph without values

Post by jmit »

Hello,

I have looked in the cacti log-file in the folder /var/log/cacti, but I have found nothing interestet.

when I start the perl script

Code: Select all

/usr/bin/perl /usr/share/cacti/site/scripts/ping.pl 127.0.0.1
I get no Output.

Code: Select all

debian:/usr/bin# /usr/bin/perl /usr/share/cacti/site/scripts/ping.pl 127.0.0.1
Udebian:/usr/bin#
What means the U ?

Do you have an idea? At this moment I have no idea.

Thank you very much.

Jörg
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Ping Graph without values

Post by paulgevers »

jmit wrote: What means the U ?

Do you have an idea? At this moment I have no idea.
This means that there was no proper output of the ping command.

What do you get if you run:

Code: Select all

ping -c 1 127.0.0.1
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
jmit
Posts: 13
Joined: Tue Feb 21, 2006 8:39 am

Re: Ping Graph without values

Post by jmit »

Hello,

I have solved the problem, but I am not in the office. I will write tomorrow how I have solved the problem.

Jörg
jmit
Posts: 13
Joined: Tue Feb 21, 2006 8:39 am

Re: Ping Graph without values

Post by jmit »

Hello,

I couldn't believe it, but it was e little error in the file ping.pl

The original file was the following:

Code: Select all

#!/usr/bin/perl

# take care for tcp:hostname or TCP:ip@
$host = $ARGV[0];
$host =~ s/tcp:/$1/gis;

open(PROCESS, "ping -c 1 $host | grep icmp_seq | grep time |");
$ping = <PROCESS>;
close(PROCESS);
$ping =~ m/(.*time=)(.*) (ms|usec)/;

if ($2 == "") {
        print "U";              # avoid cacti errors, but do not fake rrdtool stats
}elsif ($3 eq "usec") {
        print $2/1000;  # re-calculate in units of "ms"
}else{
        print $2;
}
The error was in the following line:

Code: Select all

open(PROCESS, "ping -c 1 $host | grep icmp_seq | grep time |");
and the change in this line must be the following

Code: Select all

open(PROCESS, "ping -c 1 $host | grep icmp_req | grep time |");
@paulgevers: Thank you very much for your help

Everything is ok

Thank you very much

Jörg
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Ping Graph without values

Post by gandalf »

The remark is correct, but the fix is already available since ages as a patch and/or as part of the code of newer releases
R.
jmit
Posts: 13
Joined: Tue Feb 21, 2006 8:39 am

Re: Ping Graph without values

Post by jmit »

gandalf wrote:The remark is correct, but the fix is already available since ages as a patch and/or as part of the code of newer releases
R.
I have updated cacti during the update of debian from version 5.0.5 to 6.0.4 and I think that's the reason I haven't get the patch.

Where can I get the patches for cacti?

Jörg
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Ping Graph without values

Post by paulgevers »

jmit wrote: I have updated cacti during the update of debian from version 5.0.5 to 6.0.4 and I think that's the reason I haven't get the patch.

Where can I get the patches for cacti?
As the dependencies of cacti are not versioned, you could also install the debian deb file for weezy. Not the recommended way to administer a Debian box, but I guess smarter than patching (not interfering with the package). Download the .deb file from here [1] and install with "dpkg -i".

FYI: I will create a cacti repository on Launchpad [2] in the future that should allow you to add it to your apt sources, which is much smarter than using dpkg -i.

[1] http://packages.debian.org/sid/all/cacti/download
[2] https://launchpad.net/~paul-climbing/+archive/cacti
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Ping Graph without values

Post by gandalf »

jmit
Posts: 13
Joined: Tue Feb 21, 2006 8:39 am

Re: Ping Graph without values

Post by jmit »

@paulgevers:

Thank you very much for the info.

@gandalf:

I have searched on this web-site but I haven't found it. :(
Thank you very much.

Jörg
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests