Migrating Nagios XI host to CentOS 7
Migrating Nagios XI host to CentOS 7
Good morning,
I will be migrating my XI host to CentOS 7 this morning, but I'm running into a problem whenever I light up the new server.
Despite having notifications disabled in both the config file /usr/local/nagios/etc/nagios.cfg and in the GUI the new server is sending out dozens of "false positive" notifications. I assume they are cached somewhere?
My question, is there a way to clear out the notification cache on my new server so it won't send out anything during the transition period? I only want notifications to resume once the environment has stabilized and all of the hosts/services have checked-in.
Thank you.
I will be migrating my XI host to CentOS 7 this morning, but I'm running into a problem whenever I light up the new server.
Despite having notifications disabled in both the config file /usr/local/nagios/etc/nagios.cfg and in the GUI the new server is sending out dozens of "false positive" notifications. I assume they are cached somewhere?
My question, is there a way to clear out the notification cache on my new server so it won't send out anything during the transition period? I only want notifications to resume once the environment has stabilized and all of the hosts/services have checked-in.
Thank you.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Migrating Nagios XI host to CentOS 7
Hello @rferebee,
Make sure you have the notification turned off.
You should be able to view the mail queue with the following command, and can clear out the /var/spool/mqueue/ directory to remove message from this queue.
Make sure you have the notification turned off.
You should be able to view the mail queue with the following command, and can clear out the /var/spool/mqueue/ directory to remove message from this queue.
Code: Select all
mailq
You do not have the required permissions to view the files attached to this post.
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Migrating Nagios XI host to CentOS 7
So, I was reading another thread and it mentioned the xi_events table.
Do the notifications have anything to do with that table?
Do the notifications have anything to do with that table?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Migrating Nagios XI host to CentOS 7
Yes, if you had queued events they would still send
You can run the following to clear them all
You can run the following to clear them all
Code: Select all
echo "truncate table xi_events; truncate table xi_meta; truncate table xi_eventqueue;" | mysql -u root -pnagiosxiRe: Migrating Nagios XI host to CentOS 7
I don't see /var/spool/mqueue is that bad?
Re: Migrating Nagios XI host to CentOS 7
I tried running this command, but it's giving me the following error:scottwilkerson wrote:Yes, if you had queued events they would still send
You can run the following to clear them allCode: Select all
echo "truncate table xi_events; truncate table xi_meta; truncate table xi_eventqueue;" | mysql -u root -pnagiosxi
Code: Select all
ERROR 1046 (3D000) at line 1: No database selected-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Migrating Nagios XI host to CentOS 7
Hello @rferebee,
Looks like the db got cut off, run this:
Looks like the db got cut off, run this:
Code: Select all
echo "truncate table xi_events; truncate table xi_meta; truncate table xi_eventqueue;" | mysql -uroot -pnagiosxi nagiosxi
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Migrating Nagios XI host to CentOS 7
Ok, that worked, but the host is still showing 9770 requests when I run the: mailq command
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Migrating Nagios XI host to CentOS 7
Hi @rferebee,
I believe you are using Cent 7? If so, likely using the postfix MTA. Run the following and let me know if that clears the queue.
I believe you are using Cent 7? If so, likely using the postfix MTA. Run the following and let me know if that clears the queue.
Code: Select all
postfix flush
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Migrating Nagios XI host to CentOS 7
I don't think sendmail is actually installed on this new CentOS 7 host. Which is probably why it's not behaving like it typically would.
The location where the sendmail configuration files should be /etc/mail doesn't exist on the new host. What's more confusing for me though is trying to figure out how the host is sending out notifications if sendmail isn't installed.
The postfix flush command didn't do anything. The queue just keeps growing. It's up to over 11k now.
The location where the sendmail configuration files should be /etc/mail doesn't exist on the new host. What's more confusing for me though is trying to figure out how the host is sending out notifications if sendmail isn't installed.
The postfix flush command didn't do anything. The queue just keeps growing. It's up to over 11k now.