Classify devices, network discovery, SNMPv2, the sequence

Create a community name:
 < /dev/urandom tr -dc A-Za-z0-9 | head -c${1:-20};echo;
Set this comunity name for each device behind a proxy:
eRQ57WF92NkqMFI6AnBV
Install snmp tools on Debian family:
apt-get -y install snmp
Install on RHEL family:
yum -y install net-snmp-utils
Test if device is accessible from proxy server. Show ObjectID:
snmpwalk -v2c -c eRQ57WF92NkqMFI6AnBV 192.168.99.1 .1.3.6.1.2.1.1.2.0
Set {$SNMP_COMMUNITY} to eRQ57WF92NkqMFI6AnBV in:
Administration -> General -> Macros
Set up network discovery in:
Configuration -> Discovery
SNMP community:
{$SNMP_COMMUNITY}
sysObjectID:
.1.3.6.1.2.1.1.2.0
For multiple proxies the image looks like:
Reload config on Zabbix server:
zabbix_server -R config_cache_reload
Reload config on Proxy server:
zabbix_proxy -R config_cache_reload
Make sure every requested metric comes to Zabbix server:
Monitoring -> Discovery
Take a note where every host after discovery will go by default:
Because the output may be different on multiple proxies:
# snmpwalk -v2c -c eRQ57WF92NkqMFI6AnBV 192.168.99.1 .1.3.6.1.2.1.1.2.0
SNMPv2-MIB::sysObjectID.0 = OID: MIKROTIK-MIB::mikrotikExperimentalModule # snmpwalk -v2c -c eRQ57WF92NkqMFI6AnBV 192.168.88.1 .1.3.6.1.2.1.1.2.0
iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.14988.1
I need to create one value comparison with clear OID and the second with translated:
All together:
Reload config on Zabbix server:
zabbix_server -R config_cache_reload
Reload config on Proxy server:
zabbix_proxy -R config_cache_reload
Make sure the device registers as a monitored host:
Let's update the same registration but this time we will automatically create an snmpwalk dump for this device:
The command for proxy compiled from source:
/usr/local/share/zabbix/externalscripts/create-snmpwalk-dump.sh eRQ57WF92NkqMFI6AnBV {DISCOVERY.DEVICE.IPADDRESS}
On CentOS:
/usr/lib/zabbix/externalscripts/create-snmpwalk-dump.sh eRQ57WF92NkqMFI6AnBV {DISCOVERY.DEVICE.IPADDRESS}
The content of:
Make sure the home directory exists and is owned by user zabbix:
mkdir -p /home/zabbix && chown -R zabbix. /home/zabbix
The outcome from script will be the pure buletproof OID's + translated version if the proxy has appropriate MIBs:
# tree -a
.
├── 1.3.6.1.4.1.14988.1
│   ├── numeric-192.168.88.1.log
│   └── translated-192.168.88.1.log
└── 1.3.6.1.4.1.311.1.1.3.1.1
    ├── numeric-192.168.88.53.log
    └── translated-192.168.88.53.log

2 directories, 4 files

No comments: