diff --git a/galanga/nagios-irc-bot.pl b/galanga/nagios-irc-bot.pl index 3b44507..38386b2 100755 --- a/galanga/nagios-irc-bot.pl +++ b/galanga/nagios-irc-bot.pl @@ -276,6 +276,18 @@ sub on_public { { $conn->privmsg([ @to ], sprintf ( "ID inconnu: %d", $1 ) ); } + } elsif ($arg =~ /^(?:$mynick[,: ]|!)\s*recheck:?\s*all$/) { + #recheck all + for my $i ( 0..(@ACKS-1) ) + { + next unless($ACKS[$i]); + my ( $host, $svc ) = @{ $ACKS[$i] || [ undef, undef ] };; + open CMDPIPE,">",$nagioscmd; + printf CMDPIPE "[%lu] SCHEDULE_FORCED_SVC_CHECK;%s;%s;%lu\n",time(),$host,$svc,time(); + printf "[%lu] SCHEDULE_FORCED_SVC_CHECK;%s;%s;%lu\n",time(),$host,$svc,time(); + close CMDPIPE; + $conn->privmsg([ @to ], sprintf ( "Recheck forcé pour %s: %s", $host, $svc ) ); + } } else { $self->privmsg([ @to ], "Yo!"); }