OK, i have put in /etc/aliases:
/root: cosmin.ne...@omnilogic.ro, \root/
The email account in Thunderbird has outgoing smtp server:
mail2.omnilogic.ro:25
Also Lyle Giese gave me some more tips on how to configure
/etc/postfix/main. This is how postfix are configured now:
/etc/postfix/main.cfg:
//everything else is left unchanged.
/myhostname = mail2.omnilogic.ro
//mydomain = omnilogic.ro/
/myorigin = $mydomain/
/mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
smtp_sasl_auth_enable = yes
smtp_sasl_security_options =
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
transport_maps = hash:/etc/postfix/transport/
/relayhost =/
/etc/postfix/transport
/omnilogic.ro :
.omnilogic.ro :
* smtp:[mail2.omnilogic.ro]:25/
/etc/postfix/sasl_passwd:
/webmail.omnilogic.ro cosmin.ne...@omnilogic.ro:***//
/
I have attached the 2 configs that i thing is relevant to Nagios
host/service configurations.
And regarding your last advice, i have no clue on how to configure my
email client to check the email account on the nagios machine...don't i
need a mail server on nagios machine for that?
So...can anyone tell me what is missing, or point me to some
step-by-step documentation?
***************************************************************************
Just before pressing SEND, Lyle gave me some more hints, and now it
working, i can receive mails.
These line needed to be added in /etc/postfix/transport:
mail2.omnilogic.ro :
.mail2.omnilogic.ro :
* smtp:[mail2.omnilogic.ro]:25
Thank allot Lyle
Michael Saldivar wrote:
On Tue, Nov 17, 2009 at 2:36 AM, Cosmin Neagu
<cosmin.ne...@omnilogic.ro <mailto:cosmin.ne...@omnilogic.ro>> wrote:
Hello everybody,
From what i see from commands.cfg, by default it tries to send email
with: /usr/bin/mail -s.
But the email ends up in a local folder /var/mail/cosmin.
Can anyone help me with some documentation or some advice on how can i
make nagios send emails?
Thanks.
Looks like it is sending mail, and that mail is being delivered
locally. When you configured Nagios to send e-mail, what e-mail
address did you tell it to send to?
Also, look for a file called /etc/aliases. Open it, and see if there
is a line like:
root: cosmin
The name on the left may match the e-mail address you gave nagios, and
the aliases file is re-directing that mail to the local user cosmin.
Replace cosmin with an e-mail address on a different domain. Or
modify Nagios to send to a an e-mail address on a domain different
than the local machine. Or configure the e-mail client on your
computer to check the e-mail account on your Nagios machine.
--
Mike
define contactgroup{
contactgroup_name Monitorizare
alias Grup de monitorizare Omnilogic
members EmailCosmin
}
define contact{
contact_name EmailCosmin
alias Cosmin Neagu Email
contactgroups Monitorizare
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period AllTime
service_notification_period AllTime
host_notification_options d,u,r
service_notification_options w,u,c,r
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
email cosmin.ne...@omnilogic.ro
}
define host{
host_name Cosmin
alias CosminLaptopDell
address 192.168.53.151
check_command check-host-alive
max_check_attempts 3
check_period AllTime
contacts EmailCosmin
contact_groups Monitorizare
notification_interval 30
notification_period AllTime
}
define service{
host_name Cosmin
service_description HTTP
check_command check_http
notifications_enabled 1
notification_options w,u,c,r,f,s
max_check_attempts 5
check_interval 5 ;minutes
retry_interval 3
check_period AllTime
notification_interval 30 ;minutes
notification_period AllTime
contacts EmailCosmin
contact_groups Monitorizare
}
define service{
host_name Cosmin
service_description SSH
check_command check_ssh
notifications_enabled 1
notification_options w,u,c,r,f,s
max_check_attempts 5
check_interval 5 ;minutes
retry_interval 3
check_period AllTime
notification_interval 30 ;minutes
notification_period AllTime
contacts EmailCosmin
contact_groups Monitorizare
}
define timeperiod{
timeperiod_name AllTime
alias All the time
sunday 00:00-24:00 ; Every Sunday of every
week
monday 00:00-24:00 ; Every Monday of every
week
tuesday 00:00-24:00 ; Every Tuesday of
every week
wednesday 00:00-24:00 ; Every Wednesday of
every week
thursday 00:00-24:00 ; Every Thursday of
every week
friday 00:00-24:00 ; Every Friday of every
week
saturday 00:00-24:00 ; Every Saturday of
every week
}
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue.
::: Messages without supporting info will risk being sent to /dev/null