zabbix监控客户端安装-创新互联

<

成都创新互联公司是专业的杭锦网站建设公司,杭锦接单;提供成都网站建设、网站制作,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行杭锦网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!div> <h4 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:0px 0px 10px;padding:0px;border:0px;-webkit-font-smoothing:antialiased;font-size:18px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;"> 添加zabbix用户 </h4> <pre style="orphans:2;text-align:-webkit-auto;margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid #CCCCCC;font-size:13px;font-family:Consolas, 'Liberation Mono', Courier, monospace;line-height:19px;overflow:auto;border-radius:3px;color:#333333;background-color:#F8F8F8;"><code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas, 'Liberation Mono', Courier, monospace;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:transparent;">zabbix客户端程序会以该用户的身份启动 shell&gt; groupadd zabbix shell&gt; useradd -r -g zabbix zabbix</code></pre> <h4 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:20px 0px 10px;padding:0px;border:0px;-webkit-font-smoothing:antialiased;font-size:18px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;"> zabbix 编译安装 </h4> <pre style="orphans:2;text-align:-webkit-auto;margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid #CCCCCC;font-size:13px;font-family:Consolas, 'Liberation Mono', Courier, monospace;line-height:19px;overflow:auto;border-radius:3px;color:#333333;background-color:#F8F8F8;"><code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas, 'Liberation Mono', Courier, monospace;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:transparent;">解压zabbix安装包 shell&gt; tar zxvf zabbix-2.4.5.tar.gz shell&gt; cd zabbix-2.4.5/ 编译安装zabbix shell&gt; ./configure --prefix=/usr/local/zabbix_agent --enable-agent shell&gt; make &amp;&amp; make install shell&gt; ln -s /usr/local/zabbix/sbin/* /usr/local/sbin/ shell&gt; ln -s /usr/local/zabbix/bin/* /usr/local/bin/</code></pre> <h4 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:20px 0px 10px;padding:0px;border:0px;-webkit-font-smoothing:antialiased;font-size:18px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;"> zabbix 配置 </h4> <pre style="orphans:2;text-align:-webkit-auto;margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid #CCCCCC;font-size:13px;font-family:Consolas, 'Liberation Mono', Courier, monospace;line-height:19px;overflow:auto;border-radius:3px;color:#333333;background-color:#F8F8F8;"><code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas, 'Liberation Mono', Courier, monospace;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:transparent;">添加zabbix server端口 shell&gt; grep zabbix /etc/services zabbix-agent 10050/tcp # Zabbix Agent zabbix-agent 10050/udp # Zabbix Agent zabbix-trapper 10051/tcp # Zabbix Trapper zabbix-trapper 10051/udp # Zabbix Trapper shell&gt; vi /usr/local/zabbix_agent/etc/zabbix_agentd.conf ============================================================== Server=192.168.56.210 ServerActive=192.168.56.211:10051 DebugLevel=2 Include=/usr/local/etc/zabbix_agentd.conf.d/ UnsafeUserParameters=1 #允许自定义脚本 ==============================================================</code></pre> <h4 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:20px 0px 10px;padding:0px;border:0px;-webkit-font-smoothing:antialiased;font-size:18px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;"> 启动zabbix客户端 </h4> <pre style="orphans:2;text-align:-webkit-auto;margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid #CCCCCC;font-size:13px;font-family:Consolas, 'Liberation Mono', Courier, monospace;line-height:19px;overflow:auto;border-radius:3px;color:#333333;background-color:#F8F8F8;"><code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas, 'Liberation Mono', Courier, monospace;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:transparent;">添加zabbix到开机启动脚本并修改 shell&gt; cp misc/init.d/fedora/zabbix_agentd /etc/init.d/ shell&gt; /etc/init.d/zabbix_agentd start Starting zabbix_agentd: [确定] zabbix服务器端执行 shell&gt; zabbix_get -s192.168.56.211 -p10050 -k"system.uptime" 8748</code></pre> <h4 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:20px 0px 10px;padding:0px;border:0px;-webkit-font-smoothing:antialiased;font-size:18px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;"> 添加自定义监控 </h4> <p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:10px;margin-bottom:15px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;"> 1、在配置文件里面添加如下监控项: </p> <pre style="orphans:2;text-align:-webkit-auto;margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid #CCCCCC;font-size:13px;font-family:Consolas, 'Liberation Mono', Courier, monospace;line-height:19px;overflow:auto;border-radius:3px;color:#333333;background-color:#F8F8F8;"><code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas, 'Liberation Mono', Courier, monospace;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:transparent;">UserParameter=mysql.status[*],mysql -u$1 -p$2 -e 'show global status' | grep Com_select | awk '{printf $$2}' 注意$$表示原shell含义</code></pre> <p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:15px;margin-bottom:15px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;"> 2、重新启动 zabbix_agentd服务 </p> <p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:15px;margin-bottom:15px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;"> 3、zabbix服务器端check服务 </p> <pre style="orphans:2;text-align:-webkit-auto;margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid #CCCCCC;font-size:13px;font-family:Consolas, 'Liberation Mono', Courier, monospace;line-height:19px;overflow:auto;border-radius:3px;color:#333333;background-color:#F8F8F8;"><code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas, 'Liberation Mono', Courier, monospace;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:transparent;">/usr/local/zabbix/bin/zabbix_get -s 192.168.56.211 -k mysql.status['zabbix','123@qwe'] 116611</code></pre> <h4 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:20px 0px 10px;padding:0px;border:0px;-webkit-font-smoothing:antialiased;font-size:18px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;"> 服务器web配置Item </h4> <p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:10px;margin-bottom:15px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;"> Hosts --&gt; items --&gt; Create item<br /> Name : mysql.status<br /> Type :Zabbix agent<br /> Key : mysql.status['zabbix','123@qwe']<br /> 其他根据需要做修改,保存 </p> <h4 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:20px 0px 10px;padding:0px;border:0px;-webkit-font-smoothing:antialiased;font-size:18px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;"> 配置graph </h4> <p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:10px;margin-bottom:15px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;"> Hosts --&gt; graph --&gt; Create graph<br /> Name : mysql.status<br /> Items: 选择刚配置的Item </p> <p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:15px;margin-bottom:15px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;"> 其他根据需要做修改,保存 </p> <p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:15px;margin-bottom:15px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;"> 此时zabbix就可以生成出界面了 </p> <h3 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:20px 0px 10px;padding:0px;border-width:0px 0px 1px;border-bottom-style:solid;border-bottom-color:#CCCCCC;-webkit-font-smoothing:antialiased;font-size:24px;font-family:Helvetica, arial, freesans, clean, sans-serif;"> 整理自网络 </h3> <p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:10px;margin-bottom:0px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;"> <strong style="margin:0px;padding:0px;border:0px;"><em style="margin:0px;padding:0px;border:0px;">Svoid</em></strong><br /> <strong style="margin:0px;padding:0px;border:0px;"><em style="margin:0px;padding:0px;border:0px;">2015-07-02</em></strong> </p> </div>

本文标题:zabbix监控客户端安装-创新互联
标题来源:/article6/doosog.html

成都网站建设公司_创新互联,为您提供品牌网站建设微信小程序网站策划网站导航建站公司服务器托管

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

外贸网站建设