Menu

check services which should not be running

Help
denomales
2007-06-11
2013-04-25
  • denomales

    denomales - 2007-06-11

    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.

     
    • tony

      tony - 2007-06-11

      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

       
      • denomales

        denomales - 2007-06-17

        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.

         
        • tony

          tony - 2007-06-17

          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

           
      • denomales

        denomales - 2007-06-27

        Yep that did exactly what I was looking for, thanks again.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.