How to configure check_nt PROCSTATE to only send Warning

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
caterpillartce
Posts: 117
Joined: Mon Jul 11, 2016 11:22 am

How to configure check_nt PROCSTATE to only send Warning

Post by caterpillartce »

Hello,

Please see attached screenshot. How do I configure this service to only send alerts as Warning, and not Critical? This is needed for monitoring some unimportant servers.

Thanks!
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How to configure check_nt PROCSTATE to only send Warning

Post by rkennedy »

Based on your wording, I'm not sure if you're trying to switch CRITICAL -> WARNING, or only have it notify on a warning state and NOT critical. I'll answer both methods though -
1. For switching CRITICAL -> WARNING, I would look at check_negate. Here's an example -

Normal check, comes back as CRITICAL.

Code: Select all

[root@localhost libexec]# ./check_dummy 2
CRITICAL
[root@localhost libexec]# echo $?
2
Use negate in front of check_dummy now.

Code: Select all

[root@localhost libexec]# ./negate -c WARNING ./check_dummy 2
CRITICAL
[root@localhost libexec]# echo $?
1
echo $? is just returning the exit code, in the first one you can see CRITICAL comes back as 2 (which is indeed CRITICAL), where as the second one running negate comes back as 1 (which represents WARNING - ignore the word CRITICAL). Nagios uses these exit codes to determine the status of a service.

2. If you just want to switch notifications around, look at the Alert Settings tab, and under Notification options check the w (for warning) box, and uncheck the c (for critical) box.
Former Nagios Employee
caterpillartce
Posts: 117
Joined: Mon Jul 11, 2016 11:22 am

Re: How to configure check_nt PROCSTATE to only send Warning

Post by caterpillartce »

Thanks for the reply! What I want is when java.exe crashes the alert comes in as WARNING, not Critical. The alert settings tab seems to be about notification - I do need to be notified when the situation being monitored occurs, and I do not want to suppress Critical notification. I just need to "change" Critical to be Warning.

So I think your method 1 would work... BUT I do not understand what I need to do. Could you be so kind as to "translate" it into the steps I need to take in Nagios web interface? I was thinking it would be one of the arguments that I put in -w... but after reading the description of check_nt, I still can't figure it out.

I appreciate the help!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How to configure check_nt PROCSTATE to only send Warning

Post by rkennedy »

No problem!

This document should walk you through that process (on using negate) - https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Former Nagios Employee
caterpillartce
Posts: 117
Joined: Mon Jul 11, 2016 11:22 am

Re: How to configure check_nt PROCSTATE to only send Warning

Post by caterpillartce »

Though the document only talked about changing "critical" to "normal", while what I wanted is to change "critical" to "warning", your command line example above helped! and I got what I wanted! Thanks! this can be closed.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: How to configure check_nt PROCSTATE to only send Warning

Post by dwhitfield »

Glad to hear it is resolved. I am going to lock the thread. Please feel free to post again if you have you another issue. Thank you for using the Nagios forums!
Locked