ability to disable inventory discovery and syslog display improvements

git-svn-id: http://www.observium.org/svn/observer/trunk@337 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-01-09 15:00:17 +00:00
parent 15cf3a1778
commit 1ce89de53b
4 changed files with 12 additions and 7 deletions

View File

@@ -72,8 +72,10 @@ $config['show_locations'] = 1; # Enable Locations on menu
### Which additional features should we enable?
$config['enable_bgp'] = 1; # Enable BGP session collection and display
$config['enable_syslog'] = 1; # Enable Syslog
$config['enable_syslog'] = 1; # Enable Syslog
$config['enable_billing'] = 1; # Enable BGP session collection and display
$config['enable_inventory'] = 1; # Enable Inventory
## If a syslog entry contails these strings it is deleted from the database
$config['syslog_filter'] = array("last message repeated", "Connection from UDP: [127.0.0.1]:");

View File

@@ -23,7 +23,6 @@ if($_GET[debug]) {
$year = time() - (365 * 24 * 60 * 60);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>

View File

@@ -27,11 +27,11 @@
<?php
if($_POST['string']) {
$where = " AND S.msg LIKE '%".$_POST['string']."%'";
$where = " AND msg LIKE '%".$_POST['string']."%'";
}
if($_POST['program']) {
$where .= " AND S.program = '".$_POST['program']."'";
$where .= " AND program = '".$_POST['program']."'";
}
$sql = "SELECT *, DATE_FORMAT(datetime, '%D %b %T') AS date from syslog WHERE device_id = '" . $_GET['id'] . "' $where";

View File

@@ -1,13 +1,15 @@
<?php
echo("Physical Inventory : ");
echo("Physical Inventory : ");
if($config['enable_inventory']) {
$ents_cmd = "snmpwalk -O qn -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'] . " ";
$ents_cmd .= "1.3.6.1.2.1.47.1.1.1.1.2 | sed s/.1.3.6.1.2.1.47.1.1.1.1.2.//g | cut -f 1 -d\" \"";
$ents = trim(`$ents_cmd | grep -v o`);
foreach(explode("\n", $ents) as $entPhysicalIndex) {
foreach(explode("\n", $ents) as $entPhysicalIndex) {
$ent_data = "snmpget -Ovqs -";
$ent_data .= $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'];
@@ -55,6 +57,8 @@
}
echo("\n");
} else { echo("Disabled!"); }
echo("\n");
?>