1、配置zabbix监控nginx状态。
开启Nginx状态数据配置,需要在nginx.conf中添加一个虚拟主机,内容如下
[root@zabbix conf.d]# cat test.conf
server {
listen 127.0.0.1:80;
server_name 127.0.0.1;
location /nginxstatus {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
}
[root@zabbix conf.d]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@zabbix conf.d]# nginx -s reload //加载配置
[root@zabbix conf.d]# curl http://127.0.0.1/nginxstatus //访问测试
Active connetctions: 1
server accepts handled requests
2 2 6
Reading: 0 Writing: 1 Waiting: 0
2、配置zabbix监控华为路由器。
在 ENSP 中借助 Cloud 来实现。 ENSP 安装略。
在 Cloud 中添加 UDP 端口,添加网卡。添加端口映射表,要注意勾选双向通道
1 、在云中增加一个绑定真实网卡的端口
测试华为路由和zabbix服务端的网络连通
华为路由配置snmp
4、检查结果
在Zabbix服务端使用以下命令进行验证
[root@node1 ~]# snmpwalk -v 2c -c zabbix 192.168.196.145 .1
SNMPv2-MIB::sysDescr.0 = STRING: Huawei Versatile Routing Platform Software VRP WVRP-C Software Version VRPV500R011C00B071-GR
Copyright (c) 2000-2011 by VRP Team Beijing Institute Huawei Tech, Inc
Compiled Dec 19 2012 11:52:04 by huangyuchen
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.2011.1.1.1.8070
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (166947) 0:27:49.47
SNMPv2-MIB::sysContact.0 = STRING: R&D Beijing, Huawei Technologies co.,Ltd.
SNMPv2-MIB::sysName.0 = STRING: Huawei
SNMPv2-MIB::sysLocation.0 = STRING: Beijing China
SNMPv2-MIB::sysServices.0 = INTEGER: 78
IF-MIB::ifNumber.0 = INTEGER: 17
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifIndex.4 = INTEGER: 4
IF-MIB::ifIndex.5 = INTEGER: 5
IF-MIB::ifIndex.6 = INTEGER: 6
IF-MIB::ifIndex.7 = INTEGER: 7
IF-MIB::ifIndex.8 = INTEGER: 8
IF-MIB::ifIndex.9 = INTEGER: 9
IF-MIB::ifIndex.10 = INTEGER: 10