Monitoring NT using Nagios - check_nt


#1

Hello All,

I started using Nagios last week and really really like it… Thank you developers

I would like to monitor my 2K servers using Nagios… I’m currently using check_nt

I added the following services: Disk Space, CPU load and Uptime
in Nagios I’m getting the following msg: check_nt: Unknown argument: (null) for Disk Space and CPU Load. Up time is working fine

if I run the ./check_nt -H 192.168.x.x -p 1248 -v USEDDISKSPACE -l C -w 80 -c 90 from linux, it is displaying the result just fine…

Can somebody help me with this…and would you guys recommend different type of plug-in

Thanks all


#2

Here is how I do it and mine seems to work fine-

I will use the D drive on a machine called tflserver as an example.

In checkcommands.cfg:

define command {
command_name check_nt_disk
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v USEDDISKSPACE -l $ARG1$ -w $ARG2$ -c $ARG3$
}

In srvr_disk_d.cfg:

define service {
host_name tflserver
service_description Disk D:
is_volatile 0
check_command check_nt_disk!d!90!95
max_check_attempts 1
normal_check_interval 10
retry_check_interval 10
active_checks_enabled 1
passive_checks_enabled 1
check_period 24x7
parallelize_check 1
obsess_over_service 1
check_freshness 0
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 0
retain_status_information 1
retain_nonstatus_information 1
contact_groups pager
notification_interval 15
notification_period 24x7
notification_options w,c
notifications_enabled 1
register 1
}

Hope this helps.

If you would like, post your configs and maybe we can help you figure out whats going on.

-Jimi

PS- sorry about the odd alignment, for some reason the forum will not left me switch to right justified…


#3

Thanks Jimi

here is my config:

checkcommands.cfg:

define command{
command_name check_nt_disk
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v USEDDISKSPACE -l $ARG1$ -w $ARG2$ -c $ARG3$
}

Services.cfg:

define service {
host_name rep01
service_description Disk Space
check_command check_nt_disk
check_period 24x7
max_check_attempts 5
normal_check_interval 2
retry_check_interval 1
contact_groups sql
notification_interval 60
notification_period 24x7
notification_options w,u,c,r
}

Thanks


#4

you are missing the arguements in the services.cfg after check_nt_disk. it should be like check_command check_nt_disk!d!90!95

so try doing check_nt_disk!(drive letter)!(warn %)!(critical %)


#5

jimi, do I need to install anything on the windows box beside the NSClient. I read the documents and the requirements are:

  • Jedi Code Library
  • Full Win32 Api from Marcel van Brakel

and then the above application requires a Delphi which is not free… how did you do it exactly… Thanks again for your help


#6

i just have nsclient running as a service on both 2000 and 2003 server. i dont have anything like a jedi code library or the win32 api. I use a client called PNSClient


#7

try changing the

check_command check_nt_disk

to

check_command check_nt_disk!c!80!90

i bet that will fix you right up.


#8

it worked ok actually… thanks a lot… what about the CPU load:

define service {
host_name rep01
service_description CPU Load
check_command check_nt_cpuload!0!50!55
check_period 24x7
max_check_attempts 5
normal_check_interval 2
retry_check_interval 1
contact_groups sql
notification_interval 60
notification_period 24x7
notification_options w,u,c,r
}

I’m getting: not enough values for -l parameters

Monitoring Dual Xeon

Thanks again


#9

im not absolutely sure about this but from what i saw messing around with the CPULOAD variable, the first -l (param) value can not be 0. try adding a value greater then 0.

CPULOAD = Average CPU load on last x minutes.
Request a -l parameter with the following syntax:
-l ,,.
should be less than 24*60.
Thresholds are percentage and up to 10 requests can be done in one shot.
ie: -l 60,90,95,120,90,95


#10

Thanks a lot … it’s working now… quick question for you: Can I use nagios to Monitor DB on SQL i.e: DB Size, Transaction Log size, etc… if yes, could you please tell me the plugin name…

Thanks again, I won’t bother you anymore


#11

No bother at all buddy. :slight_smile:

I dont personally do that but a google search turns up this
nagios.org/faqs/viewfaq.php?faq_id=156

Additionally, there seem to be a few plugins on nagiosexchange you might want to look into.

nagiosexchange.org/Search_Pr … earch%5D=1

Hope that helps.


#12

Thanks…I’m actually using the one in the NagiosExchange… not a big deal anyway… Thanks again … you have been really helpful


#13

/downloads/src/nagios-plugins-1.4.2/contrib/check_mssql.sh