updates to application pollers. addition of mailscanner application poller. from Dennis de Houx

git-svn-id: http://www.observium.org/svn/observer/trunk@2634 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-10-02 09:41:55 +00:00
parent 1e65da9fa9
commit 4db9afe9f2
8 changed files with 335 additions and 16 deletions
+4 -2
View File
@@ -13,7 +13,7 @@
## Add the following to your snmpd.conf file:
## extend shoutcast /opt/observium/scripts/shoutcast.php
##
## Version 1.0 By:
## Version 1.1 By:
## All In One - Dennis de Houx <info@all-in-one.be>
##
########################################################################################
@@ -36,6 +36,8 @@
if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
die('<span style="color: #880000; text-weight: bold; font-size: 1.3em;">This script is only meant to run at the command line.</span>');
}
$cmd = (isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : "");
function get_data($host, $port) {
$fp = @fsockopen($host, $port, &$errno, &$errstr, 5);
@@ -108,7 +110,7 @@
}
}
if ($_SERVER['argv'][1] == "makeCache") {
if ($cmd == "makeCache") {
$servers = get_list($config);
$data = doSNMPv2($servers);
makeCacheFile($data, $cache);