Menu

No Output

Help
2006-10-19
2013-04-25
  • Alex Kamantauskas

    I am running NC_Net 2.28, with check_nc_net version 1.24 and nagios-plugins version 1.4.3

    I can run the following command from the command line and it works perfectly:

    # ./check_nt -H 10.10.34.10 -v COUNTER -l "\\LogicalDisk(C:)\\% Free Space" -w 15 -c 5
    \LogicalDisk(C:)\% Free Space = 45.85 %

    However, this command line from my checkcommand file returns "No Output":
    $USER1$/check_nt -H $HOSTADDRESS$ -v COUNTER -l "\\LogicalDisk(C:)\\%% Free Space" -w 15 -c 5

    Any ideas?  I'm stumped.

     
    • Alex Kamantauskas

      Oops, I meant this command line:

      $USER1$/check_nt -H $HOSTADDRESS$ -v COUNTER -l "\\LogicalDisk(C:)\\% Free Space" -w 15 -c 5

       
    • tony

      tony - 2006-10-19

      I currently do not have a Nagios host to verify the syntax.  But the problem is the syntax.  So you need to experiment to resolve the issue.

      I usually define the check_command something like:
      defune command check_nc_net_l_w_c
      $USER1$/check_nt -H $HOSTADDRESS$ -v $ARG1$ -l $ARG2$ -w $ARG3 -c $ARG4$

      with the service check passsing in the parameters:
      check_command    check_nc_net_l_w_c|COUNTER|\\LogicalDisk(C:)\\%% Free Space|15|5

      TO best diagnose the issue, it would be best to see exacly what NAgios is sending to NC_NET.  NC_NEt is expecting to recieve:
      8&\LogicalDisk(C:)\% Free Space

      Running from the command line the \\ are parsed as a single \.  I am not sure if nagios needs the \\ or just a \ in the position that you have it. also I am not sure if the -l is moved to the service check if it needs the \\ or \.

      also I believe(from memory) nagios uses the % and thus needs %% like you have it.

      AN alternate syntex for the COUNTER maight work better:
      I would first suggest trying: This eliminates the issue of \ or\\ but still has the % issue.
      $USER1$/check_nt -H $HOSTADDRESS$ -v COUNTER -l "^LogicalDisk^C:^% Free Space" -w 15 -c 5
      or
      $USER1$/check_nt -H $HOSTADDRESS$ -v COUNTER -l "^LogicalDisk^C:^%% Free Space" -w 15 -c 5

       

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.