Page 1 of 1

Negate issue

Posted: Tue Dec 11, 2018 2:31 pm
by BanditBBS
Running a MSSQL query check that I want to negate from CRITICAL to WARNING. The command is defined as:

Code: Select all

$USER1$/negate -c WARNING -s $USER1$/check_mssql -H $HOSTADDRESS$ $ARG1$
Then $ARG1$ is filled with all the information. If we hit the "Run Check Command" button it works great and if we test from cli it works great. Once we applied in CCM the resilt is a WARNING state with this text:

Code: Select all

Error output from command:
No entry for terminal type "unknown";
using dumb terminal settings.
Any idea on what can be causing the issue? If we revert the command bac to not using negate it shows up as OK or CRITICAL as it should.

Thanks

Re: Negate issue

Posted: Tue Dec 11, 2018 4:22 pm
by tgriep
Typically when you see that message, it is because of the special characters in the $ARG$ fields are not excaped.
When using the "Run Check Command" button, it escapes the command for you if needed and if it does it correctly, it will work for you.
What you could do is to use the "Run Check Command" button again and verify that the command in the CCM matches and see if that works for you.

You may want to refer to this KB article as well.
https://support.nagios.com/kb/article/n ... s-580.html

Re: Negate issue

Posted: Wed Dec 12, 2018 10:36 am
by BanditBBS
Compared what the run command button generates and what I have in ARG1 and it is identical. I'm at a loss as to what could be causing this weirdness.

Re: Negate issue

Posted: Wed Dec 12, 2018 12:59 pm
by tgriep
Could you post or PM me the full service configuration so we can test the settings and see if we can recreate it?