> -----Original Message----- > From: Michael Friedrich [mailto:michael.friedr...@gmail.com] > Sent: 12 January 2013 21:22 > > On 12.01.2013 12:05, Guus Leeuw jr wrote: > > Hi, > > > > I'm running icinga 1.6.1 on my production host, monitoring just 12 > > servers and 95 services. I am using NagioSQL version 3.2.0 to manage > > the Icinga configuration. I have one icinga instance. > > > > The postqueue on the icinga server is ever increasing with emails that > > icinga is trying to sent to $@itpassion.com. > > you are using a macro in the wrong place, which does not get resolved by the > core, but left as string. your shell interpreter then puts $foo$ as $foo (empty > value) and $ (stays) which results in your output. > > in order to track down your faulty macro, either look in your command > configuration, or as well enable debug levels for macros and commands, and > trace it in debug logs too. > > can you post your notification command plus where it's used?
define command { command_name notify-host-by-email command_line /usr/bin/printf "%b" "***** Icinga *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$ register 1 } define command { command_name notify-service-by-email command_line /usr/bin/printf "%b" "***** Icinga *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ register 1 } Usage: define contact { contact_name adm_b alias PB (Administrator) contactgroups ITSupport host_notification_period SUSA_UK_0024 service_notification_period SUSA_UK_0024 host_notification_options d,u,r,f,s service_notification_options w,u,c,r,f,s host_notification_commands notify-host-by-email service_notification_commands notify-service-by-email email p...@itpassion.com register 1 } define contact { contact_name adm_l alias GL (Administrator) contactgroups ITPSysAd host_notifications_enabled 1 service_notifications_enabled 1 host_notification_period SUSA_UK_0024 service_notification_period SUSA_UK_0024 host_notification_options d,u,r,f,s service_notification_options w,u,c,r,f,s host_notification_commands notify-host-by-email service_notification_commands notify-service-by-email can_submit_commands 1 email g...@itpassion.com register 1 } define contact { contact_name apponotec alias Apponotec Email contactgroups Apponotec host_notification_period MOSA_UK_0917 service_notification_period MOSA_UK_0917 host_notification_options d,u,r,f,s service_notification_options w,u,c,r,f,s host_notification_commands notify-host-by-email service_notification_commands notify-service-by-email email s...@apponotec.net register 1 } define contact { contact_name tw alias TW (Apponotec) host_notification_period SUSA_UK_0720 service_notification_period SUSA_UK_0720 host_notification_options d,u,r,f,s service_notification_options w,u,c,r,f,s host_notification_commands notify-host-by-email service_notification_commands notify-service-by-email email t...@apponotec.net register 1 } define contact { name generic-contact host_notification_period SUSA_UK_0024 service_notification_period SUSA_UK_0024 host_notification_options d,u,r,f,s service_notification_options w,u,c,r,f,s host_notification_commands notify-host-by-email service_notification_commands notify-service-by-email email supp...@itpassion.com register 0 } define host { name itp-linux-server check_command check-host-alive use generic-host max_check_attempts 10 check_interval 5 retry_interval 1 check_period SUSA_UK_0024 event_handler notify-host-by-email contacts adm_l contact_groups ITPSysAd notification_interval 15 notification_options d,u,r register 0 } define service { name generic-apponotec-service hostgroup_name ApponotecClientMachines service_description Service Running on a machine monitored for Apponotec display_name Apponotec Service Template is_volatile 0 max_check_attempts 3 check_interval 10 retry_interval 2 active_checks_enabled 1 passive_checks_enabled 1 check_period SUSA_UK_0720 parallelize_check 1 obsess_over_service 1 check_freshness 0 event_handler notify-service-by-email event_handler_enabled 1 flap_detection_enabled 1 process_perf_data 1 retain_status_information 1 retain_nonstatus_information 1 notification_interval 60 notification_period SUSA_UK_0720 notification_options w,u,c,r notifications_enabled 1 contacts apponotec contact_groups Apponotec failure_prediction_enabled 1 register 0 } define service { name generic-itp-service is_volatile 0 max_check_attempts 3 check_interval 10 retry_interval 2 active_checks_enabled 1 passive_checks_enabled 1 check_period SUSA_UK_0024 parallelize_check 1 obsess_over_service 1 check_freshness 0 event_handler notify-service-by-email event_handler_enabled 1 flap_detection_enabled 1 process_perf_data 1 retain_status_information 1 retain_nonstatus_information 1 notification_interval 60 notification_period SUSA_UK_0024 notification_options w,u,c,r notifications_enabled 1 contacts adm_l contact_groups ITPSysAd failure_prediction_enabled 1 register 0 } I cannot see a problem with the usage of the notification commands, really, as the email addresses all seem to be valid... Fixed in 1.8.1, you say? Maybe it's time to upgrade... I'll put that on the calendar anyhow, but it would be good to confirm that my case indeed is covered by the fix. Best regards, Guus ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_123012 _______________________________________________ icinga-users mailing list icinga-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/icinga-users