n00b questions

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
jezh
Posts: 4
Joined: Wed Sep 28, 2011 3:59 pm

n00b questions

Post by jezh »

Hi There

I have just started to use nagios and am very excited about what it can do. Although i am am a windows user and never really used linux, i now have it up and running on a vm of ubuntu desktop. I just had a few questions about it.

I am currently monitoring my windows 7 machine and our sbs 2011 server. I wanted to know how i can monitor exchange and all the various bits, i have seen scripts around but not sure what to put where (a real noob!) and also i wanted to monitor the health of the actual server e.g. disks, raid controller, psu all the kind of things that you can do with the dell openmanage software really. i assume this is a bit more advanced so i just need to get started and get my head around it.

what i am just trying to get my head around is how to create groups e.g. servers and one for dekstops, add scripts so i can monitor other windows services / hardware

Thanks for your help in advanced!
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: n00b questions

Post by jsmurphy »

You could probably write a small book answering these questions I'm afraid :D! I will try to answer them as directly and helpfully as possible...

Some scripts will need to be placed in the /usr/local/nagios/libexec folder on your nagios server, some will need to be in your nsclient++ scripts folder... depends on the script where it needs to be executed from. Once in the folder for Nagios scripts you will need to add a command definition in nagios/etc/objects/commands.cfg http://nagios.sourceforge.net/docs/3_0/ ... ml#command. For windows scripts you will need to add a command definition to nsc.ini, this can sometimes be trickier as certain script languages require an execution wrapper... the newest version of NSClient has these already built in http://www.nsclient.org/nscp/wiki/CheckExternalScripts.

For monitoring hardware failures I would suggest investigating SNMPTT and passive monitoring:
snmptt - http://xavier.dusart.free.fr/nagios/en/snmptraps.html
Nagios passive checks - http://nagios.sourceforge.net/docs/3_0/ ... hecks.html

As for creating the actual definitions, the best advice I can offer is start with the hosts first and work your way down to the services, consolidate as much of the configuration as possible into templates. If you begin to get a lot of templates then you have gone too far and consolidated too much!The right way to do it is ultimately going to very much depend on your environment.

If you want specific examples of something I will see if I can help.
jezh
Posts: 4
Joined: Wed Sep 28, 2011 3:59 pm

Re: n00b questions

Post by jezh »

Thank you for this, i know i am just starting and get held up on silly little things.

Basically the example of what i would want to do is we have a lot of customers with say a Dell Poweredge T310, running SBS 2008 x64. Specifically i would want to monitor the following things (and this goes for almost all our customers)

> Free disk space, set an alert if it goes below 20 GB
> See if the Exchange IS is mounted and working
> See if outlook web access is working (not essential)
> If there is a hard drive or other hardware failure
> If the server has restarted unexpectedly
> monitor a few standard ports, 80, 443 etc
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: n00b questions

Post by jsmurphy »

It certainly does take a while to get your head around it all.

1. For OS performance metrics use NSClient++ (disk, CPU, memory usage)
# 'check_nt' command definition
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTNAME$ -u -s <secret> -p 12489 -v $ARG1$ $ARG2$
}

define service{
use generic-service
hostgroup_name client-servers
service_description C: drive space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
contact_groups contact
}

The -l switch determines which drive letter to check.

2. Again use Nsclient++ but this time check the active services on the host:
define service{
use generic-service
hostgroup_name exchange-servers
service_description Exchange services
check_command check_nt!SERVICESTATE!-d SHOWALL -l MSExchangeADTopology,MSExchangeFDS,MSExchangeIS,MSExchangeMailSubmission,MSExchangeMailboxAssistants,MSExchangeRepl
contact_groups contact
}

This is for exchange 2k7, we also have a set of custom VBS scripts that check CAS, MBX performance and backups.
Edit: It's cutting the length of the check_command... here are the rest of the services: MSExchangeServiceHost,MSExchangeSA,MSExchangeTransport,MSExchangeTransportLogSearch,MSDTC

3. Monitoring owa is easy, just use the check_http plugin provided:
define service{
use generic-service
hostgroup_name exchange-servers
service_description OWA
check_command check_http!-u /owa -S
contact_groups contact
}

4. For hard drive/hardware failure see my last post about using SNMPTT to monitor passively for hardware failures via SNMP traps.

5. You have options here... either ping it at very regular intervals, or use the same solution as #4 to receive notifications from the idracs/OpenManage

6. You can use the inbuilt check_tcp plugin to check port availability.... works pretty similar to check_http.
Locked