Service update: log the IP address of the peer in the host status field
authorAlexander Barton <alex@barton.de>
Thu, 21 Jan 2010 13:53:46 +0000 (14:53 +0100)
committerAlexander Barton <alex@barton.de>
Thu, 21 Jan 2010 13:53:46 +0000 (14:53 +0100)
server/web/nagcollect.php

index 3f07341..9b5637b 100644 (file)
@@ -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;