setup email notification on Nagios Core

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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: setup email notification on Nagios Core

Post by rkennedy »

I don't see any reference to your cfg_dir or cfg_file directives in this which is odd. Are you managing it another way?

You should be able to add this to the nagios.cfg -

Code: Select all

cfg_file=/usr/local/nagios/etc/contacts.cfg
cfg_file=/usr/local/nagios/etc/commands.cfg
(change paths if needed - then restart nagios service after)
Former Nagios Employee
huytq1786
Posts: 21
Joined: Tue Dec 20, 2016 9:50 pm

Re: setup email notification on Nagios Core

Post by huytq1786 »

rkennedy wrote:I don't see any reference to your cfg_dir or cfg_file directives in this which is odd. Are you managing it another way?

You should be able to add this to the nagios.cfg -

Code: Select all

cfg_file=/usr/local/nagios/etc/contacts.cfg
cfg_file=/usr/local/nagios/etc/commands.cfg
(change paths if needed - then restart nagios service after)
Thank you Kennedy.
What is you mean? you want me to post contacts.cfg and commands.cfg, right?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: setup email notification on Nagios Core

Post by rkennedy »

No, it doesn't look like you're including the configuration files in your nagios.cfg, so I'm unsure how the system would read them. You'll want to add those two lines to your configuration, and then restart the nagios service.
Former Nagios Employee
huytq1786
Posts: 21
Joined: Tue Dec 20, 2016 9:50 pm

Re: setup email notification on Nagios Core

Post by huytq1786 »

huytq1786 wrote:
rkennedy wrote:I don't see any reference to your cfg_dir or cfg_file directives in this which is odd. Are you managing it another way?

You should be able to add this to the nagios.cfg -

Code: Select all

cfg_file=/usr/local/nagios/etc/contacts.cfg
cfg_file=/usr/local/nagios/etc/commands.cfg
(change paths if needed - then restart nagios service after)
Thank you Kennedy.
What is you mean? you want me to post contacts.cfg and commands.cfg, right?
I already added 2 commands to the nagios.cfg. But still cannot got any email notification
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: setup email notification on Nagios Core

Post by rkennedy »

Did you run service nagios restart after doing so? Please post your /usr/local/nagios/var/objects.cache and /usr/local/nagios/var/status.dat for us to review.
Former Nagios Employee
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: setup email notification on Nagios Core

Post by tmcdonald »

Just checking in since we have not heard from you in a while. Did @rkennedy's post clear things up? Or has the issue been resolved?
Former Nagios employee
Locked