check_ircd woes

Marc Powell mpowell at ena.com
Mon Oct 27 19:00:56 CET 2003



> -----Original Message-----
> From: Lance Albertson [mailto:ramereth at gentoo.org]
> Sent: Friday, October 24, 2003 4:53 PM
> To: nagios-users at lists.sourceforge.net
> 
> On Fri, 2003-10-24 at 16:44, Marc Powell wrote:
> > Well, I would suggest modifying the service definition by dropping
the
> > hostgroup_name line and replacing it with a single host_name line as
a
> > test. Maybe it's something wacky with the expansion of the
> > hostgroup_name.
> 
> I do that and I get this. I even added -w 50 -c 100 to the command
> definition.
> 
> Invalid warning threshold: -H=209.248.79.90

Looking at the code, I see where it prints out the Invalid warning
threshold error message, but I can't for the life of me figure out how
it's possible for it to print out as above. In any event, something is
decidedly wrong and I'm willing to bet it's not nagios' substitution of
$HOSTADDRESS$ because of the jumbling of command line options.

Back to basics -

- Stop nagios and kill any processes that may remain (I'm thinking there
might be some because of the intermittent behavior you mention below).
- Continue to use the single host instead of hostgroup for now.
- Start nagios and see if the behavior continues.
- If so, try adding some debugging to check_ircd as below to make sure
you're getting passed what you think you're getting passed --

[root at gemini libexec]# diff -C 5 check_ircd check_test 
*** check_ircd  Thu Aug 15 16:52:33 2002
--- check_test  Mon Oct 27 11:54:24 2003
***************
*** 192,201 ****
--- 192,205 ----
        if ($opt_V) {
                print_revision($PROGNAME,'$Revision: 1.3 $ ');
                exit $ERRORS{'OK'};
        }
  
+ 
+       print "Host: $opt_H, warning: $opt_w, critical: $opt_c";
+       exit $ERRORS{'OK'};
+ 
        if ($opt_h) {print_help(); exit $ERRORS{'OK'};}
  
        ($opt_H) || ($opt_H = shift) || usage("Host name/address not
specified\n");
        my $remotehost = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/);
        ($remotehost) || usage("Invalid host: $opt_H\n");

- Worst case, try retyping the command definition... Maybe there's some
weird control characters you can't see that are confusing the plugin.
Not likley but not out of the realm of possibility. You'll need to
restart nagios again, of course.

--
Marc

> 
> And to verify what I have in checkcommands.cfg:
> 
> define command {
>     command_name check_ircd
>     command_line $USER1$/check_ircd -H $HOSTADDRESS$ -w 50 -c 100
> }
> 
> I've also tried other combinations of the command definition using -w
> $ARG1$ -c $ARG2$. I even changed the order of the commands, still with
> no luck. Sometimes it'll say the same error, but instead of -H its -w.
> It's really strange...
> 
> > If that works, (or if it doesn't) also include the host and
hostgroup
> > definitions.
> 
> Here's the host definition for the host I tried:
> 
> define host {
>     use         generic-host
>     host_name   us.co
>     alias       us.co.nixhelp.org
>     address     209.248.79.90
>     check_command         check-host-alive
>     max_check_attempts    10
>     notification_interval 120
>     notification_period   24x7
>     notification_options  d,r
> }


-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list