NSTI for Ubuntu

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
zpole
Posts: 1
Joined: Wed Dec 22, 2021 2:07 pm

NSTI for Ubuntu

Post by zpole »

Let me preface this by saying I'm somewhat of a Nagios and Linux newbie.

I'm trying to implement the NSTI addon for Nagios Core 4.4.6 on Ubuntu 20.04, but all of the guides and I've been able to find online are for the Yum package manager and aren't compatible with Ubuntu's Apt. Even the official GitHub repository (https://github.com/NagiosEnterprises/nsti) is missing directions for Ubuntu. I'm running Nagios Core just fine and was hoping to use it to monitor SNMP traps from my network with NSTI to make the information more legible.

Any assistance with finding an installer script or manual installation instructions would be appreciated, thanks!
jdmsilbvs
Posts: 1
Joined: Fri Jan 07, 2022 5:36 am

Re: NSTI for Ubuntu

Post by jdmsilbvs »

NSTI 3.0.2

apt install -y python-mysqldb snmptt mysql-server php-mysql python-mysqldb python-dev libmysqlclient-dev libdbd-mysql-perl libdbi-perl python3-storm libexpat1 python3 apache2 apache2-utils ssl-cert libapache2-mod-wsgi

mysql_secure_installation

#Would you like to setup VALIDATE PASSWORD component?
#Press y|Y for Yes, any other key for No: Y

Y

#There are three levels of password validation policy:
#LOW Length >= 8
#MEDIUM Length >= 8, numeric, mixed case, and special characters
#STRONG Length >= 8, numeric, mixed case, special characters and dictionary file

#Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG:

0

#Please set the password for root here.
New password:
Re-enter new password:

#Estimated strength of the password: xxx
#Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) :

Y

mysql -u root –pPASSWORDMYSQLROOT

Mysql> create database snmptt;

mysql> GRANT ALL PRIVILEGES ON snmptt.* TO ‘snmpttuser’@’localhost’ WITH GRANT OPTION;

mysql> GRANT PROCESS ON *.* TO 'snmpttuser'@'localhost';

Mysql> Flush privileges;

mysql> SHOW GRANTS FOR 'snmpttuser'@'localhost';

+----------------------------------------------------------------------------------+
| Grants for snmpttuser@localhost |
+----------------------------------------------------------------------------------+
| GRANT PROCESS ON *.* TO `snmpttuser`@`localhost` |
| GRANT ALL PRIVILEGES ON `snmptt`.* TO `snmpttuser`@`localhost` WITH GRANT OPTION |
+----------------------------------------------------------------------------------+
2 rows in set (0,00 sec)

Mysql> quit

systemctl status mysql.service

Cd /home/sources

wget http://assets.nagios.com/downloads/nsti ... latest.php -O nsti-3.0.2.tar.gz

tar zxvf nsti-3.0.2.tar.gz

cd nsti-3.0.2/

mysql -u snmpttuser -psnmpttpass snmptt < nsti/dist/nsti.sql

vim nsti/etc/nsti.py

#~ Database Configuration Options
#~ Use mysql for MySQL and postgres for PostgreSQL
DB_TYPE='mysql'
DB_HOST='localhost'
DB_PORT='3306'
DB_NAME='snmptt'
DB_USER='snmpttuser'
DB_PASS='snmpttpass'

#~ Page Display Options
TRUNCATE=100
PERPAGE=50



sh install.sh

python -m flask --version
#Python 2.7.18
#Flask 1.1.4
#Werkzeug 1.0.1

cp /etc/httpd/conf.d/nsti.conf /etc/apache2/sites-enabled/

vim /etc/apache2/sites-enabled/nsti.conf

WSGIScriptAlias /nsti /usr/local/nsti/wsgi.py
<Directory /usr/local/nsti>
Require all granted
</Directory>

service apache2 restart

vim /etc/default/snmptrapd

TRAPDOPTS='-Lsd -On -p /run/snmptrapd.pid'


systemctl daemon-reload

systemctl restart snmptrapd.service

chmod 775 /usr/local/nsti -R

chown nagios:nagcmd /usr/local/nsti -R

vim /etc/snmp/snmptrapd.conf

disableAuthorization yes
traphandle default /usr/sbin/snmptthandler


vim /etc/snmp/snmptt.ini

mode = daemon
net_snmp_perl_enable = 1
dns_enable = 1
daemon_fork = 1
daemon_uid = snmptt
pid_file = /var/run/snmptt.pid
spool_directory = /var/spool/snmptt/
log_file = /var/log/snmptt/snmptt.log
mysql_dbi_enable = 1
mysql_dbi_host = localhost
mysql_dbi_port = 3306
mysql_dbi_database = snmptt
mysql_dbi_table = snmptt
mysql_dbi_table_unknown = snmptt_unknown
mysql_dbi_username = snmpttuser
mysql_dbi_password = snmpttpass
unknown_trap_log_enable = 1
unknown_trap_log_file = /var/log/snmptt/snmpttunknown.log

[TrapFiles]
snmptt_conf_files = <<END
/etc/snmp/snmptt.conf
END


systemctl enable snmptrapd

service snmptt restart

service snmptrapd restart
Luigiwek
Posts: 1
Joined: Wed Jan 12, 2022 3:07 am
Location: Ghana
Contact:

топ софосбувир официальный сайт top sofosbuvir24 ru

Post by Luigiwek »

топ софосбувир официальный сайт https://top-sofosbuvir24.ru/
топ софосбувир официальный сайт https://top-sofosbuvir24.ru/
Locked