PDA

View Full Version : check_graph plugins not working


Zby
23rd May 2006, 13:07
I am using an Oreon 1.3B1, in conjunction with Nagios 2.3.1 on a Suse 10.1 (used the RPM packages from nagiosexchange). Everyhting is working now or seems to, except the graphs...

So, when I try one of the check_grap_* plugin, ex: perl ./check_graph_ping.pl -H addr -g -S 1212
I receive this error message back: "Undefined subroutine &RRDs::create called at /usr/lib/nagios/plugins/oreon.pm line 98."

How can I check I am using the right RRDs.pm? (test the .pm and config)? Or simple what do I wrong...??? :cry:

Thx in advance, Zby-)

julio
23rd May 2006, 13:14
Hi,

install perl-rrdtool :)

Zby
23rd May 2006, 13:27
It is done ... I think ... Otherwise I would have received this RRDs.pm not found in @INC, no?

Merci,
Zby-)

wistof
23rd May 2006, 20:02
Hello

in your oreon.pm

line 34 :
use lib qw(@RRDTOOL_PERL_LIB@ ../lib/perl);
be sure that @RRDTOOL_PERL_LIB@ is the directory where is your RRDs.pm, like
/usr/lib/perl5 (for example)

Zby
23rd May 2006, 23:22
Wistof, Julio,

Thanks a lot for your help, it seems my Oreon setup is working a lot better now... :lol: I have changed to /usr/lib/perl5/vendor_perl/5.8.8 instead of /usr/lib/perl5/vendor_perl/5.8.8/Log/Log4perl/Appender where I originally found RRDs.pm...a little bit alone maybe?)

But still one stupid question. Now that Oreon generates his *.rrd in the /usr/local/oreon/rrd directory, how are they displayed? The Oreon Views are desperatly empty (No host, No service)! :evil:

Once again, I request your help... Merci d'avance, Zby-)

julio
24th May 2006, 10:57
hosts and services will be diplayed only when rrd database will be create in /usr/local/oreon/rrd/..

Are you using oreon plugins ? (check_graph...)

Zby
24th May 2006, 17:38
Julio,

I observe .rrd files created in the /usr/local/oreon/rrd/ directory, for your info, I tried check_graph_ping. My question where will I find them back in the GUI? I have a 1.rrd in the dir. ...

Thx, Zby-)

voodooo
1st June 2006, 20:44
Hi there,

I can't graph anything to, but my thing is with the scripts:


bash-2.05# ./check_graph_ping.pl -H 192.168.40.100 -w 80 -c 90
Use of uninitialized value in pattern match (m//) at check_graph_ping.pl line 141.
Use of uninitialized value in split at check_graph_ping.pl line 145.
Use of uninitialized value in split at check_graph_ping.pl line 146.
Use of uninitialized value in numeric eq (==) at check_graph_ping.pl line 156.
Use of uninitialized value in concatenation (.) or string at check_graph_ping.pl line 161.
GPING OK -


Everything is working ok with nagios and oreon.
Anyone ?
Tks in advance :)

DonKiShoot
2nd June 2006, 12:42
LOCAL bug i think !

LANG="fr_FR.UTF-8" may help you but it is not a solution :cry:

check_graph_ping use the command ping and i think that the command output differs between computer who use differente local language.

DonKiShoot
2nd June 2006, 12:51
Try to put this on top of your check_graph_ping.pl :

use POSIX qw(locale_h);
setlocale(LC_CTYPE, "fr_FR");


That'all ...

# Cette fonctionnalité n'existait pas avant Perl 5.004
require 5.004;

# Import des outils de manipulation du "locale"
# depuis le module POSIX.
# Cette exemple utilise : setlocale -- l'appel de fonctio
# LC_CTYPE -- expliqué plus bas
use POSIX qw(locale_h);

# demande et sauvegarde le "locale" initial
$old_locale = setlocale(LC_CTYPE);

setlocale(LC_CTYPE, "fr_CA.ISO8859-1");
# LC_CTYPE est maintenant dans le
# "locale" "French, Canada, codeset ISO 8859-1"

setlocale(LC_CTYPE, "");
# LC_CTYPE revient à sa valeur par défaut définie par
# les variables d'environnement LC_ALL/LC_CTYPE/LANG
# Voir plus bas pour la documentation

# restaure le "locale" initial
setlocale(LC_CTYPE, $old_locale);

voodooo
2nd June 2006, 14:18
So you think the problem is the ping's output, makes sense cause i'm using solaris :D

Solaris:

bash-2.05$ uname -a
SunOS 5.9 Generic_117171-12 sun4u sparc SUNW,Ultra-5_10

bash-2.05$ which ping
/usr/sbin/ping

bash-2.05$ ping 192.168.40.100
192.168.40.100 is alive

bash-2.05$ ping -I 1 192.168.40.100
PING 192.168.40.100: 56 data bytes
64 bytes from holmes (192.168.40.100): icmp_seq=0. time=2. ms
64 bytes from holmes (192.168.40.100): icmp_seq=1. time=0. ms
64 bytes from holmes (192.168.40.100): icmp_seq=2. time=2. ms
----192.168.40.100 PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/1/2


Linux:

[root@linuz]# uname -a
Linux 2.6.9-34.ELsmp #1 SMP i686 i686 i386 GNU/Linux

[root@linuz]# which ping
/bin/ping

[root@linuz# ping 192.168.40.100
PING 192.168.40.100 (192.168.40.100) 56(84) bytes of data.
64 bytes from 192.168.40.100: icmp_seq=0 ttl=254 time=7.17 ms
64 bytes from 192.168.40.100: icmp_seq=1 ttl=254 time=1.40 ms
64 bytes from 192.168.40.100: icmp_seq=2 ttl=254 time=0.481 ms
--- 192.168.40.100 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.481/3.019/7.178/2.964 ms, pipe 2


Thanks for the help.
HS

DonKiShoot
2nd June 2006, 14:43
Yes this output are very different :(

You must modify the parssing code if you want to use this script however.

voodooo
6th June 2006, 15:22
Hello again :|

I have re-installed nagios and oreon on a linux box, now when i run the graph scripts:

./check_graph_ping.pl
Can't locate Config/IniFiles.pm in @INC (@INC contains:.......
at /home/nagios/libexec/oreon.pm line 27.
BEGIN failed--compilation aborted at /home/nagios/libexec/oreon.pm line 27.
Compilation failed in require at ./check_graph_ping.pl line 32.
BEGIN failed--compilation aborted at ./check_graph_ping.pl line 32.


I have generated the oreon.pm in options > plugins, and all the config files with oreon. What's whrong ?

tks, HS

Menno
6th June 2006, 16:01
./check_graph_ping.pl
Can't locate Config/IniFiles.pm in @INC (@INC contains:.......
at /home/nagios/libexec/oreon.pm line 27.



Maybe you forgot to install the perl module?
perl -MCPAN -e shell
cpan> install Config::IniFiles

Regards
Menno

voodooo
6th June 2006, 17:01
Yes, that's it tks.
I was working with diferent verssions of scripts:

check_graph_ping (nagios-plugins 1.3.0) 1.0
check_graph_ping (nagios-plugins 1.4.3) 1.2

voodooo
6th June 2006, 19:37
Now i have the .rrd files in place but still no graphs......


-rw-rw-r-- 1 nagios nagios 203488 Jun 7 13:03 1.rrd
-rw-rw-r-- 1 nagios nagios 208288 Jun 7 13:03 2.rrd
-rw-rw-r-- 1 nagios nagios 208288 Jun 7 13:03 3.rrd



[root@test libexec]# ./check_graph_ping.pl -H 192.168.40.100
GPING OK - 64 bytes from 192.168.40.100: icmp_seq=0 ttl=254 time=0.968 ms


When i try to view:

Warning: imagecreate(): Invalid image dimensions in /home/nagios/oreon/include/graph/graph_image.php on line 70

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /home/nagios/oreon/include/graph/graph_image.php on line 72

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /home/nagios/oreon/include/graph/graph_image.php on line 73

Warning: imagecolortransparent(): supplied argument is not a valid Image resource in /home/nagios/oreon/include/graph/graph_image.php on line 74

Warning: imagestring(): supplied argument is not a valid Image resource in /home/nagios/oreon/include/graph/graph_image.php on line 77

Warning: imagepng(): supplied argument is not a valid Image resource in /home/nagios/oreon/include/graph/graph_image.php on line 80

There's something with the generation of the PNG can this be the rrd creation ? php version? GD lib?

If anyone could help... tks,
HS

khilari
13th November 2006, 17:49
./check_graph_ping.pl
Can't locate Config/IniFiles.pm in @INC (@INC contains:.......
at /home/nagios/libexec/oreon.pm line 27.



Maybe you forgot to install the perl module?
perl -MCPAN -e shell
cpan> install Config::IniFiles

Regards
Menno

yes this worked for me

Here is what i did

# perl -MCPAN -e shell
Are you ready for manual configuration? [yes] no
cpan> i /IniFiles/
cpan> install Config::IniFiles
cpan> exit
check this - http://www.netadmintools.com/part298.html

khilari
13th November 2006, 18:00
./check_graph_ping.pl
Can't locate Config/IniFiles.pm in @INC (@INC contains:.......
at /home/nagios/libexec/oreon.pm line 27.



Maybe you forgot to install the perl module?
perl -MCPAN -e shell
cpan> install Config::IniFiles

Regards
Menno

i had the exact same error so i did the "install config... in cpan"
now i get

./check_graph_ping.pl -H 10.10.1.27
GPING OK - rtt min/avg/max/mdev = 2.984/2.984/2.984/0.000 ms|time=2.984ms;20;40;; ok=1

now, how do i view the graphs on the web gui ??
i went to /usr/local/oreon/rrd , but didn't see any .rrd files.

Please let me know what i am doing wrong. Thanks!

khilari
13th November 2006, 18:15
^ sorry for the above post.

I didn't run check_graph_ping with the -g option, that is why i didn't see .rrd files in /usr/local/oreon/rrd

So, now i ran the command with the -g option and i see "1.rrd" in /usr/local/oreon/rrd ... however, I can't see the graphs in the web gui
infact, i don't know where to go for the graphs ... I go to Oreon Views section, but it only gives me the error "Problem with Perfparse Database connection : DB Error: no such database"

Any help will be appreciated.

Thanks,