]> arthur.barton.de Git - nagcollect.git/commitdiff
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 3f07341787bc5560100445b2f90c35cff2642242..9b5637b2e66144f8cea0694c23b44e6ca5e6c113 100644 (file)
@@ -76,7 +76,9 @@ function processRequest($args)
                        return 500;
        } else {
                // Service Update
                        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;
                        return 500;
                if (!nagiosSubmitService($host, $service, $status, $text))
                        return 500;