Facing issues and errors when i want to install nagiosgraph

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
shahabuddin83
Posts: 3
Joined: Wed Nov 05, 2014 3:06 am

Facing issues and errors when i want to install nagiosgraph

Post by shahabuddin83 »

Hi Team,
I am facing the issue and errors when i want to install nagiosgraph on rhel linux 6.4.Please give your valuable suggestions to sort out this issue.

# cd /usr/local/nagios/libexec/
# ./insert.pl
Can't locate loadable object for module RRDs in @INC (@INC contains: /usr/local/nagios/etc/nagiosgraph/ /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/nagios/etc/nagiosgraph//ngshared.pm line 30
Compilation failed in require at /usr/local/nagios/etc/nagiosgraph//ngshared.pm line 30.
BEGIN failed--compilation aborted at /usr/local/nagios/etc/nagiosgraph//ngshared.pm line 30.
Compilation failed in require at ./insert.pl line 35.
BEGIN failed--compilation aborted at ./insert.pl line 35.

# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.0.2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 11-25-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for service 'PING' on host 'hshrc01' (config file '/usr/local/nagios/etc/objects/commands.cfg', starting on line 293)
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 339 services.
Checked 73 hosts.
Checked 5 host groups.
Checked 1 service groups.
Checked 7 contacts.
Checked 4 contact groups.
Checked 30 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 73 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check


#Vi /usr/local/nagios/libexec/insert.pl

#!/usr/bin/perl
# $Id$
# License: OSI Artistic License
# http://www.opensource.org/licenses/artistic-license.php
# Author: (c) Soren Dossing, 2005
# Author: (c) Alan Brenner, Ithaka Harbors, 2008
# Author: (c) Matthew Wall, 2010
#
# NAME
# insert.pl - Store performance data returned by Nagios plugins using rrdtool.
#
# USAGE
# There are two standard processing configurations: batch and immediate.
#
# Batch Mode
# Nagios periodically invokes insert.pl. Data are extracted from the Nagios
# perflog file.
#
# Immediate Mode
# Nagios invokes insert.pl on each service check. Data are extracted from the
# command line.
#
# CONFIGURATION
# The nagiosgraph.conf file controls the behavior of this script.
#
# DIAGNOSTICS
# Use the debug_insert setting in nagiosgraph.conf to control the amount of
# logging information that will be emitted by this script. Output will go
# to the nagiosgraph log file.


# The configuration file and ngshared.pm must be in this directory:
use lib '/usr/local/nagios/etc/nagiosgraph/';

use ngshared;
use strict;
use warnings;

use constant MINPOLL => 30; ## no critic (ProhibitConstantPragma)

use vars qw($VERSION);
$VERSION = '2.0.2';

my $errmsg = readconfig('insert');
if ( $errmsg ne q() ) { croak $errmsg; }
debug( DBDEB, 'insert.pl processing started' );
$errmsg = checkrrddir('write');
if ( $errmsg ne q() ) { croak $errmsg; }

# Read the map file and define a subroutine that parses performance data
$errmsg = getrules( $Config{mapfile} );
if ( $errmsg ne q() ) { croak $errmsg; }

if ( $ARGV[0] ) {
processdata( $ARGV[0] );
}
elsif ( defined $Config{perfloop} && $Config{perfloop} > 0 ) {
my $poll = ( $Config{perfloop} < MINPOLL ) ? MINPOLL : $Config{perfloop};
debug( DBINF, 'insert.pl using poll interval of ' . $poll . ' seconds' );
while (1) {
my @perfdata = readperfdata( $Config{perflog} );
if (@perfdata) { processdata(@perfdata); }
debug( DBDEB, 'insert.pl waiting for input' );
sleep $poll;
}
}
else {
my @perfdata = readperfdata( $Config{perflog} );
if (@perfdata) { processdata(@perfdata); }
}

debug( DBDEB, 'insert.pl processing complete' );
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Facing issues and errors when i want to install nagiosgr

Post by slansing »

Usually you see a .pm after modules, please run the following:

Code: Select all

yum install mlocate
updatedb
And show the output of:

Code: Select all

locate RRDs.pm

locate RRDs
We can only offer limited support, as Nagiosgraph is third party, and they have their own support channels, I suggest asking at:

http://sourceforge.net/projects/nagiosg ... rce=navbar
shahabuddin83
Posts: 3
Joined: Wed Nov 05, 2014 3:06 am

Re: Facing issues and errors when i want to install nagiosgr

Post by shahabuddin83 »

I run the commands

yum install mlocate
updatedb

and locate

locate RRDs.pm

locate RRDs

After that what syeps can i do after locating the RRDs.pm and RRDs files. Please revert with full solutions and steps
shahabuddin83
Posts: 3
Joined: Wed Nov 05, 2014 3:06 am

Re: Facing issues and errors when i want to install nagiosgr

Post by shahabuddin83 »

I run the commands after that what steps and commands i can run. Please suggests and revert as early as possible.

[root@tools ~]# yum install mlocate
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Package mlocate-0.22.2-4.el6.x86_64 already installed and latest version
Nothing to do
[root@tools ~]# updatedb
[root@tools ~]#
[root@tools ~]# locate RRDs.pm
/opt/rrdtool-1.3.1/bindings/perl-shared/RRDs.pm
/opt/rrdtool-1.3.1/bindings/perl-shared/blib/lib/RRDs.pm
/usr/lib/perl5/vendor_perl/5.8.8/RRDs.pm
/usr/lib64/perl5/RRDs.pm
/usr/lib64/perl5/vendor_perl/RRDs.pm
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/RRDs.pm
/usr/local/lib64/perl5/RRDs.pm
/usr/local/nagios/etc/nagiosgraph/RRDs.pm
/usr/local/rrdtool-1.3.1/lib/perl/5.10.1/x86_64-linux-thread-multi/RRDs.pm
/usr/local/share/perl5/RRDs.pm
/usr/share/perl5/RRDs.pm
/usr/share/perl5/vendor_perl/RRDs.pm
[root@tools ~]#

[root@tools ~]# locate RRDs
/opt/rrdtool-1.3.1/bindings/perl-shared/RRDs.bs
/opt/rrdtool-1.3.1/bindings/perl-shared/RRDs.c
/opt/rrdtool-1.3.1/bindings/perl-shared/RRDs.o
/opt/rrdtool-1.3.1/bindings/perl-shared/RRDs.pm
/opt/rrdtool-1.3.1/bindings/perl-shared/RRDs.xs
/opt/rrdtool-1.3.1/bindings/perl-shared/blib/arch/auto/RRDs
/opt/rrdtool-1.3.1/bindings/perl-shared/blib/arch/auto/RRDs/.exists
/opt/rrdtool-1.3.1/bindings/perl-shared/blib/arch/auto/RRDs/RRDs.bs
/opt/rrdtool-1.3.1/bindings/perl-shared/blib/arch/auto/RRDs/RRDs.so
/opt/rrdtool-1.3.1/bindings/perl-shared/blib/lib/RRDs.pm
/opt/rrdtool-1.3.1/bindings/perl-shared/blib/lib/auto/RRDs
/opt/rrdtool-1.3.1/bindings/perl-shared/blib/lib/auto/RRDs/.exists
/opt/rrdtool-1.3.1/bindings/perl-shared/blib/man3/RRDs.3pm
/opt/rrdtool-1.3.1/doc/RRDs.html
/opt/rrdtool-1.3.1/doc/RRDs.pod
/opt/rrdtool-1.3.1/share/doc/rrdtool-1.3.1/html/RRDs.html
/usr/lib/perl5/vendor_perl/5.8.8/RRDs.pm
/usr/lib64/perl5/RRDs.pm
/usr/lib64/perl5/vendor_perl/RRDs.pm
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/RRDs.pm
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/RRDs
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/RRDs/RRDs.bs
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/RRDs/RRDs.so
/usr/local/lib64/perl5/RRDs.pm
/usr/local/nagios/etc/nagiosgraph/RRDs.pm
/usr/local/rrdtool-1.3.1/lib/perl/5.10.1/x86_64-linux-thread-multi/RRDs.pm
/usr/local/rrdtool-1.3.1/lib/perl/5.10.1/x86_64-linux-thread-multi/auto/RRDs
/usr/local/rrdtool-1.3.1/lib/perl/5.10.1/x86_64-linux-thread-multi/auto/RRDs/.packlist
/usr/local/rrdtool-1.3.1/lib/perl/5.10.1/x86_64-linux-thread-multi/auto/RRDs/RRDs.bs
/usr/local/rrdtool-1.3.1/lib/perl/5.10.1/x86_64-linux-thread-multi/auto/RRDs/RRDs.so
/usr/local/rrdtool-1.3.1/share/doc/rrdtool-1.3.1/html/RRDs.html
/usr/local/rrdtool-1.3.1/share/man/man3/RRDs.3pm
/usr/local/share/perl5/RRDs.pm
/usr/share/man/man3/RRDs.3pm.gz
/usr/share/perl5/RRDs.pm
/usr/share/perl5/vendor_perl/RRDs.pm
[root@tools ~]#
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Facing issues and errors when i want to install nagiosgr

Post by rhassing »

shahabuddin83 wrote:I run the commands after that what steps and commands i can run. Please suggests and revert as early as possible.
In my insert.pl is the following:

Code: Select all

# The configuration file and ngshared.pm must be in this directory:
use lib '/etc/nagiosgraph';

use ngshared;
use strict;
use warnings;
So you should see where your ngshared.pm file is located. This should match your insert.pl file
Rob Hassing
Image
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Facing issues and errors when i want to install nagiosgr

Post by abrist »

Thanks for the tip rhassing!
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked