SNMPTT DB server change still using the old DB server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

SNMPTT DB server change still using the old DB server

Post by TBT »

We use offloaded Databases. In an effort to migrate to a new DB server, I've stopped SNMPTT service, modified mysql_dbi_host in /etc/snmp/snmptt.ini to use the new DB hostname and then started the service. However SNMPTT is still connecting to the old DB server.

Please advise.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: SNMPTT DB server change still using the old DB server

Post by mbellerue »

Are there any errors in XI's /var/log/syslog, or the database server's /var/log/mysql/error.log files that might suggest issues connecting to the database?

Can you connect from XI to the database server using the mysql command line utility?

Code: Select all

mysql -u <databaseuser> -p -h <databaseIP>
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: SNMPTT DB server change still using the old DB server

Post by TBT »

No issues connecting to the new Database.

Upon further testing we have discovered snmptt.ini will only accept an IP address, not a hostname in the configuration. Hostname fails to connect, IP of the host successfully connects.

# MySQL: Hostname of database server (optional - default localhost)
mysql_dbi_host = <ip>

Please advise.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: SNMPTT DB server change still using the old DB server

Post by mbellerue »

So it looks like we actually don't use the database configuration settings in snmptt.ini. We use the snmptt.conf.nxti to execute a PHP script that will put the trap data into the nagiosxi database.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: SNMPTT DB server change still using the old DB server

Post by TBT »

mbellerue wrote:So it looks like we actually don't use the database configuration settings in snmptt.ini. We use the snmptt.conf.nxti to execute a PHP script that will put the trap data into the nagiosxi database.
1. If that's the case, why does the configuration option in snmptt.ini work with an IP?

2. snmptt.conf.nxti is an empty file. How are you suggesting we resolve the issue?
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: SNMPTT DB server change still using the old DB server

Post by mbellerue »

I guess maybe I don't understand what the actual issue is. You've got the snmptt database located on another server, and you want to log traps over there. That's where snmptt.ini would come in. If you need Nagios to receive the traps as well, that's where the snmptt.conf.nxti file would come in. The only reason I can think of why the nxti file would be blank is if there haven't been any traps setup in Nagios.

So is the only issue that you weren't logging to the external snmptt database? If so, then you've got the IP in the snmptt.ini file, and it's working. If you want to use domain names instead, then we can look at the DNS settings on the server, and in the snmptt.ini file.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: SNMPTT DB server change still using the old DB server

Post by TBT »

mbellerue wrote:I guess maybe I don't understand what the actual issue is. You've got the snmptt database located on another server, and you want to log traps over there. That's where snmptt.ini would come in. If you need Nagios to receive the traps as well, that's where the snmptt.conf.nxti file would come in. The only reason I can think of why the nxti file would be blank is if there haven't been any traps setup in Nagios.

So is the only issue that you weren't logging to the external snmptt database? If so, then you've got the IP in the snmptt.ini file, and it's working. If you want to use domain names instead, then we can look at the DNS settings on the server, and in the snmptt.ini file.

Correct. But as reported, /etc/snmp/snmptt.ini doesn't work with a hostname, only an IP address. Using an IP wasn't an issue in the past but moving forward we require a hostname be used.

All other configurations associated with offloading a DB are working with hostnames and DNS works properlly too.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: SNMPTT DB server change still using the old DB server

Post by mbellerue »

Okay perfect. Then let's double check these settings in snmptt.ini,

Code: Select all

dns_enable = 1 
strip_domain = 0
mysql_dbi_host = yourmysqlhost.domain.com
and see if that gets the data where it needs to be.

Edit:
One more question, if this doesn't work. Is this a RHEL/CentOS server, or an Ubuntu server?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: SNMPTT DB server change still using the old DB server

Post by TBT »

Issue resolved. Was set to strip_domain = 1, setting to 0 produces the expected result.

Thank you.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Locked