Page 1 of 1
SNMP MIBs - Remove all / start all over
Posted: Mon Sep 11, 2023 1:50 am
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?
Re: SNMP MIBs - Remove all / start all over
Posted: Mon Sep 11, 2023 7:47 am
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'
Re: SNMP MIBs - Remove all / start all over
Posted: Mon Oct 02, 2023 9:56 pm
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!
Re: SNMP MIBs - Remove all / start all over
Posted: Mon Oct 02, 2023 11:00 pm
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.