From 8f1a22e4afc931ae86a4661f0d4e0037e4b2073f Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Thu, 21 Jan 2010 14:53:46 +0100 Subject: [PATCH] Service update: log the IP address of the peer in the host status field --- server/web/nagcollect.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.20.1