<?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>Yousri&#039;s Blog &#187; nagios</title>
	<atom:link href="http://blog.yousri.org/tag/nagios/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.yousri.org</link>
	<description>一个人骑单车在陌生城市路上自由穿梭的生活</description>
	<lastBuildDate>Fri, 20 Jan 2012 15:01:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Nagios基本平台搭建</title>
		<link>http://blog.yousri.org/2009/02/11/nagios%e5%9f%ba%e6%9c%ac%e5%b9%b3%e5%8f%b0%e6%90%ad%e5%bb%ba.html</link>
		<comments>http://blog.yousri.org/2009/02/11/nagios%e5%9f%ba%e6%9c%ac%e5%b9%b3%e5%8f%b0%e6%90%ad%e5%bb%ba.html#comments</comments>
		<pubDate>Wed, 11 Feb 2009 08:23:29 +0000</pubDate>
		<dc:creator>Yousri</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nagios]]></category>

		<guid isPermaLink="false">http://qingxianyan.cn/?p=270</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160; Nagios的功能是监控服务和主机，但是他自身并不包括这部分功能的代码，所有的监控、检测功能都是有插件来完成的。再说报警功能，如果监控系统发现问题不能报警那就没有意义了，所以报警也是Nagios很重要的功能之一。但是，同样的，nagios自身也没有报警部分的代码，甚至没有插件，而是交给用户或者其他相关开源项目组去完成。类似这样细致的工作，被Nagios的开发人员称为dirty work（脏活）。其实脏活不脏，只是太细致了，对于nagios&#8212;&#8212;一个负责监控工作的老板来说，细致的工作必然是交给他的员工去搞定啦。 &#160;&#160;&#160;&#160;&#160; 这里只小分享下关于Nagios安装，只是指基本平台，也就是Nagios软件包的安装。它是监控体系的框架，也是所有监控的基础。后续系列文章会再更多的分享 &#160;&#160;&#160;&#160;&#160;在Nagios官方的文档，会发现Nagios基本上没有什么依赖包，只要求系统是linux或者其他nagios支持的系统。不过如果你没有安装Apache（http web服务），那么就没办法直观的界面来了解信息，所以apache可以算是一个前提条件。关于apache的安装，网上相关文档多得是，找Google老师~ &#160;&#160;&#160;&#160;&#160; 官方网站下载最新的nagios软件包，这里使用的是nagios-3.0.4.tar.gz版本下实现的 。建议先阅读官方文档相关帮助信息。 &#160;&#160;&#160;&#160;&#160; 1、 创建Nagios用户 adduser nagios mkdir /usr/local/nagios chown nagios.nagios /usr/local/nagios &#160;&#160;&#160;&#160; 2、 建立Nagios组 grep "^User" /etc/httpd/conf/httpd.conf /usr/sbin/usermod -G nagcmd apache #apache的用户名 /usr/sbin/usermod -G nagcmd nagios &#160;&#160;&#160;&#160; 3、 解压 tar xzf nagios-3.0.4.tar.gz &#160;&#160;&#160;&#160; 4、 编译 ./configure --prefix=prefix --with-nagios-user=someuser \\ --with-nagios-group=somegroup --with-command-group=cmdgroup #变量prefix 为安装目录，例如/usr/local/nagios #变量someuser 为nagios的用户，例如nagios #变量somegruop <a href='http://blog.yousri.org/2009/02/11/nagios%e5%9f%ba%e6%9c%ac%e5%b9%b3%e5%8f%b0%e6%90%ad%e5%bb%ba.html'>[...]</a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F09%2Finstall-nagios-plugins.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F11%2Fnagios%25E5%259F%25BA%25E6%259C%25AC%25E5%25B9%25B3%25E5%258F%25B0%25E6%2590%25AD%25E5%25BB%25BA.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Nagios插件安装</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F21%2Fcentos52%25E6%2590%25AD%25E5%25BB%25BA%25E9%2585%258D%25E7%25BD%25AEdns%25E6%259C%258D%25E5%258A%25A1.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F11%2Fnagios%25E5%259F%25BA%25E6%259C%25AC%25E5%25B9%25B3%25E5%258F%25B0%25E6%2590%25AD%25E5%25BB%25BA.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">centos5.2搭建配置dns服务</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F03%2F26%2F%25E6%259F%25A5%25E7%259C%258B%25E7%25A1%25AC%25E4%25BB%25B6%25E4%25BF%25A1%25E6%2581%25AF%25E5%25B7%25A5%25E5%2585%25B7lshw%25E5%258F%258A%25E6%259F%25A5%25E6%2589%25BE%25E6%2589%2593%25E5%25BC%2580%25E7%259A%2584%25E6%2596%2587%25E4%25BB%25B6%25E5%25B7%25A5%25E5%2585%25B7lsof.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F11%2Fnagios%25E5%259F%25BA%25E6%259C%25AC%25E5%25B9%25B3%25E5%258F%25B0%25E6%2590%25AD%25E5%25BB%25BA.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">查看硬件信息工具lshw及查找打开的文件工具lsof</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F04%2F28%2F%25E9%25AC%25BC%25E4%25B8%258A%25E8%25BA%25AB%25E4%25BA%25BA%25E7%2599%25BD%25E7%2597%25B4%25E4%25BA%2586.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F11%2Fnagios%25E5%259F%25BA%25E6%259C%25AC%25E5%25B9%25B3%25E5%258F%25B0%25E6%2590%25AD%25E5%25BB%25BA.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">鬼上身,人白痴了</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Nagios的功能是监控服务和主机，但是他自身并不包括这部分功能的代码，所有的监控、检测功能都是有插件来完成的。再说报警功能，如果监控系统发现问题不能报警那就没有意义了，所以报警也是Nagios很重要的功能之一。但是，同样的，nagios自身也没有报警部分的代码，甚至没有插件，而是交给用户或者其他相关开源项目组去完成。类似这样细致的工作，被Nagios的开发人员称为dirty work（脏活）。其实脏活不脏，只是太细致了，对于nagios&mdash;&mdash;一个负责监控工作的老板来说，细致的工作必然是交给他的员工去搞定啦。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 这里只小分享下关于Nagios安装，只是指基本平台，也就是Nagios软件包的安装。它是监控体系的框架，也是所有监控的基础。后续系列文章会再更多的分享</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在Nagios官方的文档，会发现Nagios基本上没有什么依赖包，只要求系统是linux或者其他nagios支持的系统。不过如果你没有安装Apache（http web服务），那么就没办法直观的界面来了解信息，所以apache可以算是一个前提条件。关于apache的安装，网上相关文档多得是，找Google老师~</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a title="http://www.nagios.org/download/" rel="nofollow" href="http://www.nagios.org/download/" target="_blank">官方网站下载</a>最新的nagios软件包，这里使用的是nagios-3.0.4.tar.gz版本下实现的 。建议先阅读官方文档相关帮助信息。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1、 创建Nagios用户</p>
<pre class="brush: bash">
adduser nagios
mkdir /usr/local/nagios
chown nagios.nagios /usr/local/nagios
</pre>
<p>&nbsp;&nbsp;&nbsp;&nbsp; 2、 建立Nagios组</p>
<pre class="brush: bash">
grep "^User" /etc/httpd/conf/httpd.conf
/usr/sbin/usermod -G nagcmd apache #apache的用户名
/usr/sbin/usermod -G nagcmd nagios
</pre>
<p>&nbsp;&nbsp;&nbsp;&nbsp; 3、 解压</p>
<pre class="brush: bash">tar xzf nagios-3.0.4.tar.gz</pre>
<p>&nbsp;&nbsp;&nbsp;&nbsp; 4、 编译</p>
<pre class="brush: bash">
./configure --prefix=prefix --with-nagios-user=someuser  \\
--with-nagios-group=somegroup --with-command-group=cmdgroup
#变量prefix 为安装目录，例如/usr/local/nagios
#变量someuser 为nagios的用户，例如nagios
#变量somegruop 为nagios属于的组，例如nagios
#变量cmdgroup 为nagios命令行属组，例如nagcmd
</pre>
<p>&nbsp;&nbsp;&nbsp;&nbsp;5、 安装</p>
<pre class="brush: bash">
make all
make install
make install-config
make install-init
</pre>
<p>&nbsp;&nbsp;&nbsp;&nbsp; 6、 检查</p>
<pre class="brush: bash">ls /usr/local/nagios/
bin  etc  libexec  sbin  share  var
bin  etc  sbin  share  var
#看到这5个目录就ok了
</pre>
<p>&nbsp;&nbsp;&nbsp;&nbsp;7、 生成http用户验证文件，用户名为Nagios</p>
<pre class="brush: bash">
/usr/bin/htpasswd -c /usr/local/nagios/etc/htpasswd.users nagios
</pre>
<p>&nbsp;&nbsp;&nbsp;&nbsp;8、 将Nagios的信息加到apache中，打开/etc/apache2/apache2.conf文件，在文件最后添加如下代码：</p>
<pre class="brush: bash">
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
Alias /nagios /usr/local/nagios/share
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
;
</pre>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9、 重启apache服务</p>
<pre class="brush: bash">
/etc/init.d/apache2 restart
</pre>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10、 测试Nagios基本平台实现：http://localhost/nagios/</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F09%2Finstall-nagios-plugins.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F11%2Fnagios%25E5%259F%25BA%25E6%259C%25AC%25E5%25B9%25B3%25E5%258F%25B0%25E6%2590%25AD%25E5%25BB%25BA.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Nagios插件安装</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F21%2Fcentos52%25E6%2590%25AD%25E5%25BB%25BA%25E9%2585%258D%25E7%25BD%25AEdns%25E6%259C%258D%25E5%258A%25A1.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F11%2Fnagios%25E5%259F%25BA%25E6%259C%25AC%25E5%25B9%25B3%25E5%258F%25B0%25E6%2590%25AD%25E5%25BB%25BA.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">centos5.2搭建配置dns服务</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F03%2F26%2F%25E6%259F%25A5%25E7%259C%258B%25E7%25A1%25AC%25E4%25BB%25B6%25E4%25BF%25A1%25E6%2581%25AF%25E5%25B7%25A5%25E5%2585%25B7lshw%25E5%258F%258A%25E6%259F%25A5%25E6%2589%25BE%25E6%2589%2593%25E5%25BC%2580%25E7%259A%2584%25E6%2596%2587%25E4%25BB%25B6%25E5%25B7%25A5%25E5%2585%25B7lsof.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F11%2Fnagios%25E5%259F%25BA%25E6%259C%25AC%25E5%25B9%25B3%25E5%258F%25B0%25E6%2590%25AD%25E5%25BB%25BA.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">查看硬件信息工具lshw及查找打开的文件工具lsof</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F04%2F28%2F%25E9%25AC%25BC%25E4%25B8%258A%25E8%25BA%25AB%25E4%25BA%25BA%25E7%2599%25BD%25E7%2597%25B4%25E4%25BA%2586.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F11%2Fnagios%25E5%259F%25BA%25E6%259C%25AC%25E5%25B9%25B3%25E5%258F%25B0%25E6%2590%25AD%25E5%25BB%25BA.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">鬼上身,人白痴了</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.yousri.org/2009/02/11/nagios%e5%9f%ba%e6%9c%ac%e5%b9%b3%e5%8f%b0%e6%90%ad%e5%bb%ba.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios插件安装</title>
		<link>http://blog.yousri.org/2009/02/09/install-nagios-plugins.html</link>
		<comments>http://blog.yousri.org/2009/02/09/install-nagios-plugins.html#comments</comments>
		<pubDate>Mon, 09 Feb 2009 10:02:59 +0000</pubDate>
		<dc:creator>Yousri</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[监控]]></category>

		<guid isPermaLink="false">http://qingxianyan.cn/?p=292</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160; 刚刚在Nagios基本平台搭建一文中也提到，对于Nagios的监测主机与服务功能其实是有其附带的插件来实现的，而Nagios系统本身只是一个空壳而已.因此，在安装了nagios平台之后的第一件事情就是将插件安装上去。这里使用的是插件源码包是从Nagios主页上下载了最新的官方插件，用的版本是nagios-plugins-1.4.13.tar.gz。 1、解压 tar zxvf nagios-plugins-1.4.13.tar.gzcd nagios-plugins-1.4.13&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2、编译安装： ./configure --prefix=/usr/local/nagios &#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#8211;with-cgiurl=/usr/local/nagios/cgi-bin &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211;enable-ssl &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211;enable-command-args&#160;&#160;&#160; make&#160;&#160;&#160; make install 3、相关配置文件：&#160;&#160;&#160;&#160;&#160;&#160;&#160; ## 根据具体使用情况,将配置文件的结构做以下规划,为了方便将来的维护和管理: &#160;&#160;&#160;&#160;&#160;&#160;&#160; ## 配置文件结构如下:&#160;&#160;&#160;&#160;&#160;&#160;&#160; etc/&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#124;&#8211; cgi.cfg&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#124;&#8211; commands.cfg&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#124;&#8211; nagios.cfg&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#124;&#8211; resource.cfg&#160;&#160;&#160;&#160;&#160;&#160;&#160; (以上为nagios系统主配置文件) &#160;&#160;&#160;&#160;&#160;&#160;&#160; etc/servers&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#124;&#8211; contacts.cfg&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 管理人员和管理人员组的的默认初始化设定文件&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#124;&#8211; hostgroups.cfg&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 服务器组的默认初始化设定文件&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#124;&#8211; hosts.cfg&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 服务器的默认初始化设定文件&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#124;&#8211; services.cfg&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 监控服务的默认初始化设定文件&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#124;&#8211; servicegroups.cfg&#160;&#160;&#160;&#160;&#160;&#160;&#160; <a href='http://blog.yousri.org/2009/02/09/install-nagios-plugins.html'>[...]</a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F11%2Fnagios%25E5%259F%25BA%25E6%259C%25AC%25E5%25B9%25B3%25E5%258F%25B0%25E6%2590%25AD%25E5%25BB%25BA.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F09%2Finstall-nagios-plugins.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Nagios基本平台搭建</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2008%2F08%2F03%2Fsoftware_install_in_ubuntu.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F09%2Finstall-nagios-plugins.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">关于Ubuntu系统软件安装方式</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2010%2F12%2F22%2Fganglia%25E7%259B%2591%25E6%258E%25A7%25E7%25B3%25BB%25E7%25BB%259F%25E4%25BA%2586%25E8%25A7%25A3.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F09%2Finstall-nagios-plugins.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Ganglia监控系统了解</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2008%2F08%2F06%2Flamp.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F09%2Finstall-nagios-plugins.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Ubuntu 8.04里LAMP手动编译安装架构纪录</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 刚刚在Nagios基本平台搭建一文中也提到，对于Nagios的监测主机与服务功能其实是有其附带的插件来实现的，而Nagios系统本身只是一个空壳而已.因此，在安装了nagios平台之后的第一件事情就是将插件安装上去。<span>这里使用的是插件源码包是从</span><span lang="EN-US">Nagios</span><span>主页上下载了最新的</span><span>官方插件，用的版本是</span><span lang="EN-US">nagios-plugins-1.4.13.tar.gz</span><span>。</span></p>
<p><span>1、解压</p>
<blockquote><p><code>tar zxvf nagios-plugins-1.4.13.tar.gz<br />cd nagios-plugins-1.4.13</code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p></blockquote>
<p></span></p>
<p>2、编译安装：</p>
<blockquote><p><code>./configure --prefix=/usr/local/nagios <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &ndash;with-cgiurl=/usr/local/nagios/cgi-bin <br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &ndash;enable-ssl <br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &ndash;enable-command-args<br />&nbsp;&nbsp;&nbsp; make<br />&nbsp;&nbsp;&nbsp; make install</code></p></blockquote>
<p><span>3、相关配置文件：<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ## 根据具体使用情况,将配置文件的结构做以下规划,为了方便将来的维护和管理:</span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ## 配置文件结构如下:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; etc/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&ndash; cgi.cfg<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&ndash; commands.cfg<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&ndash; nagios.cfg<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&ndash; resource.cfg<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (以上为nagios系统主配置文件)</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; etc/servers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&ndash; contacts.cfg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 管理人员和管理人员组的的默认初始化设定文件<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&ndash; hostgroups.cfg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 服务器组的默认初始化设定文件<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&ndash; hosts.cfg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 服务器的默认初始化设定文件<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&ndash; services.cfg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 监控服务的默认初始化设定文件<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&ndash; servicegroups.cfg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 监控服务组的默认初始化设定文件<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&ndash; timeperiod.cfg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 时间周期默认初始化设定文件<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (以上为监控服务相关的配置文件,都是由原localhost.cfg文件中拆分出来的,这样方面理解和管理)</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; etc/servers/test.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&ndash; 172.17.0.220.cfg<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&ndash; 172.17.0.255.cfg<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (在etc/servers/下建立监控的域名目录,区分各个被监控的域名,每台监控的主机一个单独的配置文件,包含hosts和services的内容)</p>
<p>
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 下班啦。。今日分享到此，待续ing。。。。。&nbsp;&nbsp; <br /></span></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F11%2Fnagios%25E5%259F%25BA%25E6%259C%25AC%25E5%25B9%25B3%25E5%258F%25B0%25E6%2590%25AD%25E5%25BB%25BA.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F09%2Finstall-nagios-plugins.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Nagios基本平台搭建</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2008%2F08%2F03%2Fsoftware_install_in_ubuntu.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F09%2Finstall-nagios-plugins.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">关于Ubuntu系统软件安装方式</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2010%2F12%2F22%2Fganglia%25E7%259B%2591%25E6%258E%25A7%25E7%25B3%25BB%25E7%25BB%259F%25E4%25BA%2586%25E8%25A7%25A3.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F09%2Finstall-nagios-plugins.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Ganglia监控系统了解</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2008%2F08%2F06%2Flamp.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F09%2Finstall-nagios-plugins.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Ubuntu 8.04里LAMP手动编译安装架构纪录</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.yousri.org/2009/02/09/install-nagios-plugins.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

