Hi Guys,
I’ve changed my naming scheme for my Firewall appliance from OPNsenseFR1.mist to FirewallFR1.mist.
LibreNMS then changed the OS type from LibreNMS to FreeBSD.
Is there a way to manually set the Vendor/OS of a device or is this a bug?
See Poller and Discovery logs below.
Both Devices are OPNsense but ones just got a different name.
If you are having troubles with discovery/polling include the pastebin output of:
OPNsense.lynx named device
https://p.libren.ms/view/e23b7f91
FirewallFR1.mist named device
https://p.libren.ms/view/cdc83689
LibreNMS - 1.57
More logs, only allowed 2 links per post as new user. (Admin can combine if possible.)
OPNsense.lynx named device
https://p.libren.ms/view/128d077d
FirewallFR1.mist named device
https://p.libren.ms/view/3fe46868
Hi @FingerlessGlov3s
LibreNMS is using SNMP “sysDescr” to identify OPNsense. If sysDescr contains “OPNsense” and is an UNIX, then it is matched. If changing the name also changes sysDescr, then that could explain your behaviour.
If you have a better way to identify OPNsense, feel free to test it and submit it as a PR to include it in next release.
Bye
Just before you posted this, I realised, so there’s a issue logged to set the sysDescr appropriately I hope.
opened 05:08PM - 02 Dec 19 UTC
closed 09:53PM - 06 Feb 20 UTC
feature
**Important notices**
Before you add a new report, we ask you kindly to acknowl… edge the following:
[X] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
[X] I have searched the existing issues and I'm convinced that mine is new.
[X] The title contains the plugin to which this issue belongs
**Describe the bug**
When using SNMP monitoring tools such as LibreNMS, the Device OS detection is done via the SysDesc. Which currently reports the output of `uname -a` from the looks of it.
My idea is to use https://github.com/opnsense/plugins/blob/master/net-mgmt/net-snmp/src/opnsense/service/templates/OPNsense/Netsnmp/snmpd.conf to set the SysDesc to format this value like this, or something to this effect.
`OPNsense Firewall - 19.7.7 amd64`
I'm guessing someting like `OPNsense.info.version`, exists to get the 19.7.7 value.
Or maybe user override in the WebUI?
**To Reproduce**
Steps to reproduce the behavior:
1. Name the firewall without the word OPNsense in it. Firewall1 for example
2. Add to LibreNMS
3. Once its done its full discovery, it believes its a FreeBSD device. (Technically Correct), but should identify as OPNsense.
4. Manually edit /usr/local/share/snmp/snmpd.conf to add "sysDescr OPNsense Firewall"
5. kill and rerun the snmpd process
6. Once LibreNMS does another full discovery, it then reports as OPNense device.
**Expected behaviour**
Device would be described as OPNsense, so SNMP monitoring tools see it as a OPNsense Device.
**Screenshots**
This one has the value set

This one does not.

OPNsense 19.7.7 (amd64, OpenSSL).
Proxmox Guest
VirtIO
OPNsense have added an extend called version, which contains the name and version "OPNsense 20.1.1 (amd64/OpenSSL)
How easy would it be to add this in to LIbreNMS, for device and version detection?
{% if helpers.exists('OPNsense.netsnmp.general.enabled') and OPNsense.netsnmp.general.enabled == '1' %}
{% if helpers.exists('OPNsense.netsnmp.general.listen') and OPNsense.netsnmp.general.listen != '' %}
{% for network in OPNsense.netsnmp.general.listen.split(',') %}
{% if ':' not in network %}
agentAddress udp:{{ network }}:161
{% else %}
agentAddress udp6:[{{ network }}]:161
{% endif %}
{% endfor %}
{% else %}
agentAddress udp:161,udp6:[::1]:161
{% endif %}
{% if helpers.exists('OPNsense.netsnmp.general.community') and OPNsense.netsnmp.general.community != '' %}
rocommunity {{ OPNsense.netsnmp.general.community }}
rocommunity6 {{ OPNsense.netsnmp.general.community }}
{% endif %}
This file has been truncated. show original