Menu

check_nt connection refused when using nagios

Help
sgruttmann
2007-07-30
2013-04-25
  • sgruttmann

    sgruttmann - 2007-07-30

    Hi,

    I´m going nuts with following problem (sorry if this is an absurd question, but I´m new with nagios and I have no idea anymore)
    I´m using follwing syntax to check eventlog entries on a win3000 server:
    check_nt -H xxx  -v EVENTLOG_NEW -l "Application^Error^5^ACESERVER^15156,15119^"

    At commandline it´s working fine.
    When I`m configuring services and checkcommands in Nagios, Nagios sends the message "connection refused"
    What I did:
    - check permissions for nagios user = ok
    - check request with/without -p (port1249)option = ok
    - check FW/Anti Virus on Windows client = ok
    - there`s no password defined for NC_Check on Windows client

    Maybe I don´t see the wood for the trees

    Please help and thanks
    Susanne

    services.cfg

    define service{
            use                             onetime-service         ; Name of service template to use
            host_name                           xxx
            service_description             Status_ACE_SYNC
            check_command                 check_nt_eventlog ! Application^Error^5^ACESERVER^15156,15119^
            notification_options             c,r            
            }

    checkcommand.cfg

    define command{
           command_name    check_nt_eventlog
           command_line    $USER1$/check_nt -H $HOSTADDRESS$ -v EVENTLOG_NEW
        -l $ARG1$
        }

     
    • tony

      tony - 2007-07-30

      I found the check command in the Nagios v3 documantation a bit clearer, because it more closely resembles the command line arguments.

      define command{
          command_name    check_nt
          command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 1248  -v $ARG1$ $ARG2$
          }

      define service{
      use onetime-service ; Name of service template to use
      host_name xxx
      service_description Status_ACE_SYNC
      check_command check_nt_eventlog !EVENTLOG_NEW!-l "Application^Error^5^ACESERVER^15156,15119^"
      notification_options c,r 
      }

      With no password explicity listed NC_NET and check_NT use the default password of "None"
      Your error of connection refused would indicate that something has failed somewhere,

      IS the Host Address correct in the Nagios??
      If you can send the command via the command line of the Nagios Server, and it works then you know the problem is not from the windows Host.

      Make sure you have the correct check_nt in the right location,
      Make sure the permissions and user are set correclty,
      make sure the HOST configuration has the corect NAme/IP

      If the hostname is setup as the Host_name, try it as the IP and see if that makes a difference.

      Just a few suggestions, to help get you started, but usually it is something simple that was an oversight when issues like this occure.

      Tony (author of NC_NEt)

       
      • sgruttmann

        sgruttmann - 2007-08-01

        Hi Tony,

        many thanks for your help.
        I tried the syntax as recommended and everything is fine now. The syntax which described in the NAGIOS book I have is based on V2 and different to V3. Good to know, particular for NAGIOS beginners like me ;-)

        thank you very much again :-)

        kind regards
        Susanne

         
        • tony

          tony - 2007-08-01

          the syntex that you used did not look bad, and should have worked; I did not try it.  I usually add some "" onto the $args$ in the command line to assist in parsing, because sometimes the "" get lost when they are in the check_command and the -l contains spaces.

          TOny

           

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.