Page 1 of 1

Nagios XI 5.5 - SNMP trap interface error

Posted: Wed Jul 11, 2018 4:06 am
by jacek
Hi,

In the SNMP trap interface when I click the "Add example trap definition" - I get the green bar on the top saying Success, but the trap never get's added.

And if I klick on the "One Clik Systems Test" i get:
Failed Stage 2/9 (Trap Definition Verification)! Nagios XI was not able to find our trap definition in the database.

Seems that something is wrong with DB/permissions or so?

Re: Nagios XI 5.5 - SNMP trap interface error

Posted: Wed Jul 11, 2018 9:42 am
by swolf
Hello jacek,

I think your issue is similar to the one mentioned here.

Basically, we changed some mysql tables is one place and not in another, and updated the code to match those changes.

To fix your issue, please log into mysql from the terminal. By default, you can do this with

Code: Select all

mysql -u root -pnagiosxi nagiosxi
,

though the -p option might be different if you've manually set a different password.

Then, run these commands to update your schema:

Code: Select all

DROP TABLE nagiosxi.xi_cmp_trapdata;
CREATE TABLE IF NOT EXISTS `nagiosxi`.`xi_cmp_trapdata` (
    `trapdata_id` int auto_increment,
    `trapdata_updated` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE current_timestamp,
    `trapdata_enabled` smallint default 1,
    `trapdata_event_name` varchar(128) NOT NULL default '',
    `trapdata_event_oid` varchar(256) NOT NULL default '',
    `trapdata_category` varchar(128) NOT NULL default '',
    `trapdata_severity` varchar(64) NOT NULL default '',
    `trapdata_custom_format` text,
    `trapdata_raw_data` text,
    `trapdata_exec` text,
    `trapdata_desc` text,
    `trapdata_wizard_integration_enabled` smallint default 0,
    `trapdata_wizard_integration_data` text,
    primary key (`trapdata_id`),
    unique (`trapdata_event_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;

DROP TABLE nagiosxi.xi_cmp_trapdata_log;
CREATE TABLE IF NOT EXISTS `nagiosxi`.`xi_cmp_trapdata_log` (
    `trapdata_log_id` int auto_increment,
    `trapdata_log_event_name` varchar(128) NOT NULL default '',
    `trapdata_log_event_oid` varchar(50) NOT NULL default '',
    `trapdata_log_numeric_oid` varchar(100),
    `trapdata_log_symbolic_oid` varchar(100),
    `trapdata_log_community` varchar(20),
    `trapdata_log_trap_hostname` varchar(100),
    `trapdata_log_trap_ip` varchar(16),
    `trapdata_log_agent_hostname` varchar(100),
    `trapdata_log_agent_IP` varchar(16),
    `trapdata_log_category` varchar(20) NOT NULL default '',
    `trapdata_log_severity` varchar(20) NOT NULL default '',
    `trapdata_log_uptime` varchar(20) NOT NULL default '',
    `trapdata_log_datetime` datetime,
    `trapdata_log_bindings` text,
    primary key (`trapdata_log_id`),
    unique (`trapdata_log_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
and let me know whether this fixes your issue.

Re: Nagios XI 5.5 - SNMP trap interface error

Posted: Wed Jul 11, 2018 2:42 pm
by jacek
This worked!
Thank You very much :)

Re: Nagios XI 5.5 - SNMP trap interface error

Posted: Wed Jul 11, 2018 3:03 pm
by swolf
No problem!

I'm going to go ahead and lock this thread, but feel free to start a new one if any other issues come up!