We've moved to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.

Go to the Answer Hub

Nagios return status unknow

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Nagios return status unknow

Postby PhumeleleSJose96 » Sun Mar 20, 2022 11:22 pm

I install Nagios on CentOS to monitor some servers, and one of them is a TSM server.

I download a plugin written in bash when i execute it in command line it works.

/usr/lib64/nagios/plugins/check_tsm db -v6
db - database utilization 42%, OK
and the return code of the batch script is 0 ( from the command echo $? )

So the script work fine, and return 0 that mean a OK status in nagios, but the status still unknown, I really don't know why.

And i check logs in nagios, etc. It's not a problem of commands definition in commands.cfg or the declaration of service, because I copy the command that nagios send automatically every 5 min and the command works fine in command line, but still unknow status.

Definition of command:

define command{

command_name check_tsm_v6

command_line /usr/lib64/nagios/plugins/check_tsm $ARG1$ -v6 $ARG2$ $ARG3$

Service declaration :

define service{

use generic-service

host_name tsm-test

service_description database utilization

check_command check_tsm_v6!db!85!90
Posts: 7
Joined: Mon Feb 14, 2022 5:39 am

Re: Nagios return status unknow

Postby cormansa » Thu Mar 24, 2022 7:03 am

I think that the error is on your nagios config
Check the help about your script : https://exchange.nagios.org/directory/P ... sm/details

if $ARG2$ et $ARG3$ is the value for critical and warning, you need to change your command from
/usr/lib64/nagios/plugins/check_tsm $ARG1$ -v6 $ARG2$ $ARG3$
/usr/lib64/nagios/plugins/check_tsm $ARG1$ -v6 -w $ARG2$ -c $ARG3$

Posts: 6
Joined: Wed Feb 09, 2022 5:54 am
Location: Belgium

Return to Community Support

Who is online

Users browsing this forum: No registered users and 23 guests