Preventing to add a contact

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mdsupersonic
Posts: 84
Joined: Fri May 13, 2016 2:25 pm

Preventing to add a contact

Post by mdsupersonic »

Hi Nagios Support team,
I have a question ,how can I prevent Nagios to add the admin contact to the host and it's services which are newly added to the server?
Whenever I add a new host, Nagios will add my contact for notification either for host or for all services related to that host.How can I prevent that from the beginning ?

Regards

Majid
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Preventing to add a contact

Post by bwallace »

Just how are you adding these hosts / services - are you using templates or host / service groups? The reason I ask if you add a single host (without templates or applying it to a host group), you must manually specify a contact, if not, the contact field will be left blank. On the Alert Settings tab click 'Manage Contacts'

One
Alert settings tab click manage contacts.jpg
Two
No conacts by default.jpg
You do not have the required permissions to view the files attached to this post.
Be sure to check out the Knowledgebase for helpful articles and solutions!
mdsupersonic
Posts: 84
Joined: Fri May 13, 2016 2:25 pm

Re: Preventing to add a contact

Post by mdsupersonic »

Thank you for your reply,I'm adding by wizards both windows and Linux servers.Bu t I don't know why Nagios add my contact for notification.I went through more than 500 services to remove my contact which is frustrating.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Preventing to add a contact

Post by scottwilkerson »

On step 4 of the wizard you can uncheck
Myself (Adjust my settings)
Also, if you want this to be the default behavior you can go through a wizard until the end (unchecking that box) and then save it as a template.

Once saved you can set that template as the default template
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mdsupersonic
Posts: 84
Joined: Fri May 13, 2016 2:25 pm

Re: Preventing to add a contact

Post by mdsupersonic »

Perfect,thank you for your reply.
I have another question I made mistake in configuration once but I corrected that and saved the configuration.
But Nagios still shows that error again and again and when I click 'Try again' it will be fine.I check the error several time and there is nothing I can do.How can I overcome this issue to not happening again?
scrennshots are attached
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Preventing to add a contact

Post by lmiltchev »

Go to the CCM->Tools->Write Config Files->Click on "Delete", "Write", and "Verify" in the exact same order. If you see any config errors - go back to the CCM, and fix them, then verify configuration one more time. If you don't see any config errors, apply configuration.

If this doesn't help, run the following command to begin capturing log output:

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log &> /tmp/cmd.txt
Attempt to Apply Configuration from the web interface. After the browser has returned some output to the screen, press Ctrl+C to stop the log tail, and post the cmd.txt file, generated in the "/tmp" directory by the above instructions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mdsupersonic
Posts: 84
Joined: Fri May 13, 2016 2:25 pm

Re: Preventing to add a contact

Post by mdsupersonic »

Here is the output of cmd.txt file :

[root@tornagios3 tmp]# cat cmd.txt
..............
PROCESSED 1 COMMANDS
temctl status nagios.service" and "journalctl -xe" for details.
OUTPUT=RET: 0
RETURNCODE=6
mdsupersonic
Posts: 84
Joined: Fri May 13, 2016 2:25 pm

Re: Preventing to add a contact

Post by mdsupersonic »

Another output:
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
.Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
OUTPUT=RET: 0
RETURNCODE=6

PROCESSED 4 COMMANDS
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Preventing to add a contact

Post by bwallace »

Thanks for those details.

Check to see if there are multiple Nagios processes running, as this will cause an array of problems.

run this cmd on your nagios server:
ps - aef | grep nagios.cfg

* Look for multiple parent (PPID) processes. The Nagios process forks itself to run checks therefore subprocesses are normal. The nagios user should probably be the only owner of the nagios process. If in any doubt post the output here.

If there are multiple Nagios processes running, run these commands to resolve:

Code: Select all

service nagios stop
killall -9 nagios
service nagios start
Be sure to check out the Knowledgebase for helpful articles and solutions!
mdsupersonic
Posts: 84
Joined: Fri May 13, 2016 2:25 pm

Re: Preventing to add a contact

Post by mdsupersonic »

Unfortunately still I have the problem.
I did everything,killed nagios services an restart it but still I have that Error message . :(
Locked