NAGIOS STATUS Unknown "USAGE:"

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
otaviorievert
Posts: 4
Joined: Wed Feb 27, 2013 1:34 pm

NAGIOS STATUS Unknown "USAGE:"

Post by otaviorievert »

Hi guys! And afternoon.

Right now I installed the nagios core 3.XX and already configure the NSClient++ on the windows hosts. But, when I go to nagios page, I see the following error

SrvNAME - CPU Load - UNKNOWN 02-27-2013 15:28:46 6d 7h 5m 43s 3/3 Usage:

Someone knows how to fix it? :roll:
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NAGIOS STATUS Unknown "USAGE:"

Post by abrist »

Could you post the command definition and the service definition in a code wrap?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
otaviorievert
Posts: 4
Joined: Wed Feb 27, 2013 1:34 pm

Re: NAGIOS STATUS Unknown "USAGE:"

Post by otaviorievert »

Of course.

Code: Select all

define service {
host_name SrvBKP01
notification_options w,u,c,r
service_description HardDrive C 
service_description HardDrive
check_command check_nt!USEDDISKSPACE!-l C -w 80 -c 90
}

Code: Select all

define service {
use generic-service
service_description Disco C
host_name SrvBKP01
notification_options w,u,c,r
check_command check_nt!USEDDISKSPACE! -w 80 -c 90
}
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NAGIOS STATUS Unknown "USAGE:"

Post by abrist »

These are definitions for hard disk volume checks, not cpu load. Which do you want to work on first? If disk checks, I need the error you are receiving, if load, I will need the definitions for those commands.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
otaviorievert
Posts: 4
Joined: Wed Feb 27, 2013 1:34 pm

Re: NAGIOS STATUS Unknown "USAGE:"

Post by otaviorievert »

abrist wrote:These are definitions for hard disk volume checks, not cpu load. Which do you want to work on first? If disk checks, I need the error you are receiving, if load, I will need the definitions for those commands.
The error occurs on CPULOAD and USEDDISKSPACE, on nagios they get the unknown status and on status description "usage:"

Code: Select all

define service {
host_name SrvBKP01
notification_options w,u,c,r
service_description HardDrive C 
service_description HardDrive
check_command check_nt!CPULOAD!-l  5,80,90
}
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NAGIOS STATUS Unknown "USAGE:"

Post by slansing »

You should remove one of those two service definitions, also you will need to remove the extra spaces between the -l parameters and the flag:

From:

Code: Select all

check_command check_nt!CPULOAD!-l  5,80,90
To:

Code: Select all

check_command check_nt!CPULOAD!-l 5,80,90
otaviorievert
Posts: 4
Joined: Wed Feb 27, 2013 1:34 pm

Re: NAGIOS STATUS Unknown "USAGE:"

Post by otaviorievert »

slansing wrote:You should remove one of those two service definitions, also you will need to remove the extra spaces between the -l parameters and the flag:

From:

Code: Select all

check_command check_nt!CPULOAD!-l  5,80,90
To:

Code: Select all

check_command check_nt!CPULOAD!-l 5,80,90
I do that, but the error still occurs.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NAGIOS STATUS Unknown "USAGE:"

Post by abrist »

What errors are you receiving logs?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: NAGIOS STATUS Unknown "USAGE:"

Post by gshergill »

Hi otaviorievert,

Code: Select all

define service {
host_name SrvBKP01
notification_options w,u,c,r
service_description HardDrive C 
service_description HardDrive
check_command check_nt!CPULOAD!-l  5,80,90
}
I'm slightly confused here - You have "service_description" twice, and you haven't defined a "use" line either. As far as I can see, you are missing necessary lines for defining a service (hence requirement of "use") and secondly service_description is a unique identifier, and you have it appearing twice here with two separate names, as well as them being the same names for another service for the host:
(from your 2nd post)

Code: Select all

define service {
host_name SrvBKP01
notification_options w,u,c,r
service_description HardDrive C 
service_description HardDrive
check_command check_nt!USEDDISKSPACE!-l C -w 80 -c 90
}
The lines I am referring to are:

Code: Select all

service_description HardDrive C 
service_description HardDrive
It may be worth removing one of these from USEDDISKSPACE on host SrvBKP01, and defining a new name for CPULOAD on SrvBKP01.
Also add:

Code: Select all

use generic-service
Kind Regards,

Gary Shergill
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NAGIOS STATUS Unknown "USAGE:"

Post by abrist »

@otaviorievert: did you follow gshergill's suggestions? Did they resolve your problems?

@gshergill: Spot on.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked