From: Alexander Barton Date: Thu, 21 Jan 2010 13:53:46 +0000 (+0100) Subject: Service update: log the IP address of the peer in the host status field X-Git-Tag: rel-2~18 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=nagcollect.git;a=commitdiff_plain;h=8f1a22e4afc931ae86a4661f0d4e0037e4b2073f Service update: log the IP address of the peer in the host status field --- diff --git a/server/web/nagcollect.php b/server/web/nagcollect.php index 3f07341..9b5637b 100644 --- a/server/web/nagcollect.php +++ b/server/web/nagcollect.php @@ -76,7 +76,9 @@ function processRequest($args) return 500; } else { // Service Update - if (!nagiosSubmitHost($host, 0, 'Received passive service check')) + $hostStatus = 'Received passive service check from ' + . '"' . $_SERVER['REMOTE_ADDR'] . '"'; + if (!nagiosSubmitHost($host, 0, $hostStatus)) return 500; if (!nagiosSubmitService($host, $service, $status, $text)) return 500;