LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-22-2012, 12:05 AM   #1
parthipan
LQ Newbie
 
Registered: May 2012
Posts: 11

Rep: Reputation: Disabled
i installed check_diskio in remote host workiing CLI but i can not get in nagios web


i have to manage disk io so i have installed check_diskio-3.2.4.tar.gz

it is working properly in CLI but i could not get into nagios web interface


what are the configurations i have to make change into
commands.cfg (define command)
remotehost.cfg ( define service)
nrpe.cfg

this is the output got from CLI
Quote:
[root@localhost Desktop]# /usr/local/nagios/libexec/check_nrpe -H 172.30.0.72 -c check_diskio
CHECK_DISKIO OK - sda 123.00 sectors/s | WRITE=123;4000;6000 READ=0;4000;6000 TOTAL=123;4000;6000
i have installed check_diskio-3.2.4.tar.gz through this steps

Quote:
At the Client Machine.

# yum install perl

# tar -zxvf check_diskio-3.2.2.tar.gz
# cd check_diskio-3.2.2

# less INSTALL (Read the INSTALL Readme file)
# perl Makefile.PL INSTALLSCRIPT=/usr/lib64/nagios/plugins
(You will see a list of warnings of prerequisites)

B. Install the prerequisites Perl-Modules. Here may not be completed lists.

# yum install perl-Nagios*
# yum install perl-List*
# yum install perl-Readonly*
# yum install perl-Number-Format
# yum install perl-File-Slurp*
# yum install perl-Array-Unique

C. Finally compile

# perl Makefile.PL INSTALLSCRIPT=/usr/lib64/nagios/plugins
# make
# make install
(You will see the check_diskio at /usr/lib64/nagios/plugins)

D. Edit the nrpe.cfg file on the client machine. If you have not download nagios nrpe plugins, just do a

# yum install nagios-nrpe

D1. Edit /etc/nagios/nrpe.cfg on the client machine,

# vim /etc/nagios/nrpe.cfg

command[check_diskio]=/usr/lib64/nagios/plugins/check_diskio --device=/dev/sda -w 200 -c 300

At the Server, just make sure you install the nagios nrpe plugins like D. Finally to ensure that the remote server plugins are ok, do a test at Nagios Server

# cd /usr/lib64/nagios/plugins

# ./check_nrpe -H remote-server -c check_diskio
CHECK_DISKIO OK - sda 194 sectors/s | WRITE=194;200;300 READ=0;200;300 TOTAL=194;200;3
please help me immediatly
 
Old 08-22-2012, 08:34 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
when you say
Quote:
commands.cfg (define command)
remotehost.cfg ( define service)
I assume you already created the definitions. Did you refresh or restart the Nagios service? If so what does the nagios log file say? Run a checkconfig, is the configuration OK?
 
Old 08-22-2012, 11:59 PM   #3
parthipan
LQ Newbie
 
Registered: May 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
i made these configurations in server and client machine to get in web interface check_diskio output

my web interface shows

Quote:
Disk IO CRITICAL 08-23-2012 10:12:26 2d 21h 41m 40s 4/4 (Return code of 127 is out of bounds - plugin may be missing)
i configured like this in my magios server machine

commands.cfg in client machine and servermachine

Code:
define command{
        command_name    check_diskio
        command_line    /usr/lib/nagios/plugins/contrib/check_diskio --device /dev/sda1 -w $ARG1$ -c $ARG2$
}

define command{
        command_name check_nrpe
        command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
        }
nrpe.cfg command
Code:
command[check_diskio]=/usr/lib/nagios/plugins/contrib/check_diskio -d /dev/sda1 -w 4000 -c 6000
my clientmachine.cfg
service definition

Code:
define service{
	use local-service
	host_name onal
	service_description Disk IO
	check_command check_diskio!20!50
	notifications_enabled 0
}
when i am executing my command through CLI
i provide
Code:
[root@localhost Desktop]# /usr/local/nagios/libexec/check_nrpe -H 172.30.0.72 -c check_diskio
i can get this output

Quote:
CHECK_DISKIO OK - sda 123.00 sectors/s | WRITE=123;4000;6000 READ=0;4000;6000 TOTAL=123;4000;6000
i have installed check_diskio-3.2.4.tar.gz through this steps
actually i m confusing now what are the configurations i have to make in client machin and server machine

please help me
 
Old 08-23-2012, 09:59 AM   #4
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
You need to have the plugin installed on the client machine. Define the command in nrpe.cfg like you did.

Then you must call the client plugin from the server in a service definition using the check_nrpe command.

Here's an example of what your service definition should look like.

Code:
define service{
	use local-service
	host_name onal
	service_description Disk IO
	check_command check_nrpe!check_diskio
	notifications_enabled 0
}
For more information about how check_nrpe works with the host look at this document.

Your nrpe must be successfully listening on the client machine. You can get rid of your command definition and check_diskio plugin on the server unless you want to actually perform that check on the local nagios server.
 
Old 08-24-2012, 05:32 AM   #5
parthipan
LQ Newbie
 
Registered: May 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
it is working correctly...

oh amazing!

thank you so mutch sag47
it is working correctly...
cool
 
Old 08-24-2012, 07:14 AM   #6
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Check out Icinga as well. It's 100% compatible with all Nagios plugins and extensions.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] nagios adding remote host problem uppalagayatri Linux - Software 2 03-20-2011 11:16 PM
nagios adding remote host problem ramesh14 Linux - Software 3 03-04-2011 08:37 AM
How to monitor remote host using nagios Ashish Sood Linux - General 16 01-25-2011 05:05 AM
Nagios web access for a particular host group bkcreddy17 Linux - Server 1 02-16-2010 04:39 AM
Nagios passive or remote-host-side alert. knockout_artist Linux - Server 1 01-06-2010 11:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration