Open CopyBook-Maxim opened 10 months ago
Any update?
Custom Interface Description parsing is easy to break. You didn't say:
Custom Interface Description parsing is easy to break. You didn't say:
- what you are trying to do (including any configurations set and any custom parsing files)
- your expected outcome
- the actual outcome
1.
I am trying to do parsing of the UI description.
I created the file /opt/librenms/includes/custom/my-port-descr-parser.inc.php
librenms:/opt/librenms/includes/custom# ls -la
total 12
drwxr-xr-x 2 nobody nogroup 4096 Dec 28 10:35 .
drwxr-xr-x 1 nobody nogroup 4096 Dec 28 10:08 ..
-rw-r--r-- 1 nobody nogroup 653 Dec 28 10:35 my-port-descr-parser.inc.php
File Configuration:
<?php
// Parser should populate $port_ifAlias array with type, descr, circuit, speed and notes
unset($port_ifAlias);
echo $this_port['ifAlias'];
$split = preg_split('/#/', $this_port['ifAlias']);
$type = trim($split[1]);
$descr = trim($split[0]);
$circuit = null;
$notes = null;
$speed = null;
if ($type && $descr) {
$type = strtolower($type);
$port_ifAlias['type'] = $type;
$port_ifAlias['descr'] = $descr;
$port_ifAlias['circuit'] = $circuit;
$port_ifAlias['speed'] = $speed;
$port_ifAlias['notes'] = $notes;
d_echo($port_ifAlias);
}
unset($port_type, $port_descr, $port_circuit, $port_notes, $port_speed, $split);
vi config.php
# custom int_descr_parsing
$config['port_descr_parser'] = "includes/custom/my-port-descr-parser.inc.php";
2. Expected Outcome: There will be graphs in the Ports -> Transit menu.
3. Current result: No graphs.
Hello, I am having this same issue with my custom interface parsing script. It doesn't seem to be working!
Up
Up
Any update pls
Support guidelines
I've found a bug and checked that ...
Description
Custom Interface Description Parsing not work. If you specify the path to the custom parser in the settings, it will not be used. At the same time the parser itself works, it was checked in the interpreter. Also, if you add port_descr_type and port_descr_descr directly to the database, the charts are displayed
Expected behaviour
Must be used Custom Interface Description Parser
Actual behaviour
Custom Interface Description Parsing not used
Steps to reproduce
1 Create a custom parser 2 Specify it in the settings 3 Graphics with description from the example (Transit: Example Provider (AS65000)) get into ports
Docker info
Docker Compose config
No response
Logs
Additional info
No response