Re: [Nagios-users] Sending mails - first post

2009-11-18 Thread Cosmin Neagu

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.rocosmin.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 
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_nameEmailCosmin
alias   Cosmin Neagu Email
contactgroups   Monitorizare
host_notifications_enabled  1
service_notifications_enabled   1
host_notification_periodAllTime
service_notification_period AllTime
host_notification_options   d,u,r
service_notification_optionsw,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_periodAllTime
contactsEmailCosmin
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_optionsw,u,c,r,f,s
max_check_attempts  5
check_interval  5   ;minutes
retry_interval  3
check_periodAllTime
notification_interval   30  ;minutes
notification_period AllTime
contactsEmailCosmin
contact_groups  Monitorizare
}
define service{
host_name   Cosmin
service_description SSH
check_command   check_ssh
notifications_enabled   1
notification_optionsw,u,c,r,f,s
max_check_attempts  5

Re: [Nagios-users] Sending mails - first post

2009-11-17 Thread Michael Saldivar
On Tue, Nov 17, 2009 at 2:36 AM, Cosmin Neagu 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
--
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

Re: [Nagios-users] Sending mails - first post

2009-11-17 Thread Marc Powell

On Nov 17, 2009, at 3:36 AM, Cosmin Neagu wrote:

> 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?

It sounds like you're not using a fully-qualifed email address for your 
contact{} (addr...@domain.com) or else the local SMTP server running on your 
nagios box believes that it is responsible for the @domain.com you're sending 
to.

--
Marc


--
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


Re: [Nagios-users] Sending mails - first post

2009-11-17 Thread Lyle Giese
Cosmin Neagu wrote:

> Hello everybody,
> First time here, so if it is a stupid questions, sorry for that.
> I have just installed nagios 3.2.0 an have some host and services 
> monitoring.
> Is installed on SuSE 10.2. The only thing that i don't know hot to do, 
> is making nagios to send emails. Never configured stuff relating to 
> emails before.
>  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.
>
>   
Nagios is correctly sending emails via the OS system utilities.  Now 
what you really want is for the OS to push them somewhere else.

I use SuSE Linux here and it  uses Postfix for email and I know how to 
forward email and setup Postfix when forwarding to another server to use 
smtp auth.  If you need a bit of advice on Postfix, let me know.

Lyle Giese
LCR Computer Services, Inc.




--
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


[Nagios-users] Sending mails - first post

2009-11-17 Thread Cosmin Neagu
Hello everybody,
First time here, so if it is a stupid questions, sorry for that.
I have just installed nagios 3.2.0 an have some host and services 
monitoring.
Is installed on SuSE 10.2. The only thing that i don't know hot to do, 
is making nagios to send emails. Never configured stuff relating to 
emails before.
 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.


--
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