제목처럼 나온다면 로그인한 계정의 경로 확인
파일 생성 전
root@syslogserver:~/.snmp# ls -al
total 8
drwxr-xr-x 2 root root 4096 3월 15 17:04 .
drwx------ 13 root root 4096 3월 15 16:58 ..
lrwxrwxrwx 1 root root 25 3월 15 16:58 mibs -> /usr/share/snmp/mibs/ietf
root@syslogserver:~# snmpwalk -v2c -c test 192.168.000.000 fgSysCpuUsage
MIB search path: mibs
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (IPV6-ICMP-MIB): At line 0 in (none)
Cannot find module (IPV6-MIB): At line 0 in (none)
Cannot find module (IPV6-TCP-MIB): At line 0 in (none)
Cannot find module (IPV6-UDP-MIB): At line 0 in (none)
Cannot find module (IP-FORWARD-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-PASS-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-EXTEND-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
Cannot find module (NET-SNMP-VACM-MIB): At line 0 in (none)
snmpwalk: Unknown host (fgSysCpuUsage) (Resource temporarily unavailable)
root@syslogserver:~#
파일 생성 후
root@syslogserver:~/.snmp# ln -s /etc/snmp/snmp.conf ./snmp.conf
root@syslogserver:~/.snmp# ls -al
total 8
drwxr-xr-x 2 root root 4096 3월 15 17:07 .
drwx------ 13 root root 4096 3월 15 16:58 ..
lrwxrwxrwx 1 root root 25 3월 15 16:58 mibs -> /usr/share/snmp/mibs/ietf
lrwxrwxrwx 1 root root 19 3월 15 17:07 snmp.conf -> /etc/snmp/snmp.conf
root@syslogserver:~/.snmp# snmpwalk -v2c -c test 192.168.000.000 fgSysCpuUsage
/usr/share/snmp/mibs/ietf: No such file or directory
fgSysCpuUsage: Unknown Object Identifier (Sub-id not found: (top) -> fgSysCpuUsage)
root@syslogserver:~/.snmp#
아래 경로에도 mibs 폴더 추가해주세요.
root@syslogserver:/var/lib/snmp# ln -s /usr/share/snmp/mibs/ietf ./mibs
메시지가 변경 됐어요.
fortigate의 snmp 정보를 prometheus에 불러오려고 하는데, MIBS 값이 먹히지 않아서 몇일 고생했네요.
아직 해결된 건 아닙니다만, 하나의 힌트를 발견하여 기록합니다.
'기술 노트 > ubuntu' 카테고리의 다른 글
influxdb v1으로 설치하기 (0) | 2024.03.18 |
---|---|
influxdb v1 설치 후 telegraf 연동하기 (0) | 2024.03.18 |
influxdb org 확인 하기 (0) | 2024.03.15 |
telegraf 설정하기 (0) | 2024.03.15 |
influxdb token 확인하기 (0) | 2024.03.15 |