NagMIN Event Handler

Martin, Stanley G [Contractor for Sprint] Stanley.G.Martin at mail.sprint.com
Thu Apr 15 21:52:20 CEST 2004


I've been getting service alerts logged into my database for a while now
and noticed that none of the host alerts were.  In checking the file
Events.pm the number of arguments passed on a host alert is 10, not 9.
This was always failing when a host alert occurred because since 10
arguments were being passed, it also failed the insert into the service
table because that has 13 fields.

if ($c == 9) {   # <- Change this to 10
    $sql = "INSERT INTO HostAlerts VALUES ('".join("','", at ARGV)."')";
 } else {
    $sql = "INSERT INTO ServiceAlerts VALUES ('".join("','", at ARGV)."')";
 }

Stanley G. Martin
System Administrator
Sprint - EAS Business Intelligence 
Stanley.G.Martin at mail.sprint.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040415/02aa8c8a/attachment.html>


More information about the Users mailing list