<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="lt">
	<id>https://wiki.eofnet.lt/w//index.php?action=history&amp;feed=atom&amp;title=Munin_plugin_ping</id>
	<title>Munin plugin ping - Versijų istorija</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.eofnet.lt/w//index.php?action=history&amp;feed=atom&amp;title=Munin_plugin_ping"/>
	<link rel="alternate" type="text/html" href="https://wiki.eofnet.lt/w//index.php?title=Munin_plugin_ping&amp;action=history"/>
	<updated>2026-04-19T10:43:35Z</updated>
	<subtitle>Šio puslapio versijų istorija projekte</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.eofnet.lt/w//index.php?title=Munin_plugin_ping&amp;diff=9081&amp;oldid=prev</id>
		<title>\dev\null: Naujas puslapis: munin pluginas skirtas monitorinti keleta hostų (ICMP ping).  250px  Konfigūracija '''/etc/munin/plugin-conf.d/ping_''...</title>
		<link rel="alternate" type="text/html" href="https://wiki.eofnet.lt/w//index.php?title=Munin_plugin_ping&amp;diff=9081&amp;oldid=prev"/>
		<updated>2020-03-10T10:16:38Z</updated>

		<summary type="html">&lt;p&gt;Naujas puslapis: &lt;a href=&quot;/w//index.php?title=Munin&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Munin (puslapis neegzistuoja)&quot;&gt;munin&lt;/a&gt; pluginas skirtas monitorinti keleta hostų (&lt;a href=&quot;/wiki/ICMP&quot; title=&quot;ICMP&quot;&gt;ICMP&lt;/a&gt; ping).  &lt;a href=&quot;/wiki/Vaizdas:Screenshot_2020-03-10_at_12.10.44.png&quot; title=&quot;Vaizdas:Screenshot 2020-03-10 at 12.10.44.png&quot;&gt;250px&lt;/a&gt;  Konfigūracija &amp;#039;&amp;#039;&amp;#039;/etc/munin/plugin-conf.d/ping_&amp;#039;&amp;#039;...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Naujas puslapis&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[munin]] pluginas skirtas monitorinti keleta hostų ([[ICMP]] ping).&lt;br /&gt;
&lt;br /&gt;
[[Vaizdas:Screenshot 2020-03-10 at 12.10.44.png|250px]]&lt;br /&gt;
&lt;br /&gt;
Konfigūracija '''/etc/munin/plugin-conf.d/ping_''' &lt;br /&gt;
 [ping_]&lt;br /&gt;
 env.host www.google.com 192.168.1.1 ir t.t.&lt;br /&gt;
&lt;br /&gt;
Scriptas '''/etc/munin/plugins/ping_''' &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Copyright (C) 2004 Jimmy Olsen&lt;br /&gt;
#&lt;br /&gt;
# This program is free software; you can redistribute it and/or&lt;br /&gt;
# modify it under the terms of the GNU General Public License&lt;br /&gt;
# as published by the Free Software Foundation; version 2 dated June,&lt;br /&gt;
# 1991.&lt;br /&gt;
#&lt;br /&gt;
# This program is distributed in the hope that it will be useful,&lt;br /&gt;
# but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
# GNU General Public License for more details.&lt;br /&gt;
#&lt;br /&gt;
# You should have received a copy of the GNU General Public License&lt;br /&gt;
# along with this program; if not, write to the Free Software&lt;br /&gt;
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
# Plugin to monitor ping times&lt;br /&gt;
#&lt;br /&gt;
# Parameters:&lt;br /&gt;
#&lt;br /&gt;
# 	ping_args      - Arguments to ping (default &amp;quot;-c 2&amp;quot;)&lt;br /&gt;
# 	ping_args2     - Arguments after the host name (required for Solaris)&lt;br /&gt;
# 	ping           - Ping program to use&lt;br /&gt;
# 	host           - Host to ping&lt;br /&gt;
#&lt;br /&gt;
# Arguments for Solaris:&lt;br /&gt;
#      ping_args      -s&lt;br /&gt;
#      ping_args2     56 2&lt;br /&gt;
#&lt;br /&gt;
# Configuration example&lt;br /&gt;
# [ping_]&lt;br /&gt;
# env.host www.google.com www.yahoo.com&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
#%# family=manual&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$host&amp;quot; ]; then&lt;br /&gt;
    file_host=`basename $0 | sed 's/^ping_//g'`&lt;br /&gt;
    host=${host:-${file_host:-www.google.com}}&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$1&amp;quot; = &amp;quot;config&amp;quot; ]; then&lt;br /&gt;
    echo graph_title Ping times&lt;br /&gt;
    echo 'graph_args --base 1000 -l 0'&lt;br /&gt;
    echo 'graph_vlabel seconds'&lt;br /&gt;
    echo 'graph_category network'&lt;br /&gt;
    echo 'graph_info This graph shows ping RTT statistics.'&lt;br /&gt;
    for hosts in $host; do&lt;br /&gt;
	site=`expr $site + 1`&lt;br /&gt;
	echo &amp;quot;site$site.label $hosts&amp;quot;&lt;br /&gt;
	echo &amp;quot;site$site.info Ping RTT statistics for $hosts.&amp;quot;&lt;br /&gt;
	echo &amp;quot;site$site.draw LINE2&amp;quot;&lt;br /&gt;
	echo &amp;quot;site${site}_packetloss.label $hosts packet loss&amp;quot;&lt;br /&gt;
	echo &amp;quot;site${site}_packetloss.graph no&amp;quot;&lt;br /&gt;
    done&lt;br /&gt;
    exit 0&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
for hosts in $host &lt;br /&gt;
do&lt;br /&gt;
    export site=`expr $site + 1`&lt;br /&gt;
    ${ping:-ping} ${ping_args:-'-c 2'} ${hosts} ${ping_args2} \&lt;br /&gt;
	| perl -n -e 'print &amp;quot;site$ENV{'site'}.value &amp;quot;, $1 / 1000, &amp;quot;\n&amp;quot; &lt;br /&gt;
        if m@min/avg/max.*\s\d+(?:\.\d+)?/(\d+(?:\.\d+)?)/\d+(?:\.\d+)?@; &lt;br /&gt;
        print &amp;quot;packetloss.value $1\n&amp;quot; if /(\d+)% packet loss/;'&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Munin]]&lt;br /&gt;
[[Category:Scripts]]&lt;/div&gt;</summary>
		<author><name>\dev\null</name></author>
	</entry>
</feed>