Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Share Post: Digg Delicious Reddit Twitter StumbleUpon
[CentOS][HowTo] Install Nagios NRPE
01-27-2011, 01:19 PM
Post: #1
[CentOS][HowTo] Install Nagios NRPE
Enable EPEL repos first (64-bit/32-bit neutral).

Install NRPE daemon:
Code:
yum update && yum install nrpe

Installing NRPE by itself is not enough. You are still missing all the Nagios plugins. For example, if the master server uses check_nrpe to query your node for disk space using “check_disk”… it can’t. Because the Nagios plugin "check_disk" isn’t installed!

All you got to do is install all the plugins:
Code:
yum install nagios-plugins-all
Visit this user's website Find all posts by this user
Quote this message in a reply
03-31-2011, 01:55 AM
Post: #2
RE: [CentOS][HowTo] Install Nagios NRPE
FYI, many of the 'emergency' services can be monitored from Nagios even without installing NRPE on the client. Ping, http, ftp, URL check etc... can be monitored without having NRPE on the client.

Nothing is lost or wasted in this life.
Find all posts by this user
Quote this message in a reply
03-31-2011, 11:12 AM
Post: #3
RE: [CentOS][HowTo] Install Nagios NRPE
Sree,

I've been wanting to get URL check to work under Nagios (just not enough time to do research). Do you happen to know the syntax on how to do it?

For example if I have a txt file on http(s)://DOMAIN.COM/urlcheck.txt and it contains
Quote:Nagios URL Check

How would I configure Nagios master to check that? Thanks for any input.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-31-2011, 11:33 PM (This post was last modified: 04-01-2011 01:19 AM by Sree.)
Post: #4
RE: [CentOS][HowTo] Install Nagios NRPE
Terii,

This can be done by defining a new command to check the URL using check_http plugin in the commands.cfg file on the nagios server (Default location: /usr/local/nagios/etc/objects/commands.cfg). Below given is an example. In this example I have defined a new command 'check_my_url' that you can use in the services.cfg file to check the URL.

Quote:define command{
command_name check_my_url
command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$ -u http(s)://domain.com/urlcheck.txt
}

Once the new command 'check_my_url' is defined as shown above, you can create the entry shown below in the services.cfg file. You can use -p <port> option in case the URL you want to check is running on a different port than 80.

Quote:define service{
use generic-service ; Inherit default values from a template
host_name myhostname
service_description <your description>
check_command check_my_url
}

In the example shown above:
'myhostname' is the name that you have given to the server which is being monitored in the hosts.cfg file.
'your description' is the your description of the server.
'check_my_url' is the name that we gave the command (command_name) in the commands.cfg file.

After these entries are made in the both the files, verify and restart the nagios and the URL check should be at work. Hope this helps. Smile

-Sree.

P.S: You can go the plugins directory in the Nagios server and do a './check_http --help' to see all the options you can use with check_http for checking URLs.
I don't think it will check the contents on web-page that needs to be checked, but will definitely show 'CRITICAL' if there it hits a 404 or 403 or 500 error (unless you have a custom 404 page like in WP).
You might find this link useful.

-Sree

Nothing is lost or wasted in this life.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Monitor Nagios with Android device quad3datwork 3 2,354 05-13-2012 05:38 PM
Last Post: aatish910
  [CentOS] Good repositories? quad3datwork 2 1,963 12-09-2011 08:02 PM
Last Post: aatish910
  [Solaris] patchadd “install/checkinstall: cannot open” quad3datwork 1 2,097 03-10-2011 10:41 AM
Last Post: quad3datwork
  [CentOS] Monitor HDs with Smartmontools quad3datwork 1 5,767 03-04-2011 01:58 PM
Last Post: quad3datwork
  [CentOS] Adaptec RAID 2405 arcconf monitoring quad3datwork 0 8,499 02-10-2011 12:17 PM
Last Post: quad3datwork
  [HowTo] ipmitool set BMC network info quad3datwork 0 4,336 01-27-2011 01:19 PM
Last Post: quad3datwork
  Nagios memory monitoring quad3datwork 0 905 01-27-2011 01:18 PM
Last Post: quad3datwork

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

System Administrator (SysAdmin) Forum - SysAdminTalk.Net