<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>monitoring Архиви - rosen4o.net</title>
	<atom:link href="https://rosen4o.net/tag/monitoring/feed/" rel="self" type="application/rss+xml" />
	<link>https://rosen4o.net/tag/monitoring/</link>
	<description></description>
	<lastBuildDate>Thu, 17 Dec 2009 11:32:07 +0000</lastBuildDate>
	<language>bg-BG</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>sms при липса на ping</title>
		<link>https://rosen4o.net/2009/12/18/sms-%d0%bf%d1%80%d0%b8-%d0%bb%d0%b8%d0%bf%d1%81%d0%b0-%d0%bd%d0%b0-ping/</link>
					<comments>https://rosen4o.net/2009/12/18/sms-%d0%bf%d1%80%d0%b8-%d0%bb%d0%b8%d0%bf%d1%81%d0%b0-%d0%bd%d0%b0-ping/#respond</comments>
		
		<dc:creator><![CDATA[rosen4o]]></dc:creator>
		<pubDate>Fri, 18 Dec 2009 11:29:19 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Без категория]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[ping sms]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[watch ping]]></category>
		<category><![CDATA[watchping]]></category>
		<guid isPermaLink="false">http://rosen4o.net/?p=665</guid>

					<description><![CDATA[<p>Един много полезен скрипт който следи дадени хостове или ip адреси и при отпдането им изпраща email. Благодарение на услугата mail2sms на mtel се модифицира до напомяне по телефона. #!/bin/bash # Simple SHELL script for Linux and UNIX system monitoring<span class="ellipsis">&#8230;</span></p>
<div class="read-more"><a href="https://rosen4o.net/2009/12/18/sms-%d0%bf%d1%80%d0%b8-%d0%bb%d0%b8%d0%bf%d1%81%d0%b0-%d0%bd%d0%b0-ping/">Прочетете повече ›</a></div>
<p><!-- end of .read-more --></p>
<p>Материалът <a href="https://rosen4o.net/2009/12/18/sms-%d0%bf%d1%80%d0%b8-%d0%bb%d0%b8%d0%bf%d1%81%d0%b0-%d0%bd%d0%b0-ping/">sms при липса на ping</a> е публикуван за пръв път на <a href="https://rosen4o.net">rosen4o.net</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Един много полезен скрипт който следи дадени хостове или ip адреси и при отпдането им изпраща email. Благодарение на услугата mail2sms на mtel се модифицира до напомяне по телефона.</p>
<blockquote>
<pre><span style="color: #808080; font-style: italic;">#!/bin/bash</span>
<span style="color: #808080; font-style: italic;"># Simple SHELL script <span style="color: #000000; font-weight: bold;">for</span> Linux and UNIX system monitoring with</span>
<span style="color: #808080; font-style: italic;"># <span style="color: #c20cb9; font-weight: bold;">ping</span> command</span>
<span style="color: #808080; font-style: italic;"># -------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;"># Copyright <span style="color: #7a0874; font-weight: bold;">(</span>c<span style="color: #7a0874; font-weight: bold;">)</span> <span style="color: #000000;">2006</span> nixCraft project &lt;http://www.cyberciti.biz/fb/&gt;</span>
<span style="color: #808080; font-style: italic;"># This script is licensed under GNU GPL version <span style="color: #000000;">2.0</span> or above</span>
<span style="color: #808080; font-style: italic;"># -------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;"># This script is part of nixCraft shell script collection <span style="color: #7a0874; font-weight: bold;">(</span>NSSC<span style="color: #7a0874; font-weight: bold;">)</span></span>
<span style="color: #808080; font-style: italic;"># Visit http://bash.cyberciti.biz/ <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">more</span> information.</span>
<span style="color: #808080; font-style: italic;"># -------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;"># Setup email ID below</span>
<span style="color: #808080; font-style: italic;"># See URL <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">more</span> info:</span>
<span style="color: #808080; font-style: italic;"># http://www.cyberciti.biz/tips/simple-linux-and-unix-system-monitoring-with-ping-command-and-scripts.html</span>
<span style="color: #808080; font-style: italic;"># -------------------------------------------------------------------------</span>

<span style="color: #808080; font-style: italic;"># add ip / <span style="color: #c20cb9; font-weight: bold;">hostname</span> separated by white space</span>
<span style="color: #007800;">HOSTS=</span><span style="color: #ff0000;">"dir.bg 192.168.0.1"</span>

<span style="color: #808080; font-style: italic;"># no <span style="color: #c20cb9; font-weight: bold;">ping</span> request</span>
<span style="color: #007800;">COUNT=</span><span style="color: #000000;">1</span>

<span style="color: #808080; font-style: italic;"># email report when</span>
<span style="color: #007800;">SUBJECT=</span><span style="color: #ff0000;">"HostDown"</span>
<span style="color: #007800;">EMAILID=</span><span style="color: #ff0000;">"359xxxxxxxxx@sms.mtel.net"</span>
<span style="color: #000000; font-weight: bold;">for</span> myHost <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$HOSTS</span>
<span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #007800;">count=</span>$<span style="color: #7a0874; font-weight: bold;">(</span><span style="color: #c20cb9; font-weight: bold;">ping</span> -c <span style="color: #007800;">$COUNT</span> <span style="color: #007800;">$myHost</span> | <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">'received'</span> | <span style="color: #c20cb9; font-weight: bold;">awk</span> -F<span style="color: #ff0000;">','</span> <span style="color: #ff0000;">'{ print $2 }'</span> | <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{ print $1 }'</span><span style="color: #7a0874; font-weight: bold;">)</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">[</span> <span style="color: #007800;">$count</span> -eq <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">]</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #808080; font-style: italic;"># <span style="color: #000000;">100</span>% failed</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">"Host : $myHost is down at $(date)"</span> | mail -s <span style="color: #ff0000;">"$SUBJECT"</span> <span style="color: #007800;">$EMAILID</span>
  <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">done</span></pre>
</blockquote>
<p>Материалът <a href="https://rosen4o.net/2009/12/18/sms-%d0%bf%d1%80%d0%b8-%d0%bb%d0%b8%d0%bf%d1%81%d0%b0-%d0%bd%d0%b0-ping/">sms при липса на ping</a> е публикуван за пръв път на <a href="https://rosen4o.net">rosen4o.net</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://rosen4o.net/2009/12/18/sms-%d0%bf%d1%80%d0%b8-%d0%bb%d0%b8%d0%bf%d1%81%d0%b0-%d0%bd%d0%b0-ping/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
