mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
@@ -304,6 +304,11 @@ $config['collectd_dir'] = '/var/lib/collectd/rrd';
|
||||
```
|
||||
Specify the location of the collectd rrd files.
|
||||
|
||||
```php
|
||||
$config['collectd_sock'] = 'unix:///var/run/collectd.sock';
|
||||
```
|
||||
Specify the location of the collectd unix socket. Using a socket allows the collectd graphs to be flushed to disk before being drawn. Be sure that your web server has permissions to write to this socket.
|
||||
|
||||
```php
|
||||
$config['smokeping']['dir'] = "/var/lib/smokeping/";
|
||||
```
|
||||
|
||||
@@ -86,12 +86,6 @@ $config['rrd_colors'] = array(
|
||||
'h_13' => 'BBBBBB',
|
||||
'f_13' => '555555',
|
||||
);
|
||||
/*
|
||||
* URL to collectd's unix socket (unixsock plugin)
|
||||
* enabled: 'unix:///var/run/collectd/collectd-unixsock'
|
||||
* disabled: null
|
||||
*/
|
||||
$config['collectd_sock'] = null;
|
||||
/*
|
||||
* Path to TTF font file to use in error images
|
||||
* (fallback when file does not exist is GD fixed font)
|
||||
|
||||
@@ -330,26 +330,6 @@ function collectd_flush($identifier) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_null($host) || !is_string($host) || strlen($host) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_null($plugin) || !is_string($plugin) || strlen($plugin) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_null($pinst) || !is_string($pinst)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_null($type) || !is_string($type) || strlen($type) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_null($tinst) || (is_array($tinst) && count($tinst) == 0) || !(is_string($tinst) || is_array($tinst))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$u_errno = 0;
|
||||
$u_errmsg = '';
|
||||
if ($socket = @fsockopen($config['collectd_sock'], 0, $u_errno, $u_errmsg)) {
|
||||
|
||||
Reference in New Issue
Block a user