?
Solved

Help me to configure Nagios 2.0 in my RHEL 5 box

Posted on 2008-11-14
7
Medium Priority
?
668 Views
Last Modified: 2013-11-05
Hi all

        I have installed Nagios 2.0 in my Rhel 5 box.I want to monitor Windows servers (Active dirtectory+exchange server+dns) and all basic windows services likeMemory usage, CPU load, Disk usage, Service states, Running processes and few linux machine+all services of linux
For windows i have installed nsclient and for linux I have installed nrpe

 i have configured the below mentioned cfg file

host,hostgroup,contact,contact group,timeperiod

I need to configure command.cfg and services.cfg as its very confusing.can anybody please help me.A sample template can help me to solve my problem.Thnks in advance.
0
Comment
Question by:jeebukarthikeyan
  • 4
  • 3
7 Comments
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 22966816
Attached Document give you best examples
Gud luck
Windows-Monitoring-using-Nagios.pdf
0
 
LVL 13

Author Comment

by:jeebukarthikeyan
ID: 22969778
thanks a lot..can u give me a sample command.cfg and services.cfg file...
0
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 22969799
Its clearly defined in the document for example are the command service definitions for winserver from the same document.


define command 
{ 
command_name check_nt_cpuload 
command_line $USER1$/check_nt -H $HOSTADDRESS$ -v CPULOAD -l $ARG1$ 
} 
define service 
{ 
host_name winsrv 
service_description CPU Load 
check_command check_nt_cpuload!5,80,90,15,70,80 
... 
} 

Open in new window

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 13

Author Comment

by:jeebukarthikeyan
ID: 23019587
i am not able to monitor my windows machine.i have installed nsclient.but i my nagios webinterface i am getting could not fetech information from the server.

here is my configuration details

define command{
        command_name    check_nt_memuse
        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -s password -p 1248 -v MEMUSE -w $ARG1$ -c $ARG2$
        }

define service{
        host_name               ad-blr-02
        service_description     Memory Usage
        is_volatile             0
        check_period            24x7
        max_check_attempts      4
        normal_check_interval   5
        retry_check_interval    1
        contact_groups          Domain-Admins
        notification_interval   120
        notification_period     24x7
        notification_options    w,u,c,r
        check_command           check_nt!MEMUSE!-w 80 -c 90
}

Nsclient configuration(nsc.ini) nagios -ip 192.168.142.112

FileLogger.dll
CheckSystem.dll
CheckDisk.dll
NSClientListener.dll
NRPEListener.dll
SysTray.dll
CheckEventLog.dll
CheckHelpers.dll
;CheckWMI.dll
;
; RemoteConfiguration IS AN EXTREM EARLY IDEA SO DONT USE FOR PRODUCTION ENVIROMNEMTS!
;RemoteConfiguration.dll
; NSCA Agent is a new beta module use with care!
NSCAAgent.dll
; LUA script module used to write your own "check deamon" (sort of) early beta.
LUAScript.dll
; Script to check external scripts and/or internal aliases, early beta.
CheckExternalScripts.dll
; Check other hosts through NRPE extreme beta and probably a bit dangerous! :)
NRPEClient.dll



[Settings]
;# OBFUSCATED PASSWORD
;  This is the same as the password option but here you can store the password in an obfuscated manner.
;  *NOTICE* obfuscation is *NOT* the same as encryption, someone with access to this file can still figure out the
;  password. Its just a bit harder to do it at first glance.
;obfuscated_password=Jw0KAUUdXlAAUwASDAAB
;
;# PASSWORD
;  This is the password (-s) that is required to access NSClient remotely. If you leave this blank everyone will be able to access the daemon remotly.
password=password
;
;# ALLOWED HOST ADDRESSES
;  This is a comma-delimited list of IP address of hosts that are allowed to talk to the all daemons.
;  If leave this blank anyone can access the deamon remotly (NSClient still requires a valid password).
;  The syntax is host or ip/mask so 192.168.0.0/24 will allow anyone on that subnet access
allowed_hosts=192.168.142.112
;
;# USE THIS FILE
;  Use the INI file as opposed to the registry if this is 0 and the use_reg in the registry is set to 1
;  the registry will be used instead.
use_file=1

[log]
;# LOG DEBUG
;  Set to 1 if you want debug message printed in the log file (debug messages are always printed to stdout when run with -test)
;debug=1
;
;# LOG FILE
;  The file to print log statements to
;file=NSC.log
;
;# LOG DATE MASK
;  The format to for the date/time part of the log entry written to file.
;date_mask=%Y-%m-%d %H:%M:%S


[NSClient]
;# ALLOWED HOST ADDRESSES
;  This is a comma-delimited list of IP address of hosts that are allowed to talk to NSClient deamon.
;  If you leave this blank the global version will be used instead.
allowed_hosts=192.168.142.112
;
;# NSCLIENT PORT NUMBER
;  This is the port the NSClientListener.dll will listen to.
port=1248
;
;# BIND TO ADDRESS
;  Allows you to bind server to a specific local address. This has to be a dotted ip adress not a hostname.
;  Leaving this blank will bind to all avalible IP adresses.
;bind_to_address=
;
;# SOCKET TIMEOUT
;  Timeout when reading packets on incoming sockets. If the data has not arrived withint this time we will bail out.
;socket_timeout=30

[NRPE]
;# NRPE PORT NUMBER
;  This is the port the NRPEListener.dll will listen to.
;port=5666
;
;# COMMAND TIMEOUT
;  This specifies the maximum number of seconds that the NRPE daemon will allow plug-ins to finish executing before killing them off.
;command_timeout=60
;
;# COMMAND ARGUMENT PROCESSING
;  This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed.
;allow_arguments=0
;
0
 
LVL 14

Accepted Solution

by:
Deepak Kosaraju earned 1500 total points
ID: 23022364
here is the mistake
check_command and command_name both should be same
Following is the correct service object definition.

check_command           check_nt_memuse!80!90

Gud luck
0
 
LVL 13

Author Closing Comment

by:jeebukarthikeyan
ID: 31517045
thanks man
0
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 23034560
Is there any reason for selecting Grade B why not Grade A when my assistance helped you.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question