mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -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]:");
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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");
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user