Monitoring Microsoft Exchange 2003 Servers using Nagios
Thru the time I have developed a few usefull plugins to better monitor exchange servers.
I hope system administrator around the world can benefit from it. It has only being tested under exchange 2003. Any comments, improvements are welcome.
Here are a list of these plugins:
* Exchange_BD – Gets the phsycal size of the Exchange database files, looks into the files .edb and .stm (must pass arguments where files are)
Posible improvements: Dynamic finds the location of the files, querying via LDAP. Display total size by adding all files.
* Exchange_Top_MBOX – Get the top X mailox sizes, allows threasholds if any mailbox is bigger then X megabytes go to warning or critical.
* Exchange_Top_Emails – Most complicated script, gets the total number of emails sent the day before, and prints out the top X “spammers”, allows threasholds.
* Exchange_Backups – Checks when was the last time exchange server was correctly backuped and logs where flushed, I find it a very usefull plugin. Allows threasholds, ex. if backup was not done in last 4 days call warning if no backup during last 10 days raize critical alarm.
* Exchange_Logins – How many users are currently login into the server. (not originaly mine) Uses WMI query, comes with standard NRPE_NT plugins v2.
* Exchange_MailBoxes – Gets the total number of mailboxes in the exchange server, works even with multiple Storage Groups.
Important Note: All these scripts requires Nagios + NRPE_NT (nagios agent) installed on servers. You will also need to define the plugins in nrpe.cfg here is how I have it:
dont_blame_nrpe=1
command[get_total_mbox]=cscript.exe //nologo //T:90 c:nrpe_ntpluginsv2check_mboxtotal.vbs
command[get_top_mbox]=cscript.exe //nologo //T:90 c:nrpe_ntpluginsv2check_mboxsize.wsf -h $ARG1$ -t $ARG2$ -w $ARG3$ -c $ARG4$
command[get_top_emailers]=cscript.exe //nologo //T:90 c:nrpe_ntpluginsv2check_emailers.wsf “$ARG1$” “$ARG2$” “$ARG3$”
command[get_exchange_mbox_logons]=cscript.exe //nologo //T:60 c:nrpe_ntpluginsv2check_counter_rawcount.vbs -h “127.0.0.1” -class “Win32_PerfRawData_MSExchangeIS_MSExchangeISMailbox” -inst “Name=_Total” -prop “ActiveClientLogons” -w “$ARG1$” -c “$ARG2$”
command[check_filesize]=cscript.exe //nologo //T:60 c:nrpe_ntpluginsv2check_filesize.vbs -p “$ARG1$” -f “$ARG2$” -w “$ARG3$” -c “$ARG4$”
command[check_backup]=cscript.exe //nologo //T:60 c:nrpe_ntpluginsv2check_backup.vbs -w “$ARG1$” -c “$ARG2$”
There are many more interesting plugins when monitoring Microsoft Exchange servers:
Check Windows Update
Check Exchange Counters (performance)
Check Active Directory
Check POP3 Account
Check Black Lists
Check BlackBerry Server State
Check Exchange Webmail OWA (very nice)
Check Exchange – multiple options
Please help me maintain this site with a simple click:
[ad]
Nice work
I think It would work very well
Do you know how to do for monitoring Active directory with Nagios?
Devier,
I wrote a plugin to check active directory status. it uses dcdiag command
Check this post
cheers,
Felipe
do you have the vbs scripts outputting data for rrd? if so, how did you set up the output so that it was in the proper format?
I used scriptomatic to create a plugin. the plugin works for a simple result but doesn’t send any data to service_perfdata.
Will also look at the warning and critical functionality and see if I can make that more robust.
Thank you Felipe for your Howto.
i am new in nagios and i want to know how can i use it to monitor open ports and the attack from outside.
Eric, look into the builtin plugin of NRPE-NT there is already one for check all kinds of perfmon counters and it should also output to perfdata
Abdel, Monitoring open ports from outside you would have to place nagios outside, and i guess u could use check_tcp but to active scan ports check nmap plugin: http://www.monitoringexchange.org/cgi-bin/page.cgi?g=Detailed%2F2237.html;d=1
is there any way to monitor Exchange 2010? i was using Script from Nagios Exchange for 2003 & 2007 but i am not able to find same kind of scripts for Exchange 2010.
Nirav,
There must be some scripts available, but sorry I have not being working with exchange 2010.
Most likely its easier to write Powershell scripts for it.
cheers,
Felipe
Hello Felipe,
I’m working with nagios for a while with unix servers, but i don’t know so much about Exchange.
The thing I need is to monitor who are the top mailbox usage.
I saw that you have some scripts that do this, but the script is password protected.
Could you guide me to do this?
I don’t know so much about VB scripts, I’m a unix scripter… 😉
Regards,
Exequiel
Hi Felipe,
the pages for the first two plugins are password protected. I think thats unintentionally. Would be nice if you change it;)
bye,
Karsten