一,安装所需软件net-snmp net-snmp-utils net-snmp-libs net-snmp-devel
yum install net-snmp net-snmp-utils net-snmp-libs net-snmp-devel bc
二,修复snmp配置:
vim /etc/snmp/snmp.conf 修改为:
# sec.name source community
#com2sec notConfigUser default public
com2sec notConfigUser localhost public
access notConfigGroup "" any noauth exact mib2 none none
view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
三,启动snmp服务:
service snmpd start
四,设置开启启动:
chkconfig snmpd on
五,上传插件到/usr/local/nagios/libexec (插件在附件中)
六,配置
测试check_traffic 脚本:
cd /usr/local/nagios/libexec
./check_traffic -V 2c -C nagios -H localhost –L命令列出网络接口
然后更改所属 chown nagios:nagios check_traffic.sh
执行如下命令查看网卡 /usr/local/nagios/libexec/check_traffic.sh -V 2c -C nagios -H localhost -L (which: no bc in (/program/system/jdk1.6/bin::/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin) Can not found command bc in you system PATH: /program/system/jdk1.6/bin::/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin, pleas check it *****解决办法 yum install bc )
cd /usr/local/nagios/etc
vim nrpe.cfg #添加
command[check_traffic]=/usr/local/nagios/libexec/check_traffic -V 2c -C public -H localhost -I 2 -w 2200,4000 -c 2500,4500 -K -B
-I 2 指网卡接口(就是你要监控的网卡接口)
修改chown nagios:nagios /var/tmp/check_traffic_localhost_2.hist_dat
重启nrpe 服务
七,配置监控服务器:
cd /usr/local/nagios/etc/objects
编辑vim services.cfg中添加:
define service {
use services-pnp
host_name xxx-Server
service_description check-traffic
check_period 24x7
max_check_attempts 4
normal_check_interval 3
retry_check_interval 2
contact_groups sagroup
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check_nrpe!check_traffic
}
八,测试
分享到:
相关推荐
2、 上传监控插件至被监控机nagios/libexec目录并授权 3、 网卡参数检测 4、 nrpe.cfg文件增加监控command 5、 nagios服务器配置service.cfg添加监控项 具体实施: 1.安装修改启动snmpd服务 安装: # yum -y ...
总结来说,Nagios SNMP插件是Nagios监控体系中的重要组成部分,通过它们,我们可以实现对网络设备的全面、细致的监控。了解并熟练使用这些插件,对于提升IT运维效率,保障系统稳定运行具有显著意义。因此,无论是...
### Nagios监控平台安装及图形化配置详细过程 #### 一、Nagios的基本安装与配置 ##### **1. 环境准备** - **系统环境**:本指南假设您正在使用基于RHEL/CentOS的Linux发行版。 - **安装必要软件包**:首先确保...
2. **check_snmp_traffic**:用于监测网络接口的输入/输出流量。 3. **check_snmp_disk**:监控设备的磁盘空间使用情况。 4. **check_snmp_processes**:检查设备上特定进程的存在和状态。 **报警与通知** 当Nagios...
- **check_traffic安装检测流量插件**: - **安装check_traffic**:安装用于监控网络流量的插件。 - **将check_traffic加入到nagios中**:在Nagios配置文件中定义新的监控服务,并关联`check_traffic`命令。 ####...
在日常管理中,你还可以利用 check_mk_server 的高级特性,如自定义插件、自动化发现、多站点管理等,来提升监控效率和准确性。此外,check_mk_server 具有良好的社区支持和活跃的开发,可以获取到最新的更新和功能...
"Nagios snmp plugins"就是Nagios为了支持SNMP监控而开发的一系列插件,这些插件让Nagios具备了监控主机和网络设备的能力。 首先,我们需要理解Nagios插件的工作原理。Nagios的核心在于其插件机制,这些插件是可...
2. `check_snmp_traffic`:这个插件用于监控网络接口的流入和流出流量,有助于识别可能的带宽瓶颈或异常流量模式。 3. `check_snmp_uptime`:检查设备的系统运行时间,帮助确定设备的稳定性。 4. `check_snmp_...