Monitor the Juniper

发布时间:2020-06-27 04:46:53 作者:卍伪装卍
来源:网络 阅读:675

Check the Juniper port OID:

# snmpbulkget -c Firewall -O n 30.30.30.1 -v 2c ifDescr.*

.1.3.6.1.2.1.2.2.1.2.1 = STRING: ethernet0/0

.1.3.6.1.2.1.2.2.1.2.2 = STRING: ethernet0/1

.1.3.6.1.2.1.2.2.1.2.3 = STRING: ethernet0/2

.1.3.6.1.2.1.2.2.1.2.4 = STRING: ethernet0/3

.1.3.6.1.2.1.2.2.1.2.5 = STRING: ethernet2/0

.1.3.6.1.2.1.2.2.1.2.6 = STRING: ethernet2/1

.1.3.6.1.2.1.2.2.1.2.7 = STRING: ethernet2/2

.1.3.6.1.2.1.2.2.1.2.8 = STRING: ethernet2/3

.1.3.6.1.2.1.2.2.1.2.9 = STRING: ethernet2/4

.1.3.6.1.2.1.2.2.1.2.10 = STRING: ethernet2/5



Check the Juniper port status:

# snmpbulkget -c Firewall -O n 30.30.30.1 -v 2c ifOperStatus.*

.1.3.6.1.2.1.2.2.1.8.1 = INTEGER: up(1)

.1.3.6.1.2.1.2.2.1.8.2 = INTEGER: up(1)

.1.3.6.1.2.1.2.2.1.8.3 = INTEGER: up(1)

.1.3.6.1.2.1.2.2.1.8.4 = INTEGER: up(1)

.1.3.6.1.2.1.2.2.1.8.5 = INTEGER: up(1)

.1.3.6.1.2.1.2.2.1.8.6 = INTEGER: down(2)

.1.3.6.1.2.1.2.2.1.8.7 = INTEGER: down(2)

.1.3.6.1.2.1.2.2.1.8.8 = INTEGER: down(2)

.1.3.6.1.2.1.2.2.1.8.9 = INTEGER: down(2)

.1.3.6.1.2.1.2.2.1.8.10 = INTEGER: down(2)



Check the Juniper port traffic:

# snmpbulkget -c Firewall -O n 30.30.30.1 -v 2c ifInOctets.*

.1.3.6.1.2.1.2.2.1.10.1 = Counter32: 3583487232

.1.3.6.1.2.1.2.2.1.10.2 = Counter32: 3496576204

.1.3.6.1.2.1.2.2.1.10.3 = Counter32: 842312155

.1.3.6.1.2.1.2.2.1.10.4 = Counter32: 2607579545

.1.3.6.1.2.1.2.2.1.10.5 = Counter32: 2374175377

.1.3.6.1.2.1.2.2.1.10.6 = Counter32: 391247

.1.3.6.1.2.1.2.2.1.10.7 = Counter32: 0

.1.3.6.1.2.1.2.2.1.10.8 = Counter32: 0

.1.3.6.1.2.1.2.2.1.10.9 = Counter32: 0

.1.3.6.1.2.1.2.2.1.10.10 = Counter32: 0



Definition monitor file:

# vi /etc/nagios/Juniper/CTFirewall.cfg

define host{
    use          generic-switch,host-pnp     ; Inherit default values from a template
    host_name    CTFirewall
    alias        CTFirewall
    address      30.30.30.1           ; IP address of the CTFirewall
    }
define service{
    use                   generic-service,srv-pnp  ; Inherit values from a template
    host_name             CTFirewall
    service_description   ethernet0/0-0/3-status
    check_command         check_snmp!-C Firewall -P 2c -o ifOperStatus.1 -r 1, -o ifOperStatus.2 -r 1, -o ifOperStatus.3 -r 1, -o ifOperStatus.4 -r 1
    }
define service{
    use                   generic-service,srv-pnp  ; Inherit values from a template
    host_name             CTFirewall
    service_description   ethernet2/0-status
    check_command         check_snmp!-C Firewall -P 2c -o ifOperStatus.5 -r 1
    }
define service{
    use                   generic-service,srv-pnp  ; Inherit values from a template
    host_name             CTFirewall
    service_description   ethernet0/0-Flow
    check_command         check_snmp!-C Firewall -P 2c -o ifInOctets.1
    }
define service{
    use                   generic-service,srv-pnp  ; Inherit values from a template
    host_name             CTFirewall
    service_description   ethernet0/1-Flow
    check_command         check_snmp!-C Firewall -P 2c -o ifInOctets.2
    }
define service{
    use                   generic-service,srv-pnp  ; Inherit values from a template
    host_name             CTFirewall
    service_description   ethernet0/2-Flow
    check_command         check_snmp!-C Firewall -P 2c -o ifInOctets.3
    }
define service{
    use                   generic-service,srv-pnp  ; Inherit values from a template
    host_name             CTFirewall
    service_description   ethernet0/3-Flow
    check_command         check_snmp!-C Firewall -P 2c -o ifInOctets.4
    }
define service{
    use                   generic-service,srv-pnp  ; Inherit values from a template
    host_name             CTFirewall
    service_description   ethernet2/0-Flow
    check_command         check_snmp!-C Firewall -P 2c -o ifInOctets.5
    }


Modify the nagios configuration file:

# vi /etc/nagios/nagios.cfg

cfg_dir=/etc/nagios/Juniper



Syntax checking&&Restart nagios:

# /usr/local/nagios/bin/nagios -v /etc/nagios/nagios.cfg

# service nagios restart






-------------------------------------------------------------------


Check the Juniper all OID:

# snmpwalk -v 2c -c Firewall 30.30.30.1 -m ALL .1





推荐阅读:
  1. 【list】 可用于哈夫曼树的一种建树 选数 的链表方法 替代堆
  2. C语言之归并排序算法

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

juniper nagios monitor

上一篇:const成员函数,内联函数,友元函数,static成员

下一篇:cmd命令使用window自带的C#编译器编译C#源代码

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》