mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02: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:
+20
-16
@@ -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);
|
||||
}
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user