🐷

Juniper SRX1400でSNMPを有効化してZabbixから監視する

に公開

目的

Juniper SRX1400 の SNMP を有効化して、Zabbix サーバから状態を取得できるようにします。
最小構成で動かすため、厳格なセキュリティー設定は行いません。


SRX日本語マニュアルの以下のページを参考に設定していきます。
https://www.juniper.net/content/dam/www/assets/additional-resources/jp/ja/114-snmp.pdf

SRX側の設定

CLI モードで設定モードに入り、以下を実行します:

configure
set snmp community public authorization read-only
set snmp interface ge-0/0/1.0
set security zones security-zone trust host-inbound-traffic system-services snmp
commit
log
--- JUNOS 12.3X48-D105.4 built 2020-07-29 00:51:05 UTC
root@%
root@% cli
root> show interfaces terse

Interface               Admin Link Proto    Local                 Remote
ge-0/0/0                up    up
ge-0/0/0.0              up    up   inet     172.21.173.98/26
                                   multiservice
gr-0/0/0                up    up
ip-0/0/0                up    up
lt-0/0/0                up    up
ge-0/0/1                up    up
ge-0/0/1.0              up    up   inet     192.168.50.254/24
                                   multiservice
ge-0/0/1.50             up    up   inet     10.50.15.254/20
                                   multiservice
ge-0/0/1.32767          up    up   multiservice
ge-0/0/2                up    down
ge-0/0/3                up    down
ge-0/0/4                up    down
ge-0/0/5                up    down
ge-0/0/6                up    down
xe-0/0/7                up    down
xe-0/0/8                up    down
xe-0/0/9                up    down
ge-0/0/10               up    down
ge-0/0/11               up    down
mt-1/0/0                up    up
avs0                    up    up
---(more 40%)---[abort]

root> configure
Entering configuration mode
root# set snmp community public authorization read-only
root# set snmp interface ge-0/0/1.0
root# ...rity-zone trust host-inbound-traffic system-services snmp
root# commit
commit complete
root# exit
Exiting configuration mode
root> exit

Zabbixサーバ側でテスト

SRX の SNMP 応答確認を行います:

snmpwalk -v2c -c public -On 192.168.xxx.xxx 1.3.6.1.2.1.1

成功例:

.1.3.6.1.2.1.1.1.0 = STRING: "Juniper Networks, Inc. srx1400 internet router, kernel JUNOS 12.3X48-D105.4, Build date: 2020-07-29 01:29:50 UTC Copyright (c) 1996-2020 Juniper Networks, Inc."
.1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.2636.1.1.1.2.49
.1.3.6.1.2.1.1.3.0 = Timeticks: (10356533) 1 day, 4:46:05.33
.1.3.6.1.2.1.1.4.0 = ""
.1.3.6.1.2.1.1.5.0 = ""
.1.3.6.1.2.1.1.6.0 = ""
.1.3.6.1.2.1.1.7.0 = INTEGER: 4

Zabbixで監視設定

  1. ホスト追加

    • ホスト名:SRX1400
    • テンプレート:Juniper by SNMP
    • インターフェース:SNMP → 192.168.xxx.xxx
    • コミュニティ:public

数分後、ポートトラフィック・CPU・メモリ が自動検出される。

補足

mibのテンプレートあるっぽいけど試せてない。

https://apps.juniper.net/mib-explorer/navigate?software=Junos OS&release=12.3X48-D10&name=juniperMIB&oid=1.3.6.1.4.1.2636

https://apps.juniper.net/mib-explorer/getMibFile/Junos-OS/12.3X48-D10/mib-jnx-smi.txt

Discussion