mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Also fix the graph generating code for NfSen rrds (#6835)
* Also fix the graph generating code for NfSen rrds * Updated NfSen document as well
This commit is contained in:
committed by
Neil Lathwood
parent
af47676ce7
commit
572277bfaa
@@ -42,8 +42,13 @@ If you wish to render info for configure channels for a device, you need add the
|
||||
$config['nfsen_rrds'][] = '/var/nfsen/profiles-stat';
|
||||
```
|
||||
|
||||
When adding sources to nfsen.conf, it is important to use the hostname that matches what is configured in LibreNMS.
|
||||
When adding sources to nfsen.conf, it is important to use the hostname that matches what is configured in LibreNMS, because the rrd files NfSen creates is named after the source name (ident), and it doesn't allow you to use an IP address instead. However, in LibreNMS, if your device is added by an IP address, add your source with any name of your choice, and create a symbolic link to the rrd file.
|
||||
```sh
|
||||
cd /var/nfsen/profiles-stat/sitea/
|
||||
ln -s mychannel.rrd librenmsdeviceIP.rrd
|
||||
```
|
||||
|
||||
When creating profiles under nfsen, be sure to use the hostname so it matches the name in LibreNMS. That is where channel data will be pulled from.
|
||||
|
||||
You should a new tab for the device called Nfsen.
|
||||
You should see a new tab for the device called Nfsen.
|
||||
|
||||
|
@@ -17,7 +17,11 @@ foreach ($config['nfsen_rrds'] as $nfsenrrds) {
|
||||
$nfsensuffix = $config['nfsen_suffix'];
|
||||
}
|
||||
|
||||
$basefilename_underscored = preg_replace('/\./', $config['nfsen_split_char'], $device['hostname']);
|
||||
if (isset($config['nfsen_split_char']) && !empty($config['nfsen_split_char'])) {
|
||||
$basefilename_underscored = preg_replace('/\./', $config['nfsen_split_char'], $device['hostname']);
|
||||
} else {
|
||||
$basefilename_underscored = $device['hostname'];
|
||||
}
|
||||
$nfsen_filename = preg_replace('/'.$nfsensuffix.'/', '', $basefilename_underscored);
|
||||
|
||||
if (is_file($nfsenrrds.$nfsen_filename.'.rrd')) {
|
||||
|
Reference in New Issue
Block a user