MonitortheJuniper

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


标题名称:MonitortheJuniper
文章位置:http://azwzsj.com/article/gdieij.html