Hi,
I have a couple of servers which require some services to be installed. But because these additional services are for troubleshooting they should not be running all the time.
I'm is there a way via nc_net to verify that a service which should be stopped shows OK in Nagios when it's stopped, but when the service is started Nagios reports critical or warning.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Assuming you are using Check_nt or Check_nc_net this can be accomplished by modifying the ENUMSERVICE code or by adding code to handle threshold values to the SERVICESTATE or process state section of the check_nc_net. the code is in standard C (gcc) and you have to compile one of these anyway to use active checks with NC_NEt.
A second method would be to write a shell wrapper script that takes the output of check_nt/check_nc_net and modifys the result.
A third method is to write event handlers to nagios, (this I do not recomend due to other methods being easier.
A fourth method is to use the plugin "negate" which should be in the [Nagios Home]/libexec
from the command line run ./negate --help for more details
A fifth option would be to contract me (or someone else) to modify nc_net,check_nt/check_nc_net or write the wrapper script for you. Through contract work I can add anything to NC_NEt or create any other application or tool that a user may need.
For your question, I recomend using the Negate plugin that already exists, if it does not meet your needs and you need someone to do the modification of coding for you, please feel free to consider me for that task, since this objective should be only a few hours to complete.
Good Luck,
Please follow up with your resolution,
Tony
A second method of doing this to
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I always found that many of the plugins take time to learn. By going to each one and running their internal help on the command line, which is time consuming, but a good way to learn what tools are already availible.
TOny
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a couple of servers which require some services to be installed. But because these additional services are for troubleshooting they should not be running all the time.
I'm is there a way via nc_net to verify that a service which should be stopped shows OK in Nagios when it's stopped, but when the service is started Nagios reports critical or warning.
Assuming you are using Check_nt or Check_nc_net this can be accomplished by modifying the ENUMSERVICE code or by adding code to handle threshold values to the SERVICESTATE or process state section of the check_nc_net. the code is in standard C (gcc) and you have to compile one of these anyway to use active checks with NC_NEt.
A second method would be to write a shell wrapper script that takes the output of check_nt/check_nc_net and modifys the result.
A third method is to write event handlers to nagios, (this I do not recomend due to other methods being easier.
A fourth method is to use the plugin "negate" which should be in the [Nagios Home]/libexec
from the command line run ./negate --help for more details
A fifth option would be to contract me (or someone else) to modify nc_net,check_nt/check_nc_net or write the wrapper script for you. Through contract work I can add anything to NC_NEt or create any other application or tool that a user may need.
For your question, I recomend using the Negate plugin that already exists, if it does not meet your needs and you need someone to do the modification of coding for you, please feel free to consider me for that task, since this objective should be only a few hours to complete.
Good Luck,
Please follow up with your resolution,
Tony
A second method of doing this to
Thank you for taking time to so thoroughly reply to my question. I didn't know about the negate function (till now), but will give that a try.
I always found that many of the plugins take time to learn. By going to each one and running their internal help on the command line, which is time consuming, but a good way to learn what tools are already availible.
TOny
Yep that did exactly what I was looking for, thanks again.