Page 2 of 3
Re: Adding contacts and contact groups
Posted: Fri Oct 04, 2019 12:54 pm
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
Re: Adding contacts and contact groups
Posted: Fri Oct 04, 2019 12:56 pm
by scottwilkerson
Do you have a MTA installed and running on the server such as postfix or sendmail?
Re: Adding contacts and contact groups
Posted: Fri Oct 04, 2019 1:08 pm
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
Re: Adding contacts and contact groups
Posted: Fri Oct 04, 2019 1:21 pm
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?
Re: Adding contacts and contact groups
Posted: Fri Oct 04, 2019 1:38 pm
by madhurima12
Sorry, did you receive my reply? It does not show up here
Re: Adding contacts and contact groups
Posted: Fri Oct 04, 2019 4:00 pm
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.
Re: Adding contacts and contact groups
Posted: Mon Oct 07, 2019 1:18 pm
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 **"
[email protected]' 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?
Re: Adding contacts and contact groups
Posted: Tue Oct 08, 2019 7:44 am
by scottwilkerson
Is there a postfix service running?
Re: Adding contacts and contact groups
Posted: Tue Oct 08, 2019 11:32 am
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?
Re: Adding contacts and contact groups
Posted: Tue Oct 08, 2019 11:46 am
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