From 88460b4a3010fbae6dd0aab68cbb959442531577 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sun, 20 Jun 2010 14:48:29 +0000 Subject: [PATCH] add applications polling infrastructure (OH YEAH!) git-svn-id: http://www.observium.org/svn/observer/trunk@1217 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/images/icons/apps.png | Bin 0 -> 555 bytes html/pages/device.php | 9 +++ html/pages/device/applications.inc.php | 73 +++++++++++++++++++ includes/polling/applications.inc.php | 25 +++++++ includes/polling/applications/apache.inc.php | 51 +++++++++++++ 5 files changed, 158 insertions(+) create mode 100755 html/images/icons/apps.png create mode 100644 html/pages/device/applications.inc.php create mode 100644 includes/polling/applications.inc.php create mode 100644 includes/polling/applications/apache.inc.php diff --git a/html/images/icons/apps.png b/html/images/icons/apps.png new file mode 100755 index 0000000000000000000000000000000000000000..851950db7c285f586d7ee74bcc417f225bdf18c1 GIT binary patch literal 555 zcmV+`0@VG9P)CjNr zUW1fN1d-Gd7r2N>l%796-}n2KALIT2^YO?eu@~9M*vzf-7i;%d+Nwx^J95X|kPDY1 zGh9Mum^%l$6{Q6;tonHam& z&u-m)+9C;(lg!W0^P=Y{J$aeIu9KK&6b^;p+My?$?QijWYk;}0r)e}Am>WqzqNC`2 z&bQ6)?2D%u>Kdo4V?>9yzpnCg;~hszOJrF_;)Rg}bEBg#TjxYM(AWKi=r@UR2yLC= z^Xf3~moMO(#>D=QByLU;NZgGixEo2m zUZ+l-#NFwTM29LuhehJSZEZZ_k>_v$^`U`{uGrzP*mgoQg002ovPDHLkV1oRO19t!b literal 0 HcmV?d00001 diff --git a/html/pages/device.php b/html/pages/device.php index d59ac3ea3..fe54f2e7b 100644 --- a/html/pages/device.php +++ b/html/pages/device.php @@ -65,6 +65,15 @@ if($health) { '); } +if(@mysql_result(mysql_query("select count(app_id) from applications WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') +{ + echo('
  • + + Apps + +
  • '); +} + ### This needs to die, rolled into generic sensors! (still need to implement booleans, tx/rx powers and currents) #$cisco_sensors = mysql_result(mysql_query("SELECT count(*) FROM `entPhysical` WHERE device_id = '".$device['device_id']."' AND entSensorType != '' AND entSensorType NOT LIKE 'No%'"),0); diff --git a/html/pages/device/applications.inc.php b/html/pages/device/applications.inc.php new file mode 100644 index 000000000..267643b7f --- /dev/null +++ b/html/pages/device/applications.inc.php @@ -0,0 +1,73 @@ +"); + echo(''); + } else { + echo(''); + } + echo(" " . $type_text[$type] ."\n"); + if ($_GET['opta'] == $type) { echo(""); } + $sep = " | "; +} + +print_optionbar_end(); + +if (is_file("pages/device/health/".mres($_GET['opta']).".inc.php")) +{ + include("pages/device/health/".mres($_GET['opta']).".inc.php"); +} else { + foreach ($datas as $type) { + if($type != "overview") { + $graph_title = $type_text[$type]; + $graph_type = "device_".$type; + include ("includes/print-device-graph.php"); + } + } +} + + +?> diff --git a/includes/polling/applications.inc.php b/includes/polling/applications.inc.php new file mode 100644 index 000000000..fd33155cd --- /dev/null +++ b/includes/polling/applications.inc.php @@ -0,0 +1,25 @@ + diff --git a/includes/polling/applications/apache.inc.php b/includes/polling/applications/apache.inc.php new file mode 100644 index 000000000..bcb8f58ca --- /dev/null +++ b/includes/polling/applications/apache.inc.php @@ -0,0 +1,51 @@ +