Add virtual device using snmp context

Hi,

I’m currently trying to add Checkpoint VSX gateways and their virtual systems to LibreNMS. On a VSX gateway you can access the virtual systems by setting the snmp option -n (for a context name).

I’ve already seen that in the includes/snmp.inc.php the snmpv3 code is already prepared to set option -n however I can’t find a textfield in the interface to set a value for that key and it seems to be missing in the database.

I was wondering if I was only looking at the wrong places or if the feature isn’t implemented yet.

Thanks very much.

We don’t currently support contexts I’m afraid. The limited support we have is based on Cisco devices and isn’t useable elsewhere right now.

I’ve just managed to add one. However I had to patch the addhosts and edithosts interface for the additional SNMPv3 context name setting and create a database field to store that setting. I can now poll the interfaces and other OIDs under that communits.

Please submit your changes for others to benefit.

Yes I planned to do that tomorrow. Just need to have a look how to place database changes correctly into a pull request. :slight_smile:

Hi, I have did follow this scenario for running SNMPv3 with context against my Checkpoint VSX gateways and it works great.

Yes one small thing more is that you most probably need to add “$config[‘allow_duplicate_sysName’] = true;” this to the config.php file so you can have multiple names with the same IP like vs1, vs2 and so on.

Hi,

I had a similar approach and created a pull request for it: https://github.com/librenms/librenms/pull/7119

It works fine for me but unfortunately there was no one else who could have validated the request if it breaks anything else.

Hi,

I have run this fix on my Checkpoint VSX environment for sometime now and it works great, is their any plans to enable this fix in the main release?

I mean it would be nice to be able to run daily.sh from time to time.