mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
nms nms nms
git-svn-id: http://www.observium.org/svn/observer/trunk@1331 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -29,7 +29,7 @@ LM-Sensors setup
|
|||||||
|
|
||||||
For lm-sensors/net-snmp to put your temperatures in the "Temp" group (as
|
For lm-sensors/net-snmp to put your temperatures in the "Temp" group (as
|
||||||
opposed to the "Misc" group, their name needs to start with "temp"; for
|
opposed to the "Misc" group, their name needs to start with "temp"; for
|
||||||
Observer to see the interface the name should start with "temp-" (i.e.
|
ObserverNMS to see the interface the name should start with "temp-" (i.e.
|
||||||
temp-CPU, temp-System). You can change this in /etc/sensors.conf - change
|
temp-CPU, temp-System). You can change this in /etc/sensors.conf - change
|
||||||
the label descriptions if necessary, under your specific chipset block.
|
the label descriptions if necessary, under your specific chipset block.
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Please see COPYING for usage requirements and restrictions.
|
|||||||
Introduction
|
Introduction
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Observer is an auto-discovering network monitoring system.
|
ObserverNMS is an auto-discovering network monitoring system.
|
||||||
|
|
||||||
It's designed to be an easily-navigable interface to the health of your network.
|
It's designed to be an easily-navigable interface to the health of your network.
|
||||||
|
|
||||||
@@ -30,12 +30,12 @@ Planned Features
|
|||||||
* Pseudowire (MPLS/L2TP) tracking * In Progress
|
* Pseudowire (MPLS/L2TP) tracking * In Progress
|
||||||
* MPLS IP-VPN tracking * In Progress
|
* MPLS IP-VPN tracking * In Progress
|
||||||
* 95th and metered usage tracking * In Progress
|
* 95th and metered usage tracking * In Progress
|
||||||
* Nagios Integration * Too scary for contempation
|
* Nagios Integration * Too scary for contemplation
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Installation of Observer is currently not for the faint of heart! There is no automated
|
Installation of ObserverNMS is currently not for the faint of heart! There is no automated
|
||||||
install script, so it'll probably take quite a bit of fiddling!
|
install script, so it'll probably take quite a bit of fiddling!
|
||||||
|
|
||||||
Please see http://www.observernms.org.
|
Please see http://www.observernms.org.
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Database: `observer`
|
-- Database: `observernms`
|
||||||
--
|
--
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|||||||
@@ -128,11 +128,11 @@ print_optionbar_end(); ?>
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$observer_version = $config['version'];
|
$observernms_version = $config['version'];
|
||||||
if (file_exists('.svn/entries'))
|
if (file_exists('.svn/entries'))
|
||||||
{
|
{
|
||||||
$svn = File('.svn/entries');
|
$svn = File('.svn/entries');
|
||||||
$observer_version .='-SVN r' . trim($svn[3]);
|
$observernms_version .='-SVN r' . trim($svn[3]);
|
||||||
unset($svn);
|
unset($svn);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ print_optionbar_start(NULL);
|
|||||||
echo("
|
echo("
|
||||||
<h3>Versions</h3>
|
<h3>Versions</h3>
|
||||||
<table width=100% cellpadding=3 cellspacing=0 border=0>
|
<table width=100% cellpadding=3 cellspacing=0 border=0>
|
||||||
<tr valign=top><td width=150><b>ObserverNMS</b></td><td>$observer_version</td></tr>
|
<tr valign=top><td width=150><b>ObserverNMS</b></td><td>$observernms_version</td></tr>
|
||||||
<tr valign=top><td><b>Apache</b></td><td>$apache_version</td></tr>
|
<tr valign=top><td><b>Apache</b></td><td>$apache_version</td></tr>
|
||||||
<tr valign=top><td><b>PHP</b></td><td>$php_version</td></tr>
|
<tr valign=top><td><b>PHP</b></td><td>$php_version</td></tr>
|
||||||
<tr valign=top><td><b>MySQL</b></td><td>$mysql_version</td></tr>
|
<tr valign=top><td><b>MySQL</b></td><td>$mysql_version</td></tr>
|
||||||
|
|||||||
+2
-2
@@ -5,7 +5,7 @@ global $valid_temp;
|
|||||||
if($device['os_group'] == "unix")
|
if($device['os_group'] == "unix")
|
||||||
{
|
{
|
||||||
# FIXME snmp_walk
|
# FIXME snmp_walk
|
||||||
# Observer-style temperature
|
# ObserverNMS-style temperature
|
||||||
$oids = shell_exec($config['snmpwalk'] . " -M " . $config['mibdir'] . " -M " . $config['mibdir'] . " -".$device['snmpver']." -m SNMPv2-SMI -Osqn -CI -c ".$device['community']." ".$device['hostname'].":".$device['port']." .1.3.6.1.4.1.2021.7891 | sed s/.1.3.6.1.4.1.2021.7891.// | grep '.1.1 ' | grep -v '.101.' | cut -d'.' -f 1");
|
$oids = shell_exec($config['snmpwalk'] . " -M " . $config['mibdir'] . " -M " . $config['mibdir'] . " -".$device['snmpver']." -m SNMPv2-SMI -Osqn -CI -c ".$device['community']." ".$device['hostname'].":".$device['port']." .1.3.6.1.4.1.2021.7891 | sed s/.1.3.6.1.4.1.2021.7891.// | grep '.1.1 ' | grep -v '.101.' | cut -d'.' -f 1");
|
||||||
$oids = trim($oids);
|
$oids = trim($oids);
|
||||||
if ($oids) echo("Observer-Style ");
|
if ($oids) echo("Observer-Style ");
|
||||||
@@ -18,7 +18,7 @@ if($device['os_group'] == "unix")
|
|||||||
$descr_query = $config['snmpget'] . " -M " . $config['mibdir'] . " -".$device['snmpver']." -m SNMPv2-SMI -Osqn -c ".$device['community']." ".$device['hostname'].":".$device['port']." .1.3.6.1.4.1.2021.7891.$oid.2.1 | sed s/.1.3.6.1.4.1.2021.7891.$oid.2.1\ //";
|
$descr_query = $config['snmpget'] . " -M " . $config['mibdir'] . " -".$device['snmpver']." -m SNMPv2-SMI -Osqn -c ".$device['community']." ".$device['hostname'].":".$device['port']." .1.3.6.1.4.1.2021.7891.$oid.2.1 | sed s/.1.3.6.1.4.1.2021.7891.$oid.2.1\ //";
|
||||||
$descr = trim(str_replace("\"", "", shell_exec($descr_query)));
|
$descr = trim(str_replace("\"", "", shell_exec($descr_query)));
|
||||||
$fulloid = ".1.3.6.1.4.1.2021.7891.$oid.101.1";
|
$fulloid = ".1.3.6.1.4.1.2021.7891.$oid.101.1";
|
||||||
discover_temperature($valid_temp, $device, $fulloid, $oid, "observer", $descr, "1", NULL, NULL, NULL);
|
discover_temperature($valid_temp, $device, $fulloid, $oid, "observernms", $descr, "1", NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
## Very basic parser to parse classic Observer-type schemes.
|
## Very basic parser to parse classic ObserverNMS-type schemes.
|
||||||
## Parser should populate $port_ifAlias array with type, descr, circuit, speed and notes
|
## Parser should populate $port_ifAlias array with type, descr, circuit, speed and notes
|
||||||
|
|
||||||
unset ($port_ifAlias);
|
unset ($port_ifAlias);
|
||||||
|
|||||||
@@ -216,13 +216,13 @@ if(isset($_SERVER['HTTPS'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
### Connect to database
|
### Connect to database
|
||||||
$observer_link = mysql_pconnect($config['db_host'], $config['db_user'], $config['db_pass']);
|
$observernms_link = mysql_pconnect($config['db_host'], $config['db_user'], $config['db_pass']);
|
||||||
if (!$observer_link) {
|
if (!$observernms_link) {
|
||||||
echo "<h2>MySQL Error</h2>";
|
echo "<h2>ObserverNMS MySQL Error</h2>";
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
$observer_db = mysql_select_db($config['db_name'], $observer_link);
|
$observernms_db = mysql_select_db($config['db_name'], $observernms_link);
|
||||||
|
|
||||||
# Set some times needed by loads of scripts (it's dynamic, so we do it here!)
|
# Set some times needed by loads of scripts (it's dynamic, so we do it here!)
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ include("includes/discovery/functions.inc.php");
|
|||||||
include_once('Net/SmartIRC.php');
|
include_once('Net/SmartIRC.php');
|
||||||
|
|
||||||
|
|
||||||
class observerbot
|
class observernmsbot
|
||||||
{
|
{
|
||||||
|
|
||||||
function device_info (&$irc, &$data)
|
function device_info (&$irc, &$data)
|
||||||
@@ -52,7 +52,7 @@ $port = 6667;
|
|||||||
$nick = "ObserverBOT";
|
$nick = "ObserverBOT";
|
||||||
$chan = "#observernms";
|
$chan = "#observernms";
|
||||||
|
|
||||||
$bot = &new observerbot( );
|
$bot = &new observernmsbot( );
|
||||||
$irc = &new Net_SmartIRC( );
|
$irc = &new Net_SmartIRC( );
|
||||||
$irc->setUseSockets( TRUE );
|
$irc->setUseSockets( TRUE );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user