mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove user-facing references to Observium
This eliminates nearly all of the user-facing references to Observium, including in the names of temporary files and in the metadata of PDFs. Many of these may not be used any more, but I've adjusted them anyway. These changes should also make it easier to change the branding later if it is needed. There are a few references of which I still don't understand the significance, so I've left them as-is for now. The Unix agent in particular is rather untidy.
This commit is contained in:
@@ -36,7 +36,7 @@ if (!empty($argv[1]))
|
||||
// These values are the same as in defaults.inc.php
|
||||
$v3 = array(
|
||||
'authlevel' => "noAuthNoPriv",
|
||||
'authname' => "observium",
|
||||
'authname' => "root",
|
||||
'authpass' => "",
|
||||
'authalgo' => "MD5",
|
||||
'cryptopass' => "",
|
||||
@@ -192,8 +192,7 @@ if (!empty($argv[1]))
|
||||
}
|
||||
}
|
||||
|
||||
print Console_Color::convert("
|
||||
Observium v".$config['version']." Add Host Tool
|
||||
print Console_Color::convert("\n" . $config['project_name_version']." Add Host Tool
|
||||
|
||||
Usage (SNMPv1/2c): ./addhost.php <%Whostname%n> [community] [v1|v2c] [port] [" . implode("|",$config['snmp']['transports']) . "]
|
||||
Usage (SNMPv3) : Config Defaults : ./addhost.php <%Whostname%n> any v3 [user] [port] [" . implode("|",$config['snmp']['transports']) . "]
|
||||
|
@@ -52,7 +52,7 @@ if (is_array($errored))
|
||||
$i++;
|
||||
}
|
||||
// Send the alert email
|
||||
notify($device, "Observium detected errors on $i interface" . ($i != 1 ? 's' : ''), $msg);
|
||||
notify($device, $config['project_name'] . " detected errors on $i interface" . ($i != 1 ? 's' : ''), $msg);
|
||||
}
|
||||
|
||||
echo("$errored interfaces with errors over the past 5 minutes.\n");
|
||||
|
@@ -13,17 +13,14 @@ $config['memcached']['enable'] = FALSE;
|
||||
$config['memcached']['host'] = "localhost";
|
||||
$config['memcached']['port'] = 11211;
|
||||
|
||||
### Locations
|
||||
$config['install_dir'] = "/opt/librenms";
|
||||
$config['html_dir'] = $config['install_dir'] . "/html";
|
||||
$config['rrd_dir'] = $config['install_dir'] . "/rrd";
|
||||
$config['log_file'] = $config['install_dir'] . "/librenms.log";
|
||||
### Locations - it is recommended to keep the default
|
||||
#$config['install_dir'] = "/opt/librenms";
|
||||
|
||||
### Thie should *only* be set if you want to *force* a particular hostname/port
|
||||
### This should *only* be set if you want to *force* a particular hostname/port
|
||||
### It will prevent the web interface being usable form any other hostname
|
||||
#$config['base_url'] = "http://librenms.company.com";
|
||||
|
||||
### Enable the below to use rrdcached. be sure rrd_dir is within the rrdcached dir
|
||||
### Enable this to use rrdcached. Be sure rrd_dir is within the rrdcached dir
|
||||
### and that your web server has permission to talk to rrdcached.
|
||||
#$config['rrdcached'] = "unix:/var/run/rrdcached.sock";
|
||||
|
||||
|
@@ -30,7 +30,7 @@ $options = getopt("h:m:i:n:d::a::q");
|
||||
|
||||
if (!isset($options['q']))
|
||||
{
|
||||
echo("Observium v".$config['version']." Discovery\n\n");
|
||||
echo($config['project_name_version']." Discovery\n\n");
|
||||
}
|
||||
|
||||
if (isset($options['h']))
|
||||
|
@@ -613,5 +613,14 @@ function generate_ap_url($ap, $vars=array())
|
||||
return generate_url(array('page' => 'device', 'device' => $ap['device_id'], 'tab' => 'accesspoint', 'ap' => $ap['accesspoint_id']), $vars);
|
||||
}
|
||||
|
||||
function report_this($message)
|
||||
{
|
||||
return '<h2>'.$message.' Please <a href="'.$config['project_issues'].'">report this</a> to the developers.</h2>';
|
||||
}
|
||||
|
||||
function report_this_text($message)
|
||||
{
|
||||
return $message.'\nPlease report this to the developers at '.$config['project_issues'].'\n';
|
||||
}
|
||||
|
||||
?>
|
||||
|
@@ -520,35 +520,6 @@ if(is_file("includes/print-menubar-custom.inc.php"))
|
||||
?>
|
||||
<li class="menu_right"><a href="#" class="drop"><img src="images/16/wrench.png" border="0" align="absmiddle" /> System</a><!-- Begin Home Item -->
|
||||
|
||||
<div class="dropdown_3columns align_right"><!-- Begin 2 columns container -->
|
||||
|
||||
<div class="col_3">
|
||||
<h2>LibreNMS <?php echo($config['version']); ?> </h2>
|
||||
</div>
|
||||
|
||||
<div class="col_2">
|
||||
<p>Network Management and Monitoring<br />
|
||||
Copyright (C) 2006-2012 Adam Armstrong
|
||||
Copyright (C) 2013-<?php echo date("Y"); ?> LibreNMS Contributors
|
||||
</div>
|
||||
|
||||
<!-- Old donation stuff
|
||||
<div class="col_1">
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col_3">
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div class="col_2">
|
||||
<h2>The Team</h2>
|
||||
<p>
|
||||
<img src="images/icons/flags/au.png"> <strong>Paul Gear</strong> Project Founder<br />
|
||||
<img src="images/icons/flags/us.png"> <strong>Tyler Christiansen</strong> Developer<br />
|
||||
</p>
|
||||
</div>
|
||||
<div class="col_1">
|
||||
<h2>Settings</h2>
|
||||
<ul>
|
||||
@@ -563,27 +534,6 @@ if ($_SESSION['userlevel'] >= '10')
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$apache_version = str_replace("Apache/", "", $_SERVER['SERVER_SOFTWARE']);
|
||||
$php_version = phpversion();
|
||||
$mysql_version = dbFetchCell("SELECT version()");
|
||||
$netsnmp_version = shell_exec($config['snmpget'] . " --version 2>&1");
|
||||
$rrdtool_version = implode(" ",array_slice(explode(" ",shell_exec($config['rrdtool'] . " --version |head -n1")),1,1));
|
||||
?>
|
||||
|
||||
<div class="col_2">
|
||||
<h2>Versions</h2>
|
||||
<table width=100% cellpadding=3 cellspacing=0 border=0>
|
||||
<tr valign=top><td><b>Apache</b></td><td><?php echo($apache_version); ?></td></tr>
|
||||
<tr valign=top><td><b>PHP</b></td><td><?php echo($php_version); ?></td></tr>
|
||||
<tr valign=top><td><b>MySQL</b></td><td><?php echo($mysql_version); ?></td></tr>
|
||||
<tr valign=top><td><b>RRDtool</b></td><td><?php echo($rrdtool_version); ?></td></tr>
|
||||
</table>
|
||||
<ul>
|
||||
<li><a href="about/"><img src="images/16/information.png" border="0" align="absmiddle" /> About LibreNMS</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col_1">
|
||||
<h2>Users</h2>
|
||||
<ul>
|
||||
@@ -605,7 +555,10 @@ $rrdtool_version = implode(" ",array_slice(explode(" ",shell_exec($config['rrdto
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div><!-- End 2 columns container -->
|
||||
<div class="col_1">
|
||||
<li><a href="about/"><img src="images/16/information.png" border="0" align="absmiddle" /> About <?php echo($config['project_name']); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</li><!-- End Home Item -->
|
||||
|
||||
|
@@ -111,32 +111,32 @@ if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
|
||||
/**
|
||||
* document creator
|
||||
*/
|
||||
define ('PDF_CREATOR', 'Observium');
|
||||
define ('PDF_CREATOR', $config['project_name']);
|
||||
|
||||
/**
|
||||
* document author
|
||||
*/
|
||||
define ('PDF_AUTHOR', 'Observium');
|
||||
define ('PDF_AUTHOR', $config['project_name']);
|
||||
|
||||
/**
|
||||
* header title
|
||||
*/
|
||||
define ('PDF_HEADER_TITLE', 'Observium');
|
||||
define ('PDF_HEADER_TITLE', $config['project_name']);
|
||||
|
||||
/**
|
||||
* header description string
|
||||
*/
|
||||
define ('PDF_HEADER_STRING', "Observium");
|
||||
define ('PDF_HEADER_STRING', $config['project_name']);
|
||||
|
||||
/**
|
||||
* image logo
|
||||
*/
|
||||
define ('PDF_HEADER_LOGO', 'observium-logo.png');
|
||||
//define ('PDF_HEADER_LOGO', 'observium-logo.png');
|
||||
|
||||
/**
|
||||
* header logo image width [mm]
|
||||
*/
|
||||
define ('PDF_HEADER_LOGO_WIDTH', 110);
|
||||
//define ('PDF_HEADER_LOGO_WIDTH', 110);
|
||||
|
||||
/**
|
||||
* document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
|
||||
|
@@ -270,10 +270,10 @@ $runtime_end = utime(); $runtime = $runtime_end - $runtime_start;
|
||||
$gentime = substr($runtime, 0, 5);
|
||||
|
||||
echo('<br /> <br /> <br /> <br /> <div id="footer">' . (isset($config['footer']) ? $config['footer'] : ''));
|
||||
echo('<br />Powered by <a href="https://github.com/librenms/librenms" target="_blank">LibreNMS ' . $config['version']);
|
||||
echo('<br />Powered by <a href="' . $config['project_url'] . '" target="_blank">' . $config['project_name_version']);
|
||||
|
||||
echo('</a>. Copyright © 2006-2012 by Adam Armstrong. All rights reserved.');
|
||||
echo('</a>. Copyright © '. date("Y"). ' by the LibreNMS Contributors.<br/>LibreNMS is <a href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a>, released under the <a href="http://www.gnu.org/copyleft/gpl.html">GNU GPLv3</a>.');
|
||||
echo('</a>. Copyright © '. date("Y"). ' by the $config[\'project_name\'] Contributors.<br/>$config[\'project_name\'] is <a href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a>, released under the <a href="http://www.gnu.org/copyleft/gpl.html">GNU GPLv3</a>.');
|
||||
|
||||
if ($config['page_gen'])
|
||||
{
|
||||
|
@@ -1,22 +1,15 @@
|
||||
<div style="margin: 10px;">
|
||||
<h3>LibreNMS <?php
|
||||
<h3><?php
|
||||
|
||||
echo($config['version']);
|
||||
|
||||
#if (file_exists('.svn/entries'))
|
||||
#{
|
||||
# $svn = File('.svn/entries');
|
||||
# echo('-SVN r' . trim($svn[3]));
|
||||
# unset($svn);
|
||||
#}
|
||||
echo($config['project_name_version']);
|
||||
|
||||
?></h3>
|
||||
<div style="float: right; padding: 0px; width: 49%">
|
||||
<?php print_optionbar_start(NULL); ?>
|
||||
<h3>License</h3>
|
||||
<pre>LibreNMS Network Management and Monitoring System
|
||||
<pre>
|
||||
Copyright (C) 2006-2012 Adam Armstrong
|
||||
Copyright (C) 2013-<?php echo date("Y"); ?> LibreNMS Contributors
|
||||
Copyright (C) 2013-<?php echo date("Y") . " " . $config['project_name']; ?> Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -110,20 +103,15 @@ print_optionbar_end(); ?>
|
||||
<div style="float: left; padding: 0px; width: 49%">
|
||||
<?php
|
||||
|
||||
$librenms_version = $config['version'];
|
||||
#if (file_exists('.svn/entries'))
|
||||
#{
|
||||
# $svn = File('.svn/entries');
|
||||
# $librenms_version .='-SVN r' . trim($svn[3]);
|
||||
# unset($svn);
|
||||
#}
|
||||
$project_name = $config['project_name'];
|
||||
$project_version = $config['version'];
|
||||
|
||||
print_optionbar_start(NULL);
|
||||
|
||||
echo("
|
||||
<h3>Versions</h3>
|
||||
<table width=100% cellpadding=3 cellspacing=0 border=0>
|
||||
<tr valign=top><td width=150><b>LibreNMS</b></td><td>$librenms_version</td></tr>
|
||||
<tr valign=top><td width=150><b>$project_name</b></td><td>$project_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>MySQL</b></td><td>$mysql_version</td></tr>
|
||||
@@ -135,17 +123,16 @@ print_optionbar_end();
|
||||
|
||||
?>
|
||||
|
||||
<h5>LibreNMS is an autodiscovering PHP/MySQL based network monitoring system forked from Observium.</h5>
|
||||
<h5>LibreNMS is an autodiscovering PHP/MySQL-based network monitoring system forked from the last GPL-licensed revision of Observium.</h5>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/librenms/librenms/">Website</a> |
|
||||
<a href="https://github.com/librenms/librenms/wiki">Support Wiki</a> |
|
||||
<a href="https://github.com/librenms/librenms/issues">Bugtracker</a> |
|
||||
<a href="https://groups.google.com/forum/#!forum/librenms-project">Mailing List</a> |
|
||||
<a href="https://github.com/librenms/">Web site</a> |
|
||||
<a href="https://github.com/librenms/librenms/issues">Bug tracker</a> |
|
||||
<a href="https://groups.google.com/forum/#!forum/librenms-project">Mailing list</a> |
|
||||
<a href="http://twitter.com/librenms">Twitter</a>
|
||||
</p>
|
||||
|
||||
<h3>LibreNMS is a Free, Open project. Please contribute code, documentation, and bug reports to support continued development.</h3>
|
||||
<h3>LibreNMS is a Free, Open project. Please feel free to join us and contribute code, documentation, and bug reports.</h3>
|
||||
|
||||
<div style="margin-top:10px;">
|
||||
</div>
|
||||
@@ -157,6 +144,7 @@ print_optionbar_end();
|
||||
|
||||
<h4>Acknowledgements</h4>
|
||||
|
||||
<b>Observium</b> Codebase for fork. <br />
|
||||
<b>Stu Nicholls</b> Dropdown menu CSS code. <br />
|
||||
<b>Mark James</b> Silk Iconset. <br />
|
||||
<b>Erik Bosrup</b> Overlib Library. <br />
|
||||
@@ -164,7 +152,6 @@ print_optionbar_end();
|
||||
<b>Xiaochi Jin</b> Logo design. <br />
|
||||
<b>Bruno Pramont</b> Collectd code. <br />
|
||||
<b>Dennis de Houx</b> Application monitors for PowerDNS, Shoutcast, NTPD (Client, Server). <br />
|
||||
<b>Observium</b> Codebase for LibreNMS fork. <br />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -26,7 +26,7 @@ switch ($vars['section'])
|
||||
break;
|
||||
default:
|
||||
print_optionbar_end();
|
||||
echo("<h2>Error. No section ".$vars['section'].".<br /> Please report this to observium developers.</h2>");
|
||||
echo(report_this('Unknown section '.$vars['section']));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -52,7 +52,7 @@ switch ($vars['protocol'])
|
||||
include('pages/routing/'.$vars['protocol'].'.inc.php');
|
||||
break;
|
||||
default:
|
||||
echo("<h2>Error. Please report this to observium developers.</h2>");
|
||||
echo(report_this('Unknown protocol '.$vars['protocol']));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -39,7 +39,7 @@ switch ($vars['search'])
|
||||
include('pages/search/'.$vars['search'].'.inc.php');
|
||||
break;
|
||||
default:
|
||||
echo("<h2>Error. Please report this to observium developers.</h2>");
|
||||
echo(report_this('Unknown search type '.$vars['search']));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,7 @@ if (strpos($_SERVER['REQUEST_URI'], "debug"))
|
||||
ini_set('error_reporting', 0);
|
||||
}
|
||||
|
||||
$filename = "observium-report.pdf";
|
||||
$filename = $config['project_id']."-report.pdf";
|
||||
$html = "";
|
||||
$type = (isset($_GET['type']) ? $_GET['type'] : "");
|
||||
$report = (isset($_GET['report']) ? $_GET['report'] : "");
|
||||
|
@@ -19,21 +19,25 @@
|
||||
*
|
||||
*/
|
||||
|
||||
///
|
||||
//
|
||||
// Please don't edit this file -- make changes to the configuration array in config.php
|
||||
///
|
||||
//
|
||||
|
||||
error_reporting(E_ERROR);
|
||||
|
||||
// Default directories
|
||||
|
||||
$config['project_name'] = "LibreNMS";
|
||||
$config['project_id'] = strtolower($config['project_name']);
|
||||
|
||||
$config['temp_dir'] = "/tmp";
|
||||
$config['install_dir'] = "/opt/observium";
|
||||
$config['install_dir'] = "/opt/" . $config['project_id'];
|
||||
$config['html_dir'] = $config['install_dir'] . "/html";
|
||||
$config['rrd_dir'] = $config['install_dir'] . "/rrd";
|
||||
$config['log_file'] = $config['install_dir'] . "/observium.log";
|
||||
$config['log_dir'] = $config['install_dir'] . "/logs";
|
||||
$config['log_file'] = $config['log_dir'] . "/" . $config['project_id'] . ".log";
|
||||
|
||||
// What is my own hostname (used so observium can identify its host in its own database)
|
||||
// What is my own hostname (used to identify this host in its own database)
|
||||
$config['own_hostname'] = "localhost";
|
||||
|
||||
// Location of executables
|
||||
@@ -98,8 +102,8 @@ if (isset($_SERVER["SERVER_NAME"]) && isset($_SERVER["SERVER_PORT"]))
|
||||
}
|
||||
}
|
||||
|
||||
$config['project_name'] = "LibreNMS";
|
||||
$config['project_url'] = "https://github.com/librenms/";
|
||||
$config['project_issues'] = "https://github.com/librenms/librenms/issues";
|
||||
$config['title_image'] = "";
|
||||
$config['stylesheet'] = "css/styles.css";
|
||||
$config['mono_font'] = "DejaVuSansMono";
|
||||
@@ -139,8 +143,9 @@ $config['snmp']['community'][0] = "public"; # Communities to try during adding h
|
||||
|
||||
# SNMPv3 default settings
|
||||
# The array can be expanded to give another set of parameters
|
||||
# NOTE: If you change these, also change the equivalents in includes/defaults.inc.php - not sure why they are separate
|
||||
$config['snmp']['v3'][0]['authlevel'] = "noAuthNoPriv"; # noAuthNoPriv | authNoPriv | authPriv
|
||||
$config['snmp']['v3'][0]['authname'] = "observium"; # User Name (required even for noAuthNoPriv)
|
||||
$config['snmp']['v3'][0]['authname'] = "root"; # User Name (required even for noAuthNoPriv)
|
||||
$config['snmp']['v3'][0]['authpass'] = ""; # Auth Passphrase
|
||||
$config['snmp']['v3'][0]['authalgo'] = "MD5"; # MD5 | SHA
|
||||
$config['snmp']['v3'][0]['cryptopass'] = ""; # Privacy (Encryption) Passphrase
|
||||
@@ -176,7 +181,8 @@ $config['autodiscovery']['nets-exclude'][] = "240.0.0.0/4";
|
||||
// Mailer backend Settings
|
||||
|
||||
$config['email_backend'] = 'mail'; // Mail backend. Allowed: "mail" (PHP's built-in), "sendmail", "smtp".
|
||||
$config['email_from'] = NULL; // Mail from. Default: "OBSERVIUM Network Monitor" <observium@`hostname`>
|
||||
$config['email_from'] = NULL; // Mail from. Default: "ProjectName" <projectid@`hostname`>
|
||||
$config['email_user'] = $config['project_id'];
|
||||
$config['email_sendmail_path'] = '/usr/sbin/sendmail'; // The location of the sendmail program.
|
||||
$config['email_smtp_host'] = 'localhost'; // Outgoing SMTP server name.
|
||||
$config['email_smtp_port'] = 25; // The port to connect.
|
||||
@@ -248,9 +254,7 @@ $config['show_overview_tab'] = TRUE;
|
||||
$config['overview_show_sysDescr'] = TRUE;
|
||||
|
||||
// Enable version checker & stats
|
||||
$config['version_check'] = 1; # Enable checking of version in discovery
|
||||
# and submittal of basic stats used
|
||||
# to prioritise development effort :)
|
||||
$config['version_check'] = 0; # Enable checking of version in discovery
|
||||
|
||||
// Poller/Discovery Modules
|
||||
|
||||
@@ -374,10 +378,10 @@ $config['device_traffic_descr'][] = '/dummy/';
|
||||
|
||||
// IRC Bot configuration
|
||||
|
||||
$config['irc_host'] = "chat.eu.freenode.net";
|
||||
$config['irc_host'] = "irc.freenode.net";
|
||||
$config['irc_port'] = 6667;
|
||||
$config['irc_nick'] = "Observium";
|
||||
$config['irc_chan'][] = "#observium";
|
||||
$config['irc_nick'] = $config['project_id'];
|
||||
$config['irc_chan'][] = "##" . $config['project_id'];
|
||||
|
||||
// Authentication
|
||||
|
||||
@@ -388,11 +392,11 @@ $config['auth_mechanism'] = "mysql"; # Available mechanisms: mysql (de
|
||||
// LDAP Authentication
|
||||
|
||||
$config['auth_ldap_version'] = 3; # v2 or v3
|
||||
$config['auth_ldap_server'] = "ldap.yourserver.com";
|
||||
$config['auth_ldap_server'] = "ldap.example.com";
|
||||
$config['auth_ldap_port'] = 389;
|
||||
$config['auth_ldap_prefix'] = "uid=";
|
||||
$config['auth_ldap_suffix'] = ",ou=People,dc=example,dc=com";
|
||||
$config['auth_ldap_group'] = "cn=observium,ou=groups,dc=example,dc=com";
|
||||
$config['auth_ldap_group'] = "cn=groupname,ou=groups,dc=example,dc=com";
|
||||
|
||||
$config['auth_ldap_groupbase'] = "ou=group,dc=example,dc=com";
|
||||
$config['auth_ldap_groups']['admin']['level'] = 10;
|
||||
|
@@ -1129,31 +1129,8 @@ if (isset($config['enable_printers']) && $config['enable_printers'])
|
||||
# No changes below this line #
|
||||
//////////////////////////////
|
||||
|
||||
$config['version'] = "0.SVN.ERROR";
|
||||
|
||||
if (file_exists($config['install_dir'] . '/.svn/entries'))
|
||||
{
|
||||
$svn = File($config['install_dir'] . '/.svn/entries');
|
||||
if ((int)$svn[0] < 12)
|
||||
{
|
||||
// SVN version < 1.7
|
||||
$svn_rev = trim($svn[3]);
|
||||
list($svn_date) = explode("T", trim($svn[9]));
|
||||
} else {
|
||||
// SVN version >= 1.7
|
||||
$xml = simplexml_load_string(shell_exec($config['svn'] . ' info --xml'));
|
||||
if ($xml != false)
|
||||
{
|
||||
$svn_rev = $xml->entry->commit->attributes()->revision;
|
||||
$svn_date = $xml->entry->commit->date;
|
||||
}
|
||||
}
|
||||
list($svn_year, $svn_month, $svn_day) = explode("-", $svn_date);
|
||||
}
|
||||
if (!empty($svn_rev))
|
||||
{
|
||||
$config['version'] = "0." . ($svn_year-2000) . "." . ($svn_month+0) . "." . $svn_rev;
|
||||
}
|
||||
$config['version'] = "2013.dev";
|
||||
$config['project_name_version'] = $config['project_name'] . " " . $config['version'];
|
||||
|
||||
if (isset($config['rrdgraph_def_text']))
|
||||
{
|
||||
@@ -1163,7 +1140,7 @@ if (isset($config['rrdgraph_def_text']))
|
||||
|
||||
if (!isset($config['log_file']))
|
||||
{
|
||||
$config['log_file'] = $config['install_dir'] . "/observium.log";
|
||||
$config['log_file'] = $config['log_dir'] . "/" . $config['project_id'] . ".log";
|
||||
}
|
||||
|
||||
if (isset($config['cdp_autocreate']))
|
||||
@@ -1187,7 +1164,7 @@ if (isset($_SERVER['HTTPS']))
|
||||
$observium_link = mysql_pconnect($config['db_host'], $config['db_user'], $config['db_pass']);
|
||||
if (!$observium_link)
|
||||
{
|
||||
echo("<h2>Observer MySQL Error</h2>");
|
||||
echo("<h2>MySQL Error</h2>");
|
||||
echo(mysql_error());
|
||||
die;
|
||||
}
|
||||
|
@@ -667,7 +667,7 @@ function notify($device,$title,$message)
|
||||
$mail->Hostname = php_uname('n');
|
||||
if (empty($config['email_from']))
|
||||
{
|
||||
$config['email_from'] = '"Observium" <observium@'.php_uname('n').'>'; // Default "From:"
|
||||
$config['email_from'] = '"' . $config['project_name'] . '" <' . $config['email_user'] . '@'.php_uname('n').'>'; // Default "From:"
|
||||
}
|
||||
foreach (parse_email($config['email_from']) as $from => $from_name)
|
||||
{
|
||||
@@ -675,7 +675,7 @@ function notify($device,$title,$message)
|
||||
}
|
||||
foreach ($emails as $email => $email_name) { $mail->AddAddress($email, $email_name); } // To:
|
||||
$mail->Subject = $title; // Subject:
|
||||
$mail->XMailer = 'Observium ' . $config['version']; // X-Mailer:
|
||||
$mail->XMailer = $config['project_name_version']; // X-Mailer:
|
||||
$mail->CharSet = 'utf-8';
|
||||
$mail->WordWrap = 76;
|
||||
$mail->Body = $message_header . $message . $message_footer;
|
||||
|
@@ -4,7 +4,7 @@ global $debug;
|
||||
|
||||
if ($device['os_group'] == "unix")
|
||||
{
|
||||
echo("Observium UNIX Agent: ");
|
||||
echo($config['project_name']." UNIX Agent: ");
|
||||
|
||||
// FIXME - this should be in config and overridable in database
|
||||
$agent_port='6556';
|
||||
|
@@ -92,8 +92,7 @@ function snmp_get($device, $oid, $options = NULL, $mib = NULL, $mibdir = NULL)
|
||||
|
||||
if (strstr($oid,' '))
|
||||
{
|
||||
echo("BUG: snmp_get called for multiple OIDs: $oid\n");
|
||||
echo("Please report this to the Observium team.");
|
||||
echo(report_this_text("snmp_get called for multiple OIDs: $oid"));
|
||||
}
|
||||
|
||||
$cmd = $config['snmpget'];
|
||||
@@ -776,7 +775,8 @@ function snmp_gen_auth (&$device)
|
||||
if ($device['authlevel'] === "noAuthNoPriv")
|
||||
{
|
||||
// We have to provide a username anyway (see Net-SNMP doc)
|
||||
$cmd .= " -u observium";
|
||||
// FIXME: There are two other places this is set - why are they ignored here?
|
||||
$cmd .= " -u root";
|
||||
}
|
||||
elseif ($device['authlevel'] === "authNoPriv")
|
||||
{
|
||||
|
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
// FIXME: This really does produce valuable data for the project team. We
|
||||
// need to get some infrastructure going and make it available on an opt-in
|
||||
// basis (i.e. disabled by default). We should schedule it from cron rather
|
||||
// than putting it into the discovery process.
|
||||
|
||||
// See https://github.com/librenms/librenms/issues/25 for some thoughts on where to go with this code under git.
|
||||
|
||||
/*
|
||||
|
||||
// Generate some statistics to send along with the version request.
|
||||
|
||||
$stats['ports'] = dbFetchCell("SELECT count(*) FROM ports");
|
||||
@@ -64,5 +73,6 @@ if ($dataHandle)
|
||||
|
||||
fclose($dataHandle);
|
||||
}
|
||||
*/
|
||||
|
||||
?>
|
||||
|
10
irc.php
10
irc.php
@@ -28,12 +28,12 @@ include_once('Net/SmartIRC.php');
|
||||
mysql_close();
|
||||
|
||||
# Redirect to /dev/null or logfile if you aren't using screen to keep tabs
|
||||
echo "Observium Bot Starting ...\n";
|
||||
echo $config['project_name'] . "IRC bot starting ...\n";
|
||||
echo "\n";
|
||||
echo "Timestamp Command\n";
|
||||
echo "----------------- ------- \n";
|
||||
|
||||
class observiumbot
|
||||
class ircbot
|
||||
{
|
||||
|
||||
///
|
||||
@@ -58,7 +58,7 @@ class observiumbot
|
||||
{
|
||||
global $config;
|
||||
|
||||
$irc->message(SMARTIRC_TYPE_CHANNEL, $data->channel, "Observium Version " . $config['version']);
|
||||
$irc->message(SMARTIRC_TYPE_CHANNEL, $data->channel, $config['project_name_version']);
|
||||
|
||||
echo date("m-d-y H:i:s ");
|
||||
echo "VERSION\t\t". $config['version'] . "\n";
|
||||
@@ -243,7 +243,7 @@ if (!$device) {
|
||||
}
|
||||
}
|
||||
|
||||
$bot = &new observiumbot();
|
||||
$bot = &new ircbot();
|
||||
$irc = &new Net_SmartIRC();
|
||||
$irc->setUseSockets(TRUE);
|
||||
|
||||
@@ -257,7 +257,7 @@ $irc->registerActionhandler(SMARTIRC_TYPE_CHANNEL, '.log', $bot, 'log_info');
|
||||
$irc->registerActionhandler(SMARTIRC_TYPE_CHANNEL, '.help', $bot, 'help_info');
|
||||
|
||||
$irc->connect($config['irc_host'], $config['irc_port']);
|
||||
$irc->login($config['irc_nick'], 'Observium Bot', 0, $config['irc_nick']);
|
||||
$irc->login($config['irc_nick'], $config['project_name'] . ' Bot', 0, $config['irc_nick']);
|
||||
$irc->join($config['irc_chan']);
|
||||
$irc->listen();
|
||||
$irc->disconnect();
|
||||
|
@@ -22,7 +22,7 @@ include("includes/functions.php");
|
||||
include("includes/polling/functions.inc.php");
|
||||
|
||||
$poller_start = utime();
|
||||
echo("Observium Poller v".$config['version']."\n\n");
|
||||
echo($config['project_name_version']." Poller\n\n");
|
||||
|
||||
$options = getopt("h:m:i:n:r::d::a::");
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
These are local plugin scripts for the Observium Unix Agent.
|
||||
These are local plugin scripts for the LibreNMS Unix Agent.
|
||||
|
||||
*DO NOT* put all of these files into your local folder, only use the scripts you want.
|
||||
|
||||
|
@@ -14,7 +14,7 @@
|
||||
use LWP::Simple;
|
||||
|
||||
$CACHETIME = 30;
|
||||
$CACHEFILE = '/tmp/observium-agent-apache';
|
||||
$CACHEFILE = '/tmp/agent-local-apache';
|
||||
|
||||
# check for cache file newer CACHETIME seconds ago
|
||||
if ( -f $CACHEFILE && time - (stat( $CACHEFILE ))[9] < $CACHETIME) {
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# We cache because it is a 1sec delay, which is painful for the poller
|
||||
if [ -x /usr/bin/dpkg-query ]; then
|
||||
DATE=$(date +%s)
|
||||
FILE=/tmp/observium-agent-dpkg
|
||||
FILE=/tmp/agent-local-dpkg
|
||||
|
||||
if [ ! -e $FILE ]; then
|
||||
dpkg-query -W --showformat='${Status} ${Package} ${Version} ${Architecture} ${Installed-Size}\n'|grep " installed "|cut -d\ -f4- > $FILE
|
||||
|
@@ -283,7 +283,7 @@ function ss_get_mysql_stats( $options ) {
|
||||
}
|
||||
|
||||
$sanitized_host = str_replace(array(":", "/"), array("", "_"), $host);
|
||||
$cache_file = "$cache_dir/observium-agent-mysql";
|
||||
$cache_file = "$cache_dir/agent-local-mysql";
|
||||
debug("Cache file is $cache_file");
|
||||
|
||||
# First, check the cache.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# We cache because it is a 1sec delay, which is painful for the poller
|
||||
if [ -x /bin/rpm ]; then
|
||||
DATE=$(date +%s)
|
||||
FILE=/tmp/observium-agent-rpm
|
||||
FILE=/tmp/agent-local-rpm
|
||||
if [ ! -e $FILE ]; then
|
||||
/bin/rpm -q --all --queryformat '%{N} %{V} %{R} %{ARCH} %{SIZE}\n' > $FILE
|
||||
fi
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
// START SETTINGS ///
|
||||
|
||||
$mailstats = "/opt/observium/scripts/watchmaillog/watchmaillog_counters";
|
||||
$mailstats = "/opt/librenms/scripts/watchmaillog/watchmaillog_counters";
|
||||
|
||||
// END SETTINGS ///
|
||||
|
||||
@@ -72,4 +72,4 @@
|
||||
doSNMPv2($mailstats);
|
||||
//clearStats($mailstats);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -40,6 +40,8 @@ if (!array_key_exists('SCRIPT_FILENAME', $_SERVER)
|
||||
# here, you can define them in another file named the same as this file, with a
|
||||
# .cnf extension.
|
||||
# ============================================================================
|
||||
|
||||
# FIXME: why are these not taken from config.php?
|
||||
$mysql_user = 'observium';
|
||||
$mysql_pass = 'flobbleobservium';
|
||||
$mysql_host = 'localhost';
|
||||
|
@@ -28,6 +28,8 @@
|
||||
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
# Boston, MA 02110-1301 USA.
|
||||
|
||||
# FIXME: rename agent
|
||||
|
||||
service check_mk
|
||||
{
|
||||
type = UNLISTED
|
||||
|
@@ -21,8 +21,8 @@
|
||||
|
||||
// START SETTINGS ///
|
||||
|
||||
$config = "/opt/observium/scripts/shoutcast.conf";
|
||||
$cache = "/opt/observium/scripts/shoutcast.cache";
|
||||
$config = "/opt/librenms/scripts/shoutcast.conf";
|
||||
$cache = "/opt/librenms/scripts/shoutcast.cache";
|
||||
|
||||
// END SETTINGS ///
|
||||
|
||||
|
@@ -27,9 +27,9 @@
|
||||
$debug=0; # 1=Debug messages are displayed, 0=No debug messages are displayed
|
||||
$daemon=1; # 1=Daemonize the program, 0=Run interactive
|
||||
$syslog=1; # 1=Log stuff to syslog, 0=No logging to syslog
|
||||
$self="/opt/observium/scripts/watchmaillog/watchmaillog.sh"; # Location of this script
|
||||
$counterfile="/opt/observium/scripts/watchmaillog/watchmaillog_counters"; # Location to store the counter file
|
||||
$resetfile="/opt/observium/scripts/watchmaillog/watchmaillog_reset"; # Location of the reset counter flag file
|
||||
$self="/opt/librenms/scripts/watchmaillog/watchmaillog.sh"; # Location of this script
|
||||
$counterfile="/opt/librenms/scripts/watchmaillog/watchmaillog_counters"; # Location to store the counter file
|
||||
$resetfile="/opt/librenms/scripts/watchmaillog/watchmaillog_reset"; # Location of the reset counter flag file
|
||||
$pidfile="/var/run/watchmaillog.pid"; # Location of the running process ID file (used in logrotate)
|
||||
|
||||
use Sys::Syslog;
|
||||
|
@@ -1 +1 @@
|
||||
mibdirs +/opt/observium/mibs
|
||||
mibdirs +/opt/librenms/mibs
|
||||
|
Reference in New Issue
Block a user