Re: [Nagios-users] Additional Info in email?
2009/4/1 Andrew Davis : > Perhaps I need to ask a clarification question... in my checkcommands.cfg, > should I change $SERVICEOUTPUT$ to $LONGSERVICEOUTPUT$ or should I add the > $LONGSERVICEOUTPUT$ macro to the notify-service-by-email command? I'm > thinking that some tests will write some data to $SERVICEOUTPUT$, but others > can include additional info with $LONGSERVICEOUTPUT$, so rather than change > $SERVICEOUTPUT$ to $LONGSERVICEOUTPUT$, I should add it? Perhaps something > like this: > > Before: > ~\n\nAdditional Info:\n\n$SERVICEOUTPUT$ > > After: > ~\n\nInfo:\n\n$SERVICEOUTPUT$\n\nAdditional Info:\n\n$LONGSERVICEOUTPUT$ > > A. Davis > Email: ncc...@gmail.com > So, one of the great things about Nagios, IMHO, is it's documentation. Check out: http://nagios.sourceforge.net/docs/3_0/macrolist.html#serviceoutput In particular: $SERVICEOUTPUT$ The first line of text output from the last service check (i.e. "Ping OK"). $LONGSERVICEOUTPUT$ The full text output (aside from the first line) from the last service check. -- ___ 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] Additional Info in email?
On Apr 1, 2009, at 9:13 AM, Andrew Davis wrote: > Perhaps I need to ask a clarification question... in my > checkcommands.cfg, should I change $SERVICEOUTPUT$ to > $LONGSERVICEOUTPUT$ or should I add the $LONGSERVICEOUTPUT$ macro to > the notify-service-by-email command? I'm thinking that some tests > will write some data to $SERVICEOUTPUT$, but others can include > additional info with $LONGSERVICEOUTPUT$, so rather than change > $SERVICEOUTPUT$ to $LONGSERVICEOUTPUT$, I should add it? Perhaps > something like this: > > Before: > ~\n\nAdditional Info:\n\n$SERVICEOUTPUT$ > > After: > ~\n\nInfo:\n\n$SERVICEOUTPUT$\n\nAdditional Info:\n\n > $LONGSERVICEOUTPUT$ The above is what you need. For clarification -- http://nagios.sourceforge.net/docs/3_0/whatsnew.html # Plugin Output: * Multiline plugin output is now supported for host and service checks. Hooray! The plugin API has been updated to support multiple lines of output in a manner that retains backward compatability with older plugins. Additional lines of output (aside from the first line) are now stored in new $LONGHOSTOUTPUT$ and $LONGSERVICEOUTPUT$ macros. -- Marc -- ___ 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] Additional Info in email?
Perhaps I need to ask a clarification question... in my checkcommands.cfg, should I change $SERVICEOUTPUT$ to $LONGSERVICEOUTPUT$ or should I add the $LONGSERVICEOUTPUT$ macro to the notify-service-by-email command? I'm thinking that some tests will write some data to $SERVICEOUTPUT$, but others can include additional info with $LONGSERVICEOUTPUT$, so rather than change $SERVICEOUTPUT$ to $LONGSERVICEOUTPUT$, I should add it? Perhaps something like this: Before: ~\n\nAdditional Info:\n\n$SERVICEOUTPUT$ After: ~\n\nInfo:\n\n$SERVICEOUTPUT$\n\nAdditional Info:\n\n$LONGSERVICEOUTPUT$ A. Davis Email: ncc...@gmail.com "There is no limit to what a man can accomplish if he doesn't care who gets the credit." - Ronald Reagan Marc Powell wrote: On Mar 31, 2009, at 4:19 PM, Andrew Davis wrote: This seems to have worked for the WARNING or CRITICAL notifications, but not for recovery emails. If I grep for "Additional Info" in my checkcommands.cfg, it only matches for the "notify-service-by-email" command definition, yet in recovery emails, I still see the "Additional Info" line at the bottom, but no content. Any ideas on how I would get the $LONGSERVICEOUPUT$ in a recovery email as well. It should just work. I'm not aware of, nor can I find any difference in the code for handling macros differently based on the notification type. Maybe I'm overlooking it but I haven't heard of the problem before... -- Marc -- ___ 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 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] Additional Info in email?
On Mar 31, 2009, at 4:19 PM, Andrew Davis wrote: > This seems to have worked for the WARNING or CRITICAL notifications, > but not for recovery emails. If I grep for "Additional Info" in my > checkcommands.cfg, it only matches for the "notify-service-by-email" > command definition, yet in recovery emails, I still see the > "Additional Info" line at the bottom, but no content. Any ideas on > how I would get the $LONGSERVICEOUPUT$ in a recovery email as well. It should just work. I'm not aware of, nor can I find any difference in the code for handling macros differently based on the notification type. Maybe I'm overlooking it but I haven't heard of the problem before... -- Marc -- ___ 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] Additional Info in email?
This seems to have worked for the WARNING or CRITICAL notifications, but not for recovery emails. If I grep for "Additional Info" in my checkcommands.cfg, it only matches for the "notify-service-by-email" command definition, yet in recovery emails, I still see the "Additional Info" line at the bottom, but no content. Any ideas on how I would get the $LONGSERVICEOUPUT$ in a recovery email as well? A. Davis Email: ncc...@gmail.com "There is no limit to what a man can accomplish if he doesn't care who gets the credit." - Ronald Reagan Marc Powell wrote: On Mar 31, 2009, at 12:52 PM, Andrew Davis wrote: Additional Info: PROCS WARNING What I need is to see which processes are down in the "Additional Info:" field when its emailed. Anyone know how I would go about this? Unfortunately, I'm not a perl guy... I've included the script below... I suspect you need to add the $LONGSERVICEOUTPUT$ macro after the $SERVICEOUTPUT$ macro in your notification command -- http://nagios.sourceforge.net/docs/3_0/macrolist.html#serviceoutput -- Marc -- ___ 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 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] Additional Info in email?
Worked perfectly, thanks! Only now I have to update the BUFFER lines in NRPE's include/common.h and recompile it for the clients... A. Davis Email: ncc...@gmail.com "There is no limit to what a man can accomplish if he doesn't care who gets the credit." - Ronald Reagan Marc Powell wrote: On Mar 31, 2009, at 12:52 PM, Andrew Davis wrote: Additional Info: PROCS WARNING What I need is to see which processes are down in the "Additional Info:" field when its emailed. Anyone know how I would go about this? Unfortunately, I'm not a perl guy... I've included the script below... I suspect you need to add the $LONGSERVICEOUTPUT$ macro after the $SERVICEOUTPUT$ macro in your notification command -- http://nagios.sourceforge.net/docs/3_0/macrolist.html#serviceoutput -- Marc -- ___ 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 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] Additional Info in email?
On Mar 31, 2009, at 12:52 PM, Andrew Davis wrote: > Additional Info: > > PROCS WARNING > > What I need is to see which processes are down in the "Additional > Info:" field when its emailed. Anyone know how I would go about > this? Unfortunately, I'm not a perl guy... I've included the script > below... I suspect you need to add the $LONGSERVICEOUTPUT$ macro after the $SERVICEOUTPUT$ macro in your notification command -- http://nagios.sourceforge.net/docs/3_0/macrolist.html#serviceoutput -- Marc -- ___ 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] Additional Info in email notification
On 2/10/06, Toto Capuccino <[EMAIL PROTECTED]> wrote: > no i mean i never say you did say it didnt > CORE DUMP --Parse error on line #2 :-P -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety'' Benjamin Franklin 1775 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 ___ 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] Additional Info in email notification
i never say you didnt 2006/2/10, Deborah Martin <[EMAIL PROTECTED]>: i never said it didn't! -Original Message-From: Toto Capuccino [mailto:[EMAIL PROTECTED]]Sent: 10 February 2006 15:09To: Deborah MartinCc: [EMAIL PROTECTED]; nagios-users@lists.sourceforge.netSubject: Re: [Nagios-users] Additional Info in email notification$OUTPUT$ works for nagios 1.3 actually. 2006/2/10, Deborah Martin <[EMAIL PROTECTED]>: try the following : essentially instead of using $OUTPUT$, replace with$SERVICEOUTPUT$This works fine for me.define command{command_namenotify-by-emailcommand_line/usr/bin/printf "%b" "* Nagios *\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditionalInfo:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$}regards,deborah-Original Message-From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]]Sent: 10 February 2006 14:43To: nagios-users@lists.sourceforge.netSubject: [Nagios-users] Additional Info in email notificationI have already tried this but I don't to receive Additional Info.What can I do now?Ths>Hi,>try to put something like this in your miscommands.cfg file that should>contact the email notification command : >define command{>command_namehost-notify-by-email>command_line/usr/bin/printf "%b" "* Nagios>*\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: >$HOSTSTATE$\nAddress: $HOSTADDRESS$\nAdditional Info:$OUTPUT$\n\nDate/Time:>$DATETIME$\n" | /usr/bin/sendmail "Host $HOSTSTATE$ alert for $HOSTNAME$!">$CONTACTEMAIL$>} >>10 Feb 2006 10:44:26 -, [EMAIL PROTECTED] < [EMAIL PROTECTED]>: > Sei stanco di girare a vuoto?Con il nuovo motore di ricerca Interfree trovi di tutto.Vieni a trovarci: http://search.interfree.it/Lo Staff di Interfree ---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___Nagios-users mailing listNagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users::: Please include Nagios version, plugin version (-v) and OS when reportingany issue.::: Messages without supporting info will risk being sent to /dev/null This email and any files transmitted with it are confidential andintended solely for the use of the individual or entity to whom they are addressed. Any unauthorised distribution or copying is strictlyprohibited.Whilst Kognitio Limited takes steps to prevent the transmission ofviruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are stronglyadvised to undertake your own anti-virus precautions.Kognitio grants no warranties regarding performance,use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.***---This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makessearching your log files as easy as surfing the web. DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___Nagios-users mailing listNagios-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-- Le bon sens est la chose du monde la mieux partagée. -- Le bon sens est la chose du monde la mieux partagée.
Re: [Nagios-users] Additional Info in email notification
no i mean i never say you did say it didntoh nevermind2006/2/10, Toto Capuccino <[EMAIL PROTECTED]>: i never say you didnt 2006/2/10, Deborah Martin < [EMAIL PROTECTED]>: i never said it didn't! -Original Message-From: Toto Capuccino [mailto:[EMAIL PROTECTED]]Sent: 10 February 2006 15:09To: Deborah MartinCc: [EMAIL PROTECTED]; nagios-users@lists.sourceforge.netSubject: Re: [Nagios-users] Additional Info in email notification$OUTPUT$ works for nagios 1.3 actually. 2006/2/10, Deborah Martin <[EMAIL PROTECTED]>: try the following : essentially instead of using $OUTPUT$, replace with$SERVICEOUTPUT$This works fine for me.define command{command_namenotify-by-emailcommand_line/usr/bin/printf "%b" "* Nagios *\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditionalInfo:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$}regards,deborah-Original Message-From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]]Sent: 10 February 2006 14:43To: nagios-users@lists.sourceforge.netSubject: [Nagios-users] Additional Info in email notificationI have already tried this but I don't to receive Additional Info.What can I do now?Ths>Hi,>try to put something like this in your miscommands.cfg file that should>contact the email notification command : >define command{>command_namehost-notify-by-email>command_line/usr/bin/printf "%b" "* Nagios>*\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: >$HOSTSTATE$\nAddress: $HOSTADDRESS$\nAdditional Info:$OUTPUT$\n\nDate/Time:>$DATETIME$\n" | /usr/bin/sendmail "Host $HOSTSTATE$ alert for $HOSTNAME$!">$CONTACTEMAIL$>} >>10 Feb 2006 10:44:26 -, [EMAIL PROTECTED] < [EMAIL PROTECTED]>: > Sei stanco di girare a vuoto?Con il nuovo motore di ricerca Interfree trovi di tutto.Vieni a trovarci: http://search.interfree.it/Lo Staff di Interfree ---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___Nagios-users mailing listNagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users::: Please include Nagios version, plugin version (-v) and OS when reportingany issue.::: Messages without supporting info will risk being sent to /dev/null This email and any files transmitted with it are confidential andintended solely for the use of the individual or entity to whom they are addressed. Any unauthorised distribution or copying is strictlyprohibited.Whilst Kognitio Limited takes steps to prevent the transmission ofviruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are stronglyadvised to undertake your own anti-virus precautions.Kognitio grants no warranties regarding performance,use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.***---This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makessearching your log files as easy as surfing the web. DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___Nagios-users mailing listNagios-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-- Le bon sens est la chose du monde la mieux partagée. -- Le bon sens est la chose du monde la mieux partagée. -- Le bon sens est la chose du monde la mieux partagée.
RE: [Nagios-users] Additional Info in email notification
i never said it didn't! -Original Message-From: Toto Capuccino [mailto:[EMAIL PROTECTED]Sent: 10 February 2006 15:09To: Deborah MartinCc: [EMAIL PROTECTED]; nagios-users@lists.sourceforge.netSubject: Re: [Nagios-users] Additional Info in email notification$OUTPUT$ works for nagios 1.3 actually. 2006/2/10, Deborah Martin <[EMAIL PROTECTED]>: try the following : essentially instead of using $OUTPUT$, replace with$SERVICEOUTPUT$This works fine for me.define command{command_namenotify-by-emailcommand_line/usr/bin/printf "%b" "* Nagios *\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditionalInfo:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$}regards,deborah-Original Message-From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]]Sent: 10 February 2006 14:43To: nagios-users@lists.sourceforge.netSubject: [Nagios-users] Additional Info in email notificationI have already tried this but I don't to receive Additional Info.What can I do now?Ths>Hi,>try to put something like this in your miscommands.cfg file that should>contact the email notification command : >define command{>command_namehost-notify-by-email>command_line/usr/bin/printf "%b" "* Nagios>*\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: >$HOSTSTATE$\nAddress: $HOSTADDRESS$\nAdditional Info:$OUTPUT$\n\nDate/Time:>$DATETIME$\n" | /usr/bin/sendmail "Host $HOSTSTATE$ alert for $HOSTNAME$!">$CONTACTEMAIL$>} >>10 Feb 2006 10:44:26 -, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Sei stanco di girare a vuoto?Con il nuovo motore di ricerca Interfree trovi di tutto.Vieni a trovarci: http://search.interfree.it/Lo Staff di Interfree ---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___Nagios-users mailing listNagios-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/nagios-users::: Please include Nagios version, plugin version (-v) and OS when reportingany issue.::: Messages without supporting info will risk being sent to /dev/null This email and any files transmitted with it are confidential andintended solely for the use of the individual or entity to whom they are addressed. Any unauthorised distribution or copying is strictlyprohibited.Whilst Kognitio Limited takes steps to prevent the transmission ofviruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are stronglyadvised to undertake your own anti-virus precautions.Kognitio grants no warranties regarding performance,use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.***---This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makessearching your log files as easy as surfing the web. DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642___Nagios-users mailing listNagios-users@lists.sourceforge.nethttps://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-- Le bon sens est la chose du monde la mieux partagée.
Re: [Nagios-users] Additional Info in email notification
$OUTPUT$ works for nagios 1.3 actually.2006/2/10, Deborah Martin <[EMAIL PROTECTED]>: try the following : essentially instead of using $OUTPUT$, replace with$SERVICEOUTPUT$This works fine for me.define command{command_namenotify-by-emailcommand_line/usr/bin/printf "%b" "* Nagios *\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditionalInfo:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$}regards,deborah-Original Message-From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]]Sent: 10 February 2006 14:43To: nagios-users@lists.sourceforge.netSubject: [Nagios-users] Additional Info in email notification I have already tried this but I don't to receive Additional Info.What can I do now?Ths>Hi,>try to put something like this in your miscommands.cfg file that should>contact the email notification command : >define command{>command_namehost-notify-by-email>command_line/usr/bin/printf "%b" "* Nagios>*\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: >$HOSTSTATE$\nAddress: $HOSTADDRESS$\nAdditional Info:$OUTPUT$\n\nDate/Time:>$DATETIME$\n" | /usr/bin/sendmail "Host $HOSTSTATE$ alert for $HOSTNAME$!">$CONTACTEMAIL$>} >>10 Feb 2006 10:44:26 -, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Sei stanco di girare a vuoto?Con il nuovo motore di ricerca Interfree trovi di tutto.Vieni a trovarci: http://search.interfree.it/Lo Staff di Interfree ---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___Nagios-users mailing listNagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users::: Please include Nagios version, plugin version (-v) and OS when reportingany issue.::: Messages without supporting info will risk being sent to /dev/null This email and any files transmitted with it are confidential andintended solely for the use of the individual or entity to whom they are addressed. Any unauthorised distribution or copying is strictlyprohibited.Whilst Kognitio Limited takes steps to prevent the transmission ofviruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are stronglyadvised to undertake your own anti-virus precautions.Kognitio grants no warranties regarding performance,use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.***---This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makessearching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642___Nagios-users mailing list Nagios-users@lists.sourceforge.nethttps://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-- Le bon sens est la chose du monde la mieux partagée.
RE: [Nagios-users] Additional Info in email notification
try the following : essentially instead of using $OUTPUT$, replace with $SERVICEOUTPUT$ This works fine for me. define command{ command_namenotify-by-email command_line/usr/bin/printf "%b" "* Nagios *\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ } regards, deborah -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 10 February 2006 14:43 To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] Additional Info in email notification I have already tried this but I don't to receive Additional Info. What can I do now? Ths >Hi, >try to put something like this in your miscommands.cfg file that should >contact the email notification command : >define command{ >command_namehost-notify-by-email >command_line/usr/bin/printf "%b" "* Nagios >*\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: >$HOSTSTATE$\nAddress: $HOSTADDRESS$\nAdditional Info: $OUTPUT$\n\nDate/Time: >$DATETIME$\n" | /usr/bin/sendmail "Host $HOSTSTATE$ alert for $HOSTNAME$!" >$CONTACTEMAIL$ >} > >10 Feb 2006 10:44:26 -, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Sei stanco di girare a vuoto? Con il nuovo motore di ricerca Interfree trovi di tutto. Vieni a trovarci: http://search.interfree.it/ Lo Staff di Interfree --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ 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 This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorised distribution or copying is strictly prohibited. Whilst Kognitio Limited takes steps to prevent the transmission of viruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Kognitio grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused. *** --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ 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] Additional Info in email notification
[EMAIL PROTECTED] wrote: I have already tried this but I don't to receive Additional Info. Hi, try to put something like this in your miscommands.cfg file that should contact the email notification command : define command{ command_namehost-notify-by-email command_line/usr/bin/printf "%b" "* Nagios *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nAdditional Info: $OUTPUT$\n\nDate/Time: $DATETIME$\n" | /usr/bin/sendmail "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$ } 10 Feb 2006 10:44:26 -, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > What can I do now? You don't have access to the $OUTPUT$ variable in the host notification (I don't even know if it actually exists). You should use $HOSTOUTPUT$ instead (and $SERVICEOUTPUT$ for your service-notify-by-email command) See http://nagios.sourceforge.net/docs/2_0/macros.html -- Thibault GENESSAY ALIADIS www.aliadis.fr Tel. 0870 723 724 Fax 04 72 13 90 40 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ 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] Additional Info in email notification
Hi,try to put something like this in your miscommands.cfg file that should contact the email notification command :define command{ command_name host-notify-by-email command_line /usr/bin/printf "%b" "* Nagios *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\n Additional Info: $OUTPUT$\n\nDate/Time: $DATETIME$\n" | /usr/bin/sendmail "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$ } 10 Feb 2006 10:44:26 -, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: Hi, thereI would to include additional info into email notification!What can I do?This is the email that nagios sends me. Nagios *Notification Type: PROBLEMService: PingHost: myhostAddress: IPState: CRITICALDate/Time: Fri Feb 10 11:14:20 CET 2006Additional Info:$ ThsSei stanco di girare a vuoto?Con il nuovo motore di ricerca Interfree trovi di tutto.Vieni a trovarci: http://search.interfree.it/Lo Staff di Interfree---This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makessearching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642___Nagios-users mailing list Nagios-users@lists.sourceforge.nethttps://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-- Le bon sens est la chose du monde la mieux partagée.