Cannot show correct information about disks with nagios 3.x


#1

Hello,

I installed nagios in a ubuntu version from linux I tried to have some generic-service and try to configure for windows machine all the same I’ve tried with NSClient+±Win32-0.3.3 and 0.3.5 and always append the same.

define service{
use generic-service
host_name my server 1
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l C -w 80 -c 90
}
#define service{

use generic-service

host_name myu server 2

service_description W:\ Drive Space

check_command check_nt!USEDDISKSPACE!-l w -w 80 -c 90

}

define service{
use generic-service
host_name my server 3
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90

And in the http the information appears like this.

C:\ Drive Space

CRITICAL 	10-09-2008 14:49:31 	0d 1h 55m 20s 	3/3 	CRITICAL - Socket timeout after 10 seconds 

C:\ Drive Space

CRITICAL 	10-09-2008 14:46:49 	0d 0h 14m 39s 	3/3 	C: - total: 12.00 Gb - used: 10.80 Gb (90%) - free 1.20 Gb (10%)  **"Althouth this machine has 60GB hard disk not one of 12 GB"**

C:\ Drive Space

OK 	10-09-2008 14:47:01 	1d 2h 56m 39s 	1/3 	C: - total: 12.00 Gb - used: 5.97 Gb (50%) - free 6.04 Gb (50%)  **"Althouth this machine has 60GB hard disk not one of 12 GB"**

Can anyone help me understand what it is going wrong, I couldn’t figure it out.

Best Regards,
LMS


#2

What is the real problem here? I don’t fully understand.
If you’re asking about the disk size, maybe the C: drive is only a partition of that 60GB disk?
As for the first http info with socket timeout, the only difference I see is the capital C letter in your check_command of first service definition, although I’m not very sure that could be the problem.

And how do you get three http info’s for C: drive when only two services are defined (the middle one is commented out and contains check_nt for the W: disk). Be more specific when posting such things for better understanding :slight_smile:


#3

As I was saying my hard disk is 60Gb and the nagios only detects 12GB, it won’t be the capital letters because I tried and the result is the same.

The service appears as with three information because I had the same service defined for three servers with same identical disks and the problem persists.

Best Regards
LMS


#4

Could you post the check_nt command definition you have?

[blockquote]The service appears as with three information because I had the same service defined for three servers with same identical disks and the problem persists.[/blockquote]
In the second (commented out) definition you have wrong host_name. And I don’t quite get why you have commented out it here. Do you use it or not. If it is commented out, then you do not use it. Very confusing…

Do you have anywhere installed disks/partitions with 12GB size? Maybe somewhere there is typing error or similar host_name variable which Nagios could confuse. Dpn’t know, wild guess. That’s why I have requested to be more specific. Maybe you could post command definition as I’ve already said, host definition, service template definition and correct (uncommented) service definitions.

Just to be sure, are you reloading Nagios when you change something in configuration?

What do log files say, on both sides (linux and windows)?


#5

define service{
use generic-service
host_name my server 1
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l C -w 80 -c 90
}
define service{
use generic-service
host_name my server 2
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c
}
Linux Log

SERVICE NOTIFICATION: nagiosadmin;my server 1;C:\ Drive Space;CRITICAL;notify-service-by-email;CRITICAL - Socket timeout after 10 seconds

Windows log

2008-10-14 13:29:33: error:.\NSCAThread.cpp:173: <<< Could not connect to: :5667 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Thanks for the help

Best Regards,
LMS


#6

Hm, the error seems to be on the Windows side. Check this and see if it helps:
trac.nakednuns.org/nscp/discussi … essage=287

And, you’ve forgot to post the check_nt command definition form the nt.cfg file in the /etc/nagios-plugins directory.
It could help to see if there is a parameter problem at the check_command variable in the service definitions