Adding contacts and contact groups

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.
madhurima12
Posts: 15
Joined: Wed Sep 25, 2019 4:05 pm

Re: Adding contacts and contact groups

Post by madhurima12 »

Path to email:
/usr/bin/mail

Path to printf:
/usr/bin/printf

Not sure if that's how its supposed to be for the above. I just ran the commands specified in your last post.

Also could not locate a maillog using the command you specified. Checked the path provided. There is no maillog inside /var/bin
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Adding contacts and contact groups

Post by scottwilkerson »

Do you have a MTA installed and running on the server such as postfix or sendmail?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
madhurima12
Posts: 15
Joined: Wed Sep 25, 2019 4:05 pm

Re: Adding contacts and contact groups

Post by madhurima12 »

Following commands posted in your last post:
path to emai
/usr/bin/mail

path to printf
/usr/bin/printf

could not locate a maillog by following the path into /var/bin
command posted did not run saying no such file or directory
so no maillog definitely along that path
madhurima12
Posts: 15
Joined: Wed Sep 25, 2019 4:05 pm

Re: Adding contacts and contact groups

Post by madhurima12 »

Sorry about the last post. I send out the same information twice.
About MTA being installed, I was not really able to verifiy if it is there or not. Is there any way to verify if MTA is installed or not? I tried running a few commands to check but unfortunately nothing went through. It may also be that RancherOS does not have MTA installed since it is a very thin OS.
What would your recommendation be in that case?
madhurima12
Posts: 15
Joined: Wed Sep 25, 2019 4:05 pm

Re: Adding contacts and contact groups

Post by madhurima12 »

Sorry, did you receive my reply? It does not show up here
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Adding contacts and contact groups

Post by cdienger »

If you have the locate command available you can do a 'locate sendmail' or 'locate postfix' to see if you have the configuration files for a MTA. Config files usually look like sendmail.cf or main.cf. As far as configuring these, you'll want to check with the OS or package documentation.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
madhurima12
Posts: 15
Joined: Wed Sep 25, 2019 4:05 pm

Re: Adding contacts and contact groups

Post by madhurima12 »

Yes, I did find a postfix folder which has a main.cf file in it.

The error I see now is as follows:

[1570445859] wproc: NOTIFY job 52 from worker Core Worker 41 timed out after 31.01s
[1570445859] wproc: host=lsbxcpch008.icbc.net; service=(none); contact=madi
[1570445859] wproc: early_timeout=1; exited_ok=0; wait_status=0; error_code=62;
[1570445859] wproc: stderr line 01: postdrop: warning: mail_queue_enter: create file maildrop/179759.1154: Permission denied
[1570445859] wproc: stderr line 02: postdrop: warning: mail_queue_enter: create file maildrop/179930.1154: Permission denied
[1570445859] wproc: stderr line 03: postdrop: warning: mail_queue_enter: create file maildrop/180106.1154: Permission denied
[1570445859] Warning: Notifying contact 'madi' of host 'lsbxcpch008.icbc.net' by command '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: PROBLEM\nHost: lsbxcpch008.icbc.net\nState: DOWN\nAddress: 10.164.5.204\nInfo: /bin/ping -n -U -W 30 -c 5 10.164.5.204\n\nDate/Time: Mon Oct 7 10:57:08 UTC 2019\n" | /usr/bin/mail -s "** PROBLEM Host Alert: lsbxcpch008.icbc.net is DOWN **" madhurima.ghosh@icbc.com' timed out after 0.00 seconds

This is in the nagios.log file. This is just one instance. The same thing keeps appearing for all servers I am trying to monitor for all contacts I have added.

Can you help me understand what this means ? And how to resolve?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Adding contacts and contact groups

Post by scottwilkerson »

Is there a postfix service running?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
madhurima12
Posts: 15
Joined: Wed Sep 25, 2019 4:05 pm

Re: Adding contacts and contact groups

Post by madhurima12 »

This is what i get when I try to start postfix:

root@nagios-87fbfd68c-pgvb5:/etc# service postfix status
* postfix is not running
root@nagios-87fbfd68c-pgvb5:/etc# postfix start
postfix: Postfix is running with backwards-compatible default settings
postfix: See http://www.postfix.org/COMPATIBILITY_README.html for details
postfix: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
postfix/postfix-script: fatal: the Postfix mail system is already running


When I check the status, it says it's not running. But as I try to start it up, that's what I see.
Is that what is causing the issue?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Adding contacts and contact groups

Post by scottwilkerson »

madhurima12 wrote:This is what i get when I try to start postfix:

root@nagios-87fbfd68c-pgvb5:/etc# service postfix status
* postfix is not running
root@nagios-87fbfd68c-pgvb5:/etc# postfix start
postfix: Postfix is running with backwards-compatible default settings
postfix: See http://www.postfix.org/COMPATIBILITY_README.html for details
postfix: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
postfix/postfix-script: fatal: the Postfix mail system is already running


When I check the status, it says it's not running. But as I try to start it up, that's what I see.
Is that what is causing the issue?
Yep.. somehow you are going to need to get it running if you want it to send mail. This is likely a result of installing on a system that cannot run services
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked