Page 2 of 3

Re: Nagios XI - Trap definitons limit

Posted: Sun Jun 16, 2019 5:39 pm
by kandatih
Attached the requested commands output. Thanks.

Re: Nagios XI - Trap definitons limit

Posted: Mon Jun 17, 2019 8:27 am
by tgriep
That data looks correct. The only thing I see is the name of the MIB files are different from what was uploaded earlier in the post.
If the names don't match, that could be it.

To check that, run the following commands and post the output here.

Code: Select all

echo 'desc xi_mibs;' |mysql -t -u root -pnagiosxi nagiosxi
echo 'select * from xi_mibs;' |mysql -t -u root -pnagiosxi nagiosxi
Thanks.

Re: Nagios XI - Trap definitons limit

Posted: Mon Jun 17, 2019 2:35 pm
by kandatih
Thanks, Attached the log.

Re: Nagios XI - Trap definitons limit

Posted: Mon Jun 17, 2019 3:31 pm
by tgriep
Thats it, the names of the files in the database don't match so that is why the numbers don't add up.

If you like, you can delete the entries by running the following as root.

Code: Select all

echo "DELETE FROM xi_cmp_trapdata WHERE trapdata_parent_mib_name = 'CPQHOST-MIB';" |mysql -u root -pnagiosxi nagiosxi
echo "DELETE FROM xi_cmp_trapdata WHERE trapdata_parent_mib_name = 'CPQRACK-MIB';" |mysql -u root -pnagiosxi nagiosxi
echo "DELETE FROM xi_mib WHERE mib_name = 'cpqhost';" |mysql -u root -pnagiosxi nagiosxi
echo "DELETE FROM xi_mib WHERE mib_name = 'cpqrack';" |mysql -u root -pnagiosxi nagiosxi
Then, go back to the Manage MIBs menu, click on the Blue Arrow pointing to the right to process them and see if the numbers add up.

If not, run these 2 command again and post the output.

Code: Select all

echo 'select trapdata_parent_mib_name from xi_cmp_trapdata;' |mysql -t -u root -pnagiosxi nagiosxi
echo 'select * from xi_mibs;' |mysql -t -u root -pnagiosxi nagiosxi

Re: Nagios XI - Trap definitons limit

Posted: Mon Jun 17, 2019 10:01 pm
by kandatih
Assume running delete query, will delete the respective mibs and associated trap definitions. Dont think the mib will be available(and wont have an option to click on process) in Manage MIBs page, is my understanding right?

If I understand it right the mib_name field in xi_mibs table should match with trapdata_parent_mib_name in trapdata_parent_mib_name table for the associated traps to work correctly. If this is right, we may need to delete the mibs and try to rename the mibs as below reload them
cpqrack.mib to CPQRACK-MIB.mib
cpqhost.mib to CPQHOST-MIB.mib

Re: Nagios XI - Trap definitons limit

Posted: Tue Jun 18, 2019 3:18 pm
by cdienger
A small change to the last two commands that were provided:

Code: Select all

echo "DELETE FROM xi_mibs WHERE mib_name = 'cpqhost';" |mysql -u root -pnagiosxi nagiosxi
echo "DELETE FROM xi_mibs WHERE mib_name = 'cpqrack';" |mysql -u root -pnagiosxi nagiosxi

Code: Select all

Assume running delete query, will delete the respective mibs and associated trap definitions. Dont think the mib will be available(and wont have an option to click on process) in Manage MIBs page, is my understanding right?
After running the SQL statements the web UI will still show the MIB files as it gets them from the filesystem. The upload timestamp, status, processed, and associated trap count will be available though until the files are reprocessed.

Re: Nagios XI - Trap definitons limit

Posted: Tue Jun 18, 2019 10:24 pm
by kandatih
Still dont see the trap definitions count. Attached the screenshots captured after running the delete query.

Re: Nagios XI - Trap definitons limit

Posted: Wed Jun 19, 2019 3:06 pm
by cdienger
I see the problem. mib_name comes from the filename, but trapdata_parent_mib_name comes from the definition in the mib. For example:

Code: Select all

CPQRACK-MIB DEFINITIONS ::= BEGIN
To work around this, remove the entries from the db again, change the file names to cpqhost-MIB and cpqrack-MIB, and then import them.

Re: Nagios XI - Trap definitons limit

Posted: Wed Jun 19, 2019 3:17 pm
by cdienger
This was fixed in 5.6.3 :)

Re: Nagios XI - Trap definitons limit

Posted: Wed Jun 19, 2019 3:35 pm
by kandatih
Yep, changing the filename works, thanks a bunch both @cdienger & tgriep :D
Coming back to my initial question in this post..I understand there is no hard limit on the number of mibs or trap definitions we could add on a xi server. In case of alarm/trap flood, we would like to know how snmptt handles the traffic.Time taken to process a trap would be useful. Could you advise how to raise this a feature request.