NIS check?
Subhendu Ghosh
sghosh at sghosh.org
Fri Jan 17 07:04:36 CET 2003
the bug is not platform dependent as far as I can see.
the issue is further up - lines 32/33 followed by the "if"
statement in line 266
- changed default state to UNKNOWN and undefined opt_c
changes have been committed CVS.
-sg
On Thu, 16 Jan 2003, Will Melick wrote:
> Hmmm...is this the issue?
>
> check_rpc.pl looks for these responses from rpcinfo:
>
> if ( $line =~ /program $prognum version ([0-9]*) ready and waiting/ ) {
> $response .= " version $1";
> $state = 'OK' unless $state ne 'OK';
> print "1:$response \n" if $verbose;
> }
> if ( $line =~ /program $prognum version ([0-9]*) is not
> available/ ) {
> $response2 .= " version $1";
> $state = 'CRITICAL';
> print "2:$response2 \n" if $verbose;
> }
> if ( $line =~ /program $prognum is not available/ ) {
> $response3 = "";
> $response3 = "tcp" if $opt_t;
> $response3 = "udp" if $opt_u;
> $state = 'CRITICAL';
> print "3:$response3 \n" if $verbose;
> }
> }
>
> but rpcinfo answers like this:
>
> (normal state here for ypbind):
>
>
> [nagios at river nagios]$ rpcinfo -u 10.10.77.60 ypbind
> program 100007 version 1 ready and waiting
> program 100007 version 2 ready and waiting
>
>
> (failed state for ypbind):
>
>
> [nagios at river nagios]$ rpcinfo -u 10.10.77.60 ypbind
> rpcinfo: RPC: Program not registered
> program 100007 is not available
>
>
> So perhaps we should add an if statement to the perl script that sets
> $state to 'CRITICAL' if it gets "rpcinfo: RPC: Program not registered"
>
> e.g.
>
> }
> if ( $line =~ /rpcinfo: RPC: Program not registered/ ) {
> $response4 = "";
> $response4 = "tcp" if $opt_t;
> $response4 = "udp" if $opt_u;
> $state = 'CRITICAL';
> print "4:$response4 \n" if $verbose;
> {
>
>
>
> Is it that easy? Or am I missing something?
>
> Thanks,
> -Will
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by: Thawte.com
> Understand how to protect your customers personal information by implementing
> SSL on your Apache Web Server. Click here to get our FREE Thawte Apache
> Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
>
--
-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
More information about the Users
mailing list