mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 00:24:21 +02:00
Updated docs, updated callback to use new guidv4 function and links to stats url
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ $enabled = dbFetchCell("SELECT `value` FROM `callback` WHERE `name` = 'enabled'"
|
||||
if ($enabled == 1) {
|
||||
|
||||
if (dbFetchCell("SELECT `value` FROM `callback` WHERE `name` = 'uuid'") == '') {
|
||||
dbInsert(array('name'=>'uuid','value'=>uniqid()),'callback');
|
||||
dbInsert(array('name'=>'uuid','value'=>guidv4()),'callback');
|
||||
}
|
||||
$uuid = dbFetchCell("SELECT `value` FROM `callback` WHERE `name` = 'uuid'");
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ This host is where the web server and SNMP poller run. It could be the same mac
|
||||
|
||||
Install the required software:
|
||||
|
||||
apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-snmp php5-pear php5-curl snmp graphviz php5-mcrypt php5-json apache2 fping imagemagick whois mtr-tiny nmap python-mysqldb snmpd mysql-client php-net-ipv4 php-net-ipv6 rrdtool git
|
||||
apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-snmp php-pear php5-curl snmp graphviz php5-mcrypt php5-json apache2 fping imagemagick whois mtr-tiny nmap python-mysqldb snmpd mysql-client php-net-ipv4 php-net-ipv6 rrdtool git
|
||||
|
||||
The packages listed above are an all-inclusive list of packages that were necessary on a clean install of Ubuntu 12.04/14.04.
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Change `127.0.0.1` to the IP address that your MySQL server should listen on. R
|
||||
|
||||
Install necessary software. The packages listed below are an all-inclusive list of packages that were necessary on a clean install of Debian 7.
|
||||
|
||||
apt-get install lighttpd php5-cli php5-mysql php5-gd php5-snmp php5-cgi php5-pear php5-curl snmp graphviz mysql-server mysql-client rrdtool sendmail fping imagemagick whois mtr-tiny nmap ipmitool php5-mcrypt php5-json python-mysqldb snmpd php-net-ipv4 php-net-ipv6 rrdtool git
|
||||
apt-get install lighttpd php5-cli php5-mysql php5-gd php5-snmp php5-cgi php-pear php5-curl snmp graphviz mysql-server mysql-client rrdtool sendmail fping imagemagick whois mtr-tiny nmap ipmitool php5-mcrypt php5-json python-mysqldb snmpd php-net-ipv4 php-net-ipv6 rrdtool git
|
||||
|
||||
### Cloning ###
|
||||
|
||||
|
||||
@@ -600,7 +600,7 @@ $config['distributed_poller_memcached_host'] = 'example.net';
|
||||
$config['distributed_poller_memcached_port'] = '11211';
|
||||
|
||||
// Stats callback system
|
||||
$config['callback_post'] = 'http://lathwood.co.uk/log/log.php';
|
||||
$config['callback_clear'] = 'http://lathwood.co.uk/log/clear.php';
|
||||
$config['callback_post'] = 'https://stats.librenms.org/log.php';
|
||||
$config['callback_clear'] = 'https://stats.librenms.org/clear.php';
|
||||
|
||||
?>
|
||||
|
||||
@@ -1129,4 +1129,15 @@ function convert_delay($delay) {
|
||||
return($delay_sec);
|
||||
}
|
||||
|
||||
function guidv4($data) {
|
||||
// http://stackoverflow.com/questions/2040240/php-function-to-generate-v4-uuid#15875555
|
||||
// From: Jack http://stackoverflow.com/users/1338292/ja%CD%A2ck
|
||||
assert(strlen($data) == 16);
|
||||
|
||||
$data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100
|
||||
$data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10
|
||||
|
||||
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user