Nagios / CentOS 6.x: How to Install NSTI Nagios SNMP Trap Interface Guide

2

This is a quick Install How to Guide on How to install NSTI

NSTI is the Nagios  SNMP Trap Interface.

If you setup your Nagios to receive passive SNMP Traps, you did this most likely via snmptt then you have the option to store the SNMP traps in the MySQL Database.

Due to the lack of Nagios to show only the last incoming trap there is no way (except of sending notifications via mail) to list all the incoming traps. Well now there is.

NSTI

You could find a few details about NSTI here http://exchange.nagios.org/directory/Addons/SNMP/Nagios-SNMP-Trap-Interface-%28NSTI%29/details

Or in the Support Forum http://support.nagios.com/forum/viewforum.php?f=22

There is a Version 2.0 RC of which I would strongly advise to stay away simply cause it didn’t work. http://labs.nagios.com/2012/01/10/nagios-snmp-trap-interface-nsti-available/

So how do we install it.

We use the version 1.4.

It is assumed that you have installed snmptt as per http://assets.nagios.com/downloads/nagiosxi/docs/Integrating_SNMP_Traps_With_XI.pdf

This has not yet enabled the mysql part of the trap’s. So do the following:

On the Nagios Server

vi /etc/snmp/snmptt.ini

There are loads of things to configure for your general snmptt usage but we are now looking for the mysql part. Search for “[SQL]” and modify as per your needs and at least

mysql_dbi_enable = 1

Important are too:

# MySQL: Hostname of database server (optional - default localhost)
mysql_dbi_host = localhost
# MySQL: Port number of database server (optional - default 3306)
mysql_dbi_port = 3306
# MySQL: Database to use
mysql_dbi_database = snmptt # MySQL: Table to use
mysql_dbi_table = snmptt # MySQL: Username to use
mysql_dbi_username = snmpttuser # MySQL: Password to use
mysql_dbi_password = snmpttpass # This one should match the one used later in the NSTI install
cd /tmp
wget http://dl.dropbox.com/u/266463/nsti-rc1.4.tar.gz

I’m sorry for using my Dropbox account here, but the Nagios Link is unusable for wget. For reference: The Original is here http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=3185&cf_id=24 and you always can download from there and sftp or scp to your Nagios Server.

Extract the file

tar xvf nsti-rc1.4.tar.gz
cd nsti

Feel free to read the README and INSTALL in that directory. Else

# ./install.py
snmptt install verified.
Ok, lets get some of the MySQL information. To use the default just hit enter.
What server is your MySQL located on?
Default: [localhost]:
What port is your MySQL listening on? Default: [3306]:
What is the root password for your MySQL? Default: [nagiosxi]:
What is the desired username for the snmptt user? Default: [snmptt]:
What is the desired password for the snmptt user? Default: [snmpttpass]:
What is the desired table for the snmptt application? Default: [snmptt]:
What is the desired host for the origin of the snmptt user? Default: [localhost]:
What is the primary Nagios appplication [core|xi]? Default: [xi]: xi
There will be sensitive information displayed. Please ready your surroundings, then press enter.
--- MySQL Info ---
MySQL host: localhost
MySQL root password: nagiosxi
MySQL port: 3306
--- SNMPTT User Info ---
SNMPTT user: snmptt
SNMPTT password: snmpttpass
SNMPTT client location: localhost
SNMPTT table: snmptt
--- Install Type --- xi Continue? [ enter 'y' to continue, any other to redo ]: y

Sucessfully connected to database.
Continuing with given information.
Successfully added permissions to database.
Successfully tested connection with new authentication.
Sucessfully edited snmptt.ini.
Sucessfully moved apache configuration.
Sucessfully edited etc/config.ini.
Sucessfully edited index.php
Sucessfully copied install directory.
Your PHP version looks like it is up to date, make sure the php-mysql module is installed.
Success.

Nagios SNMP Trap Interface has successfully been installed.
You can now safely remove this directory: /tmp/nsti You need to restart apache.

You can access Nagios SNMP Trap Interface at http://<your server>/nsti/
service httpd restart

And Thats it.

2 thoughts on “Nagios / CentOS 6.x: How to Install NSTI Nagios SNMP Trap Interface Guide

Leave a Reply