SNMP MIBs - Remove all / start all over

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
bramassendorp
Posts: 28
Joined: Sun Jun 09, 2019 3:16 am

SNMP MIBs - Remove all / start all over

Post by bramassendorp »

Hi,

I'm having a issue which snmptt is not starting any more, I want to start over gain with removing all mibs.
Removing mibs from the /usr/share/snmp/mibs/ is not doing the trick, the entries are still in the webinterface.

After readding the mibs to the mibs folder I now have lots of duplicate entries in the webinterface saying "Unknown (Missing Database Entry)".

How do I remove everything and reset things for a clean start?
bramassendorp
Posts: 28
Joined: Sun Jun 09, 2019 3:16 am

Re: SNMP MIBs - Remove all / start all over

Post by bramassendorp »

SNMPTT is starting again, fixed it. but the Process all traps function is now throwing all kinds of sql errors at me:

SQL Error [nagiosxi] : Duplicate entry 'BRIDGE-MIB' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'EtherLike-MIB' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'HOST-RESOURCES-MIB' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'HOST-RESOURCES-TYPES' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'IANA-ADDRESS-FAMILY-NUMBERS-MIB' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'IPV6-MIB' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'IPV6-TC' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Printer-MIB' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'RMON-MIB' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'SNMP-COMMUNITY-MIB' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'SNMP-FRAMEWORK-MIB' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'SNMP-NOTIFICATION-MIB' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'SNMP-PROXY-MIB' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'SNMPv2-CONF' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'SNMPv2-MIB' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'SNMPv2-SMI' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'SNMPv2-TC' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'TCP-MIB' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'TUNNEL-MIB' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
SQL Error [nagiosxi] : Duplicate entry 'Missing File' for key 'xi_mibs.mib_name'
Mikasa23
Posts: 25
Joined: Thu Jul 06, 2023 3:12 am

Re: SNMP MIBs - Remove all / start all over

Post by Mikasa23 »

First, you should Stop any SNMP-related services running on your system. You can do this using commands like:

Code: Select all

sudo systemctl stop snmpd
sudo systemctl stop snmptt
Then delete all MIB files from the /usr/share/snmp/mibs/ directory and subdirectories. You can use the following command to remove them: travle

Code: Select all

sudo rm -rf /usr/share/snmp/mibs/*
Then, clean SNMP Configuration. After that, Reset SNMP Configuration by the command:

Code: Select all

sudo apt-get purge snmpd snmptt
sudo apt-get install snmpd snmptt
After you've removed the MIBs and reset the SNMP configuration, restart the SNMP services:

Code: Select all

sudo systemctl start snmpd
sudo systemctl start snmptt
Hope it helps!
kg2857
Posts: 493
Joined: Wed Apr 12, 2023 5:48 pm

Re: SNMP MIBs - Remove all / start all over

Post by kg2857 »

I don't think I'd delete the mibs. If they're deleted, you just have to hunt down all the mib files and copy them back where they were.
Snmptt doesn't read mib files--snmptt uses snmptt.ini or snmptt.conf (I always forget) that has the mib contents so removing the right one of those files will tell snmptt there are no mibs. Recent versions of NXI also have an snmptt.*.xi (I think) that has mib info defined via the web gui.

The thing to do is read the config files for snmptrapd to see how it hands off to snmptt, then read the snmptt config files to see how it handles traps.
Last edited by kg2857 on Tue Oct 03, 2023 4:54 pm, edited 1 time in total.
Post Reply