בנושא: Few questions (monitoring time, specific service , event log).

Jayson Broughton jbroughton at truecos.com
Tue May 5 17:59:43 CEST 2009


Ntt,
Here's an example from my nagios server that is checking mail services on a
windows server running nsclient++

/usr/local/nagios/etc/objects/commands.cfg 

# Check Windows Server Services
define command{
  command_name check_nt_service
  command_line /usr/local/nagios/libexec/check_nt -H $HOSTADDRESS$ -v
SERVICESTATE -p 12489 -d $ARG1$ -l $ARG2$ -t 60
}

This checks the service state of a specified service with a timeout of 60
seconds (I give a 60 second timeout because some of our windows servers are
clear across the country and timeout have been an issue in the past)

/usr/local/nagios/etc/objects/windows.cfg (We split up our servers, routers,
printers into separate config files)

define service{
  use				local-service
  host_name			MAILSERVER (whatever your server name is)
  service_description 	Merak Mail POP3/IMAP Service
  check_command		check_nt_service!SHOWALL!'Merak POP3 / IMAP'
  }


For for information run: ./check_nt --help | more in your libexec on the
server (wherever you put your nagios plugins)


~Jayson




-----Original Message-----
From: ntt broken [mailto:nttbroken at gmail.com] 
Sent: Tuesday, May 05, 2009 8:51 AM
To: Jim Avery
Cc: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] בנושא: Few questions (monitoring time, specific
service , event log).

Hello Jim!
Thank you for the quick reply.

"NSClient++ does this very well." - Well, the question is how.
Sorry but I am only familiar with basic NSClient++ configurations and
didn't found documentation for more advanced features.

For example let assume I want to monitor if Messenger service (from
services.msc) is not started and get notification via mail.
NSCA is configured in the Nagios linux server – how I do the service
related configuration in the NSclient++.
Where I need to configure it? In the ini file? What is the syntax? Can
you give an example for the line/code/configuration I need to add in
the NSclient? Pls be more detailed (remember I am a noob).

One more question –
So I need to update all my NSClients in all my monitored servers if I
want the services mentioned to be monitored, right?
I can't configure it in the Nagios linux server , right?

Thanks for helping me with it.


2009/5/5, Jim Avery <jim at jimavery.me.uk>:
> 2009/5/5 ntt broken <nttbroken at gmail.com>:
>>
>>
>> 1. Time @ Nagios server & time @ Client (Windows server 2003) are the
>> same
>> and notify if there's difference between them.
>>
>> I don't know of any such plug-in that is capable of doing that, for
>> example
>> that it records the time on a remote server and send it to Nagios, then
>> when
>> Nagios receives it , than it should execute a script that would
>>
>> compare the received time value of remote server to its local time and
>> send
>> you the notification if those are different.
>
>
> Not too sure, but suggest you have a look in http://nagiosexchange.org
> and search there for "ntp".
>
>
>> 2. Monitor specific services (for example application's service)
>>
>> a) Get notifications if a service is not in started mode.
>
> NSClient++ does this very well.
>
>> b) Get notifications if there's CPU load above level given (this is
>> related
>> to a specific service and not to the general cpu load).
>
> Again, I believe NSClient++ will do this for you.  If not you can find
> a plugin on NagiosExchange which does and run it under NSClient++
>
>> I found out how to do this for the machine's CPU load (but not to a
>> specific
>> service).
>
>> 3. Get notification if a specific message appeared in the windows server
>> event log (warning and error).
>
>
> Again, use NSClient++ for this.
>
> http://nsclient.org/nscp/
>
> If you need a kick-start to get it all working, I can recommend
> Wolfgang Barth's book "Nagios" published by No Starch Press.
> http://nostarch.com/nagios_2e.htm
>
> hth,
>
> Jim
>

----------------------------------------------------------------------------
--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue. 
::: Messages without supporting info will risk being sent to /dev/null
The information in this electronic mail message and any attached files is confidential and may be legally privileged.  If you are not the intended recipient, delete this message and contact the sender immediately.  Access to this message by anyone other than its intended recipient is unauthorized.  You must not use or disseminate this information as it is proprietary property of the True companies.  Communications on or through the True companies' computer systems may be monitored or recorded to secure effective system operation and for other lawful purposes.  Thank you.


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list