I got problem with sending messages:(

Assaf Flatto assaf.flatto at ssp.uk.com
Thu Dec 11 16:18:42 CET 2008


On Thursday 11 December 2008 13:52:43 Витя Борисов wrote:
> Hi there!
> I got problem with sending messages. User nagios is capable of
> sending messages with assigned to him rights without any restrictions.
>
> ns:~ # su - nagios
> nagios at ns:~> /usr/bin/printf "test msg, yo!" | mailx -v -A myisp
> vitya at xxx.yyy
> warning: incomplete line - newline appended
> warning: incomplete line - newline appended
> Resolving host mail4.xxx.yyy . . . done.
> Connecting to x.x.x.x . . . connected.
> 220 MAIL4.xxx.yyy ESMTP Server (Microsoft Exchange Internet Mail
> Service 5.5.2657.72) ready
> EHLO ns.kgminsk
> 250-MAIL4.xxx.yyy Hello [x.x.x.x]
> 250-XEXCH50
> 250-HELP
> 250-ETRN
> 250-DSN
> 250-SIZE 2097152
> 250-AUTH LOGIN
> 250 AUTH=LOGIN
> AUTH LOGIN
> 334 VXNlcm5hbWU6
> Ym9yaXNvdnZ2
> 334 UGFzc3dvcmQ6
> MTIz
> 235 LOGIN authentication successful
> MAIL FROM: <vitya at xxx.yyy>
> 250 OK - mail from <vitya at xxx.yyy>
> RCPT TO: <vitya at xxx.yyy>
> 250 OK - Recipient <VITYA at XXX.YYY>
> DATA
> 354 Send data.  End with CRLF.CRLF
> .
> 250 OK
> QUIT
> 221 closing connection
> nagios at ns:~>
>
> Message is received by my email box.
>
> From: Nagios robot <vitya at xxx.yyy>
> To: vitya at xxx.yyy
> Date: Thu, 11 Dec 2008 10:31:23 +0300
> User-Agent: nail 11.25 7/29/05
>
> test msg, yo!
>
> File .mailrc is located in /home/nagios/ directory. User nagios has
> access to the directory.
>
> account myisp{
> set from="vitya at xxx.yyy (Nagios robot)"
> set smtp=mail4.xxx.yyy
> set smtp-auth=login
> set smtp-auth-user=vitya
> set smtp-auth-password=**************************
> }
>
> debug_verbosity=2 and debug_file=/var/opt/nagios/nagios.debug are
> included into nagios.cfg, following can be seen in /var/opt/nagios/
> nagios.debug:
>
> [1228980610.181330] [032.0] [pid=3041] Notification viability test
> passed.
> [1228980610.181337] [032.1] [pid=3041] Current notification number: 2
> (incremented)
> [1228980610.181343] [032.2] [pid=3041] Creating list of contacts to
> be notified.
> [1228980610.181350] [032.1] [pid=3041] Host notification will NOT be
> escalated.
> [1228980610.181360] [032.1] [pid=3041] Adding normal contacts for
> host to notification list.
> [1228980610.181366] [032.2] [pid=3041] Adding individual contacts for
> host to notification list.
> [1228980610.181371] [032.2] [pid=3041] Adding members of contact
> groups for host to notification list.
> [1228980610.181391] [032.2] [pid=3041] Adding members of contact
> group 'l-admin' for host to notification list.
> [1228980610.181397] [032.2] [pid=3041] Adding contact 'nagiosadmin'
> to notification list.
> [1228980610.181414] [032.2] [pid=3041] ** Attempting to notifying
> contact 'nagiosadmin'...
> [1228980610.181422] [032.2] [pid=3041] ** Checking host notification
> viability for contact 'nagiosadmin'...
> [1228980610.181434] [032.2] [pid=3041] ** Host notification viability
> for contact 'nagiosadmin' PASSED.
> [1228980610.181441] [032.2] [pid=3041] ** Notifying contact
> 'nagiosadmin'
> [1228980610.181461] [032.2] [pid=3041] Raw notification command: /usr/
> bin/printf "%b" "***** Nagios *****\n\nNotification Type:
> $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:
> $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /
> usr/bin/nail -send -A myisp $CONTACTEMAIL$
> [1228980610.181497] [032.2] [pid=3041] Processed notification
> command: /usr/bin/printf "%b" "***** Nagios *****\n\nNotification
> Type: RECOVERY\nHost: arm-dspg\nState: UP\nAddress: 192.168.0.12
> \nInfo: PING
> OK - Packet loss = 0%, RTA = 0.79 ms\n\nDate/Time: Thu Dec 11
> 10:30:10 MSK 2008\n" | /usr/bin/nail -send -A myisp vitya at xxx.yyy
> [1228980614.724192] [032.2] [pid=3041] Calculating next valid
> notification time...
> [1228980614.724236] [032.2] [pid=3041] Default interval: 120.000000
> [1228980614.724258] [032.2] [pid=3041] Interval used for calculating
> next valid notification time: 120.000000
> [1228980614.724282] [032.0] [pid=3041] 1 contacts were notified.
> Next possible notification time: Thu Dec 11 12:30:10 2008
> [1228980614.724289] [032.0] [pid=3041] 1 contacts were notified.
>
> Configuration file of box which lost connection is as follows:
>
> # Last Modified: Чтв 07 Авг 2008 09:49:06
>
> define host{
>          use                     linux-arm
>          host_name               arm-dspg
>          alias                   ARM DSPG
>          address                 192.168.0.12
>          notification_options    s,d,u,r,f
>          }
>
> define service{
>          use                             generic-service
>          host_name                       arm-dspg
>          service_description             PING
>          check_command                   check_ping!100.0,20%!500.0,60%
>          }
>
> Finally, message is not received. What's the problem?
>

Have you defined a contact  for this notifications from this server ?
you need to define  contacts and contact groups to tell nagios to whom to send notifications in case 
of an alert !





IMPORTANT . this email and the information in it may be confidential, legally
privileged and/or protected by law. It is intended solely for the use of the
person to whom it is addressed. If you are not the intended recipient, please
notify the sender immediately and do not disclose the contents to any other
person, use it for any purpose, or store or copy the information in any medium.
Please also delete all copies of this email and any attachments from your
system.

We cannot guarantee the security or confidentiality of email communications. We
do not accept any liability for losses or damages that you may suffer as a
result of your receipt of this email including but not limited to computer
service or system failure, access delays or interruption, data non-delivery or
mis-delivery, computer viruses or other harmful components.

Copyright in this email and any attachments belong to Select Service Partner UK
Limited. Should you communicate with anyone at Select Service Partner UK Limited by
email, you consent to us monitoring and reading any such correspondence.

Nothing in this email shall be taken or read as suggesting, proposing or
relating to any agreement concerted practice or other practice that could
infringe UK or EC competition legislation.

Select Service Partner UK Limited is a company registered in England and Wales
(company number 05687183) whose registered office is at 1 The Heights, Brooklands, Weybridge. Surrey. KT13 0NY
 
 

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at 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


More information about the Users mailing list