<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;D0AGQn86fip7ImA9WhRRFE4.&quot;"><id>tag:blogger.com,1999:blog-7502941529167534141</id><updated>2011-11-28T00:15:23.116+01:00</updated><category term="smtp authentication" /><category term="missing" /><category term="linux" /><category term="nagios" /><category term="sendemail" /><category term="statusmap.cgi" /><category term="smtp" /><category term="notification" /><title>Daniel's Blog</title><subtitle type="html">Hints, tips and opinions technology related</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://danxlog.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://danxlog.blogspot.com/" /><author><name>Daniele Cuocci</name><uri>http://www.blogger.com/profile/16225887641030106351</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_p-sX-aOR34k/TD8SlOmHfbI/AAAAAAAAAA0/QumrfUABSSc/S220/22ff826.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/iqzsU" /><feedburner:info uri="blogspot/iqzsu" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DU4CRHo-fip7ImA9WhdbE04.&quot;"><id>tag:blogger.com,1999:blog-7502941529167534141.post-3408470478382054214</id><published>2011-10-11T14:57:00.001+02:00</published><updated>2011-10-11T14:59:25.456+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-11T14:59:25.456+02:00</app:edited><title>Tips that matters: Install nano on Suse Linux</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.icewalkers.com/scr/n852/nano.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="127" src="http://www.icewalkers.com/scr/n852/nano.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style="font-size: small;"&gt;For those who have a bad relationship with vi, emacs and related, here is a quick tip to install nano on SLES in few seconds.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&amp;nbsp;

&lt;/span&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;span lang="EN-US"&gt;wget &lt;/span&gt;&lt;a href="http://www.nano-editor.org/dist/v2.2/RPMS/nano-2.2.6-1.x86_64.rpm"&gt;&lt;span lang="EN-US"&gt;http://www.nano-editor.org/dist/v2.2/RPMS/nano-2.2.6-1.x86_64.rpm&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;

&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;rpmi –i nano-2.2.6-1.x86_64.rpm&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;That's all. Tips that matters, really.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7502941529167534141-3408470478382054214?l=danxlog.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GgjyyQcbDr2aInlZjv3JuPl9C1c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GgjyyQcbDr2aInlZjv3JuPl9C1c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GgjyyQcbDr2aInlZjv3JuPl9C1c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GgjyyQcbDr2aInlZjv3JuPl9C1c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/iqzsU/~4/h2eI-fKajuE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://danxlog.blogspot.com/feeds/3408470478382054214/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://danxlog.blogspot.com/2011/10/tips-that-matters-install-nano-on-suse.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7502941529167534141/posts/default/3408470478382054214?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7502941529167534141/posts/default/3408470478382054214?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/iqzsU/~3/h2eI-fKajuE/tips-that-matters-install-nano-on-suse.html" title="Tips that matters: Install nano on Suse Linux" /><author><name>Daniele Cuocci</name><uri>http://www.blogger.com/profile/16225887641030106351</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_p-sX-aOR34k/TD8SlOmHfbI/AAAAAAAAAA0/QumrfUABSSc/S220/22ff826.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://danxlog.blogspot.com/2011/10/tips-that-matters-install-nano-on-suse.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8NQ3c4cCp7ImA9Wx9VF0k.&quot;"><id>tag:blogger.com,1999:blog-7502941529167534141.post-4686939028634240103</id><published>2011-02-03T15:18:00.003+01:00</published><updated>2011-02-03T15:38:12.938+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-03T15:38:12.938+01:00</app:edited><title>Check_ping Vs Check_Icmp over VPNs</title><content type="html">Sometimes happens that your host is down and check_ping doesn't generate an alert notification, but why?&lt;br /&gt;&lt;br /&gt;Many of you may know that check_ping is just a nagios wrapper to the ping command while check_icmp makes the control itself, but this is not the only difference.&lt;br /&gt;This kind of issue usually happens when involves host monitoring over vpn's.&lt;br /&gt;&lt;br /&gt;If an host is down over a vpn the result for a missing icmp echo will be "ping timeout" instead of the usual "host unreachable" if that host was in the same network.&lt;br /&gt;For this reason, Nagios will interpret the timeout as a soft error and will not generate the notification.&lt;br /&gt;&lt;br /&gt;Instead, using the check_icmp will generate a hard error and so the notification will occur.&lt;br /&gt;&lt;br /&gt;I strongly advertise to use check_ping on local networks monitoring only, while check_icmp if you monitor hosts over vpns.&lt;br /&gt;&lt;br /&gt;To replace the command, just open command.cfg and at the section check-host-alive, just replace check_ping with check_icmp.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7502941529167534141-4686939028634240103?l=danxlog.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DuWY5b7EjwNc355e65NLexpj-Dk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DuWY5b7EjwNc355e65NLexpj-Dk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DuWY5b7EjwNc355e65NLexpj-Dk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DuWY5b7EjwNc355e65NLexpj-Dk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/iqzsU/~4/w-48-4t2Ve4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://danxlog.blogspot.com/feeds/4686939028634240103/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://danxlog.blogspot.com/2011/02/checkping-vs-checkicmp-over-vpns.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7502941529167534141/posts/default/4686939028634240103?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7502941529167534141/posts/default/4686939028634240103?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/iqzsU/~3/w-48-4t2Ve4/checkping-vs-checkicmp-over-vpns.html" title="Check_ping Vs Check_Icmp over VPNs" /><author><name>Daniele Cuocci</name><uri>http://www.blogger.com/profile/16225887641030106351</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_p-sX-aOR34k/TD8SlOmHfbI/AAAAAAAAAA0/QumrfUABSSc/S220/22ff826.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://danxlog.blogspot.com/2011/02/checkping-vs-checkicmp-over-vpns.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUGSHs9fip7ImA9WhZUE0k.&quot;"><id>tag:blogger.com,1999:blog-7502941529167534141.post-4767220473443975008</id><published>2010-07-15T13:03:00.022+02:00</published><updated>2011-06-06T09:43:49.566+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-06T09:43:49.566+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="notification" /><category scheme="http://www.blogger.com/atom/ns#" term="smtp" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="sendemail" /><category scheme="http://www.blogger.com/atom/ns#" term="smtp authentication" /><category scheme="http://www.blogger.com/atom/ns#" term="nagios" /><title>Nagios - Use an external smtp server to send notifications</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_p-sX-aOR34k/TD8PekVi5SI/AAAAAAAAAAo/dFxHhcoF6EU/s1600/nagios_screenshot.gif"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 320px; height: 254px;" src="http://2.bp.blogspot.com/_p-sX-aOR34k/TD8PekVi5SI/AAAAAAAAAAo/dFxHhcoF6EU/s320/nagios_screenshot.gif" alt="" id="BLOGGER_PHOTO_ID_5494127088239830306" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;One of the most important feature of Nagios is the notification system; by default Nagios will use the local mail daemon (mail) to send all the notifications.&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;Maybe this kind of system was working fine in past, but today, with this huge amount of spam circulating all over the world, this kind of emails from a not verified source can be filtered by the same company antispam system.&lt;br /&gt;In order to avoid this issue I will explain how to configure Nagios using an external smtp server also with smtp authentication.&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;font-size:100%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;Since the Nagios notification event is still a triggered command, we have to download an alternative command line email client.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I suggest the powerful "sendemail" command, available at the following link:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;font-size:100%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://caspian.dotconf.net/menu/Software/SendEmail/"&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;http://caspian.dotconf.net/menu/Software/SendEmail/&lt;/span&gt;&lt;/a&gt; &lt;span style=";font-family:arial;font-size:100%;"  &gt;&lt;br /&gt;&lt;br /&gt;Once the download is finished unpack sendemail:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[root@localhost] tar -xvf sendEmail-v1.56.tar.gz&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then copy the binary in the bin folder&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[root@localhost] cp /root/sendEmail-v1.56/sendEmail /usr/local/bin/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In order to troubleshoot any eventual problem, please use the following workaround to create and give the necessary authorization to write in the sendemail log file:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[root@localhost] touch /var/log/sendEmail&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;[root@localhost] chmod 666 /var/log/sendEmail&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(remember, by default, Nagios does not start with full administrative rights, so command sent by Nagios too)&lt;br /&gt;Now we need to set some variables that we need to recall later depending on your particular environment and smtp configuration:&lt;br /&gt;&lt;br /&gt;So edit the resource.cfg file located in:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;/usr/local/nagios/etc/resource.cfg&lt;/span&gt;&lt;br /&gt;Add the following lines with your particular smtp configuration:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$USER5$=email@address.tld&lt;your notification="" email=""&gt;&lt;/your&gt;&lt;/span&gt;&lt;your nagios="" send="" email="" address=""&gt; &lt;/your&gt;&lt;/span&gt;&lt;address&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;$USER7$=smtp.server.tld&lt;smtp&gt;&lt;your provider="" smtp="" server=""&gt;&lt;/your&gt;&lt;/smtp&gt;&lt;/span&gt;&lt;smtp server=""&gt;&lt;br /&gt;#If you don't use smtp authentication skip this variables and use the version B) of commands.cfg&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$USER9$=&lt;auth smtp="" username=""&gt;&lt;/auth&gt;&lt;/span&gt;&lt;smtp user="" login=""&gt;&lt;span style="font-family:courier new;"&gt;authsmtpusername&lt;br /&gt;$USER10$=authsmtpassword&lt;auth&gt;&lt;your smtp="" password=""&gt;&lt;/your&gt;&lt;/auth&gt;&lt;/span&gt;&lt;smtp user="" password=""&gt;&lt;br /&gt;&lt;br /&gt;Save and exit &lt;span style="font-style: italic;"&gt;(&amp;lt;- This commands change depending from your editor, sadly I've been in too many disputes aboute which linux editor is better, so don't expect any advice from me)  &lt;/span&gt;&lt;span style="font-style: italic;"&gt;  &lt;/span&gt;After this, we are gonna change the commands.cfg file located in:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;/usr/local/nagios/etc/objects/commands.cfg  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First perform a backup of the config file:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;cd /usr/local/nagios/etc/objects/&lt;br /&gt;cp commands.cfg commands.cfg.old &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Edito the commands.cfg file and you will find two commands:&lt;br /&gt;'notify-host-by-email' and 'notify-service-by-email'&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A) SMTP AUTHENTICATION COMMANDS &lt;/span&gt;&lt;br /&gt;Now, if you use SMTP authentication replace the two commands with the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# 'notify-host-by-email' command definition&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;define command{&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;    command_name    notify-host-by-email&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;    command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/local/bin/sendEmail -s $USER7$ -xu $USER9$ -xp $USER10$ -t $CONTACTEMAIL$ -f $USER5$ -l /var/log/sendEmail -u "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" -m "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n"&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# 'notify-service-by-email' command definition&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;define command{&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;    command_name    notify-service-by-email&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;    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/local/bin/sendEmail -s $USER7$  -xu $USER9$ -xp $USER10$ -t $CONTACTEMAIL$ -f $USER5$ -l /var/log/sendEmail -u "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" -m "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$"&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;B) NO SMTP-AUTHENTICATION &lt;/span&gt;&lt;br /&gt;This is pretty much the same but without passing the authentication triggers to sendemail:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# 'notify-host-by-email' command definition&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;define command{&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;    command_name    notify-host-by-email&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;    command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/local/bin/sendEmail -s $USER7$ -t $CONTACTEMAIL$ -f $USER5$ -l /var/log/sendEmail -u "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" -m "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n"&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# 'notify-service-by-email' command definition&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;define command{&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;    command_name    notify-service-by-email&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;    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/local/bin/sendEmail -s $USER7$ -t $CONTACTEMAIL$ -f $USER5$ -l /var/log/sendEmail -u "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" -m "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$"&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now the configuration is finished. Anyway, before applying the new configuration, run the following command to check for any error or mistake:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If there are no errors, restart the nagios service:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;service nagios restart &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To troubleshoot the sendemail command run the following to check in the log file:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;tail -f /var/log/sendEmail  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hope this post will be useful to you. If you have any troube or you want to suggest me a better system do not hesitate to write a line.&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Daniel&lt;/smtp&gt;&lt;/smtp&gt;&lt;/smtp&gt;&lt;/span&gt;&lt;/address&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7502941529167534141-4767220473443975008?l=danxlog.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pTQrDaoN41GeBSWEiArtfAlqgp8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pTQrDaoN41GeBSWEiArtfAlqgp8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pTQrDaoN41GeBSWEiArtfAlqgp8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pTQrDaoN41GeBSWEiArtfAlqgp8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/iqzsU/~4/xG2X5ZxMmeo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://danxlog.blogspot.com/feeds/4767220473443975008/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://danxlog.blogspot.com/2010/07/nagios-use-external-smtp-server-to-send.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7502941529167534141/posts/default/4767220473443975008?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7502941529167534141/posts/default/4767220473443975008?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/iqzsU/~3/xG2X5ZxMmeo/nagios-use-external-smtp-server-to-send.html" title="Nagios - Use an external smtp server to send notifications" /><author><name>Daniele Cuocci</name><uri>http://www.blogger.com/profile/16225887641030106351</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_p-sX-aOR34k/TD8SlOmHfbI/AAAAAAAAAA0/QumrfUABSSc/S220/22ff826.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_p-sX-aOR34k/TD8PekVi5SI/AAAAAAAAAAo/dFxHhcoF6EU/s72-c/nagios_screenshot.gif" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://danxlog.blogspot.com/2010/07/nagios-use-external-smtp-server-to-send.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcERXo_eyp7ImA9WxFaEEQ.&quot;"><id>tag:blogger.com,1999:blog-7502941529167534141.post-3359821723995547836</id><published>2010-07-14T09:05:00.000+02:00</published><updated>2010-07-14T09:36:44.443+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-14T09:36:44.443+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statusmap.cgi" /><category scheme="http://www.blogger.com/atom/ns#" term="missing" /><category scheme="http://www.blogger.com/atom/ns#" term="nagios" /><title>Nagios - Missing statusmap.cgi</title><content type="html">&lt;span style="font-family:arial;"&gt;The Nagios installation can go really smoothly but sometimes statusmap.cgi is not compiled and the error doesn't really come up during the make. And that's why we'll found out only when the system is up and running but this nice little feauture is missing getting to this error:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold; font-family: times new roman;"&gt;Not Found&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-family: times new roman;"&gt;The  requested URL /nagios/cgi-bin/statusmap.cgi was not found on this server&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;This is often caused by the missing gd libraries, so if you experience this error be sure to perform the following commands (tested on Centos, should work for Redhat as well):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;[root@localhost]#&lt;/span&gt;&lt;strong style="padding: 0px; margin: 0px; font-family: courier new;"&gt; &lt;/strong&gt;&lt;span style="font-family:courier new;"&gt;yum  install gd&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;[root@localhost]#&lt;/span&gt;&lt;strong style="padding: 0px; margin: 0px; font-family: courier new;"&gt; &lt;/strong&gt;&lt;span style="font-family:courier new;"&gt;yum install gd-devel&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;Then go in your nagios source folder and lauch the following:&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;br /&gt;[root@localhost]# ./configure&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;[root@localhost]# make&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;[root@localhost]# make-cgis&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;[root@localhost]# make install-cgis&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;This should fix very well this kind of problem. If you still experience problems with your nagios application please refer the following guide (imho one of the best around):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="font-family: arial;" href="http://www.thegeekstuff.com/2008/05/nagios-30-jumpstart-guide-for-red-hat-overview-installation-and-configuration/"&gt;http://www.thegeekstuff.com/2008/05/nagios-30-jumpstart-guide-for-red-hat-overview-installation-and-configuration/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7502941529167534141-3359821723995547836?l=danxlog.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/--TvkyGW_gHXAzJcJRlB-A2HEyA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/--TvkyGW_gHXAzJcJRlB-A2HEyA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/--TvkyGW_gHXAzJcJRlB-A2HEyA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/--TvkyGW_gHXAzJcJRlB-A2HEyA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/iqzsU/~4/Mcvpk4tpEvE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://danxlog.blogspot.com/feeds/3359821723995547836/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://danxlog.blogspot.com/2010/07/nagios-missing-statusmapcgi.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7502941529167534141/posts/default/3359821723995547836?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7502941529167534141/posts/default/3359821723995547836?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/iqzsU/~3/Mcvpk4tpEvE/nagios-missing-statusmapcgi.html" title="Nagios - Missing statusmap.cgi" /><author><name>Daniele Cuocci</name><uri>http://www.blogger.com/profile/16225887641030106351</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_p-sX-aOR34k/TD8SlOmHfbI/AAAAAAAAAA0/QumrfUABSSc/S220/22ff826.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://danxlog.blogspot.com/2010/07/nagios-missing-statusmapcgi.html</feedburner:origLink></entry></feed>

