Add logging message

This commit is contained in:
Benjamin Drieu 2016-10-04 16:26:39 +02:00 committed by root
parent 5eaa81d5c8
commit 5bd8fa7daa
1 changed files with 1 additions and 0 deletions

View File

@ -181,6 +181,7 @@ sub on_public {
open CMDPIPE,">",$nagioscmd;
my ( $host, $svc ) = @{ $ACKS[$1] || [ undef, undef ] };
if ( defined $host && defined $svc ) {
$self->privmsg([ @to ], "$nick: ok, acknowledgment (if any) for $host:$svc has been added.");
printf CMDPIPE "[%lu] ACKNOWLEDGE_SVC_PROBLEM;%s;%s;1;1;1;%s;%s\n",time(),$host,$svc,$nick,$2;
} elsif ( defined $host ) {
printf CMDPIPE "[%lu] ACKNOWLEDGE_HOST_PROBLEM;%s;1;1;1;%s;%s\n",time(),$host,$nick,$2;