Jump to content

Recommended Posts

Posted

Всем привет.

Хотелось бы поинтересоваться, как использовать snmptable c private мибами.

Добавил приватный миб в директорию, переименовал имя файла миб в то, которое описано в Defenitions.

Но никак не могу получить таблицу.

entoo-test mibs # snmptable -m /usr/share/snmp/mibs/ -c public -v 2c -Os -Ciw 150 10.80.0.7 DGS-1100-06ME_A1:aclProfileTable
Failed to parse MIB file /usr/share/snmp/mibs/
DGS-1100-06ME_A1:aclProfileTable: Unknown Object Identifier
gentoo-test mibs # snmptable -m /usr/share/snmp/mibs/ -c public -v 2c -Os -Ciw 150 10.80.0.7 DGS-1100-06ME_A1:dlinkACL
Failed to parse MIB file /usr/share/snmp/mibs/
DGS-1100-06ME_A1:dlinkACL: Unknown Object Identifier
gentoo-test mibs # snmptable -m /usr/share/snmp/mibs/ -c public -v 2c -Os -Ciw 150 10.80.0.7 DGS-1100-06ME_A1:ipv4aclProfileTable                            Failed to parse MIB file /usr/share/snmp/mibs/
DGS-1100-06ME_A1:ipv4aclProfileTable: Unknown Object Identifier

DGS-1100-06-A1-1.00.B044.zip

Posted

Мне кажется, примерно так.

... -m +<MIB name> -M +<MIB DIR> ...

 

"General options

-m MIB[:...] load given list of MIBs (ALL loads everything)

-M DIR[:...] look in given list of directories for MIBs

"

и

man snmpcmd

Posted

Да про маны то я знаю, но вот не выходит все никак

gentoo-test mibs # snmptable -M /usr/share/snmp/mibs/ -c public -v 2c -Os -Ciw 150 10.80.0.7 companyACLGroup:ipv4aclProfileTable
MIB search path: /usr/share/snmp/mibs/
Cannot find module (companyACLGroup): At line 0 in (none)
companyACLGroup:ipv4aclProfileTable: Unknown Object Identifier
gentoo-test mibs # snmptable -M /usr/share/snmp/mibs/ -c public -v 2c -Os -Ciw 150 10.80.0.7 DGS-1100-06ME_A1:ipv4aclProfileTable
DGS-1100-06ME_A1:ipv4aclProfileTable: Unknown Object Identifier
snmptable -mALL -M /usr/share/snmp/mibs/ -c public -v2c 10.80.0.7 ipv4aclProfileTable
ipv4aclProfileTable: Unknown Object Identifier (Sub-id not found: (top) -> ipv4aclProfileTable)

Posted

Да про маны то я знаю, но вот не выходит все никак

gentoo-test mibs # snmptable -M /usr/share/snmp/mibs/ -c public -v 2c -Os -Ciw 150 10.80.0.7 companyACLGroup:ipv4aclProfileTable
MIB search path: /usr/share/snmp/mibs/
Cannot find module (companyACLGroup): At line 0 in (none)
companyACLGroup:ipv4aclProfileTable: Unknown Object Identifier
gentoo-test mibs # snmptable -M /usr/share/snmp/mibs/ -c public -v 2c -Os -Ciw 150 10.80.0.7 DGS-1100-06ME_A1:ipv4aclProfileTable
DGS-1100-06ME_A1:ipv4aclProfileTable: Unknown Object Identifier
snmptable -mALL -M /usr/share/snmp/mibs/ -c public -v2c 10.80.0.7 ipv4aclProfileTable
ipv4aclProfileTable: Unknown Object Identifier (Sub-id not found: (top) -> ipv4aclProfileTable)

1. "+" вы, как я понял, упустили. Без "+" вы работаете исключительно с указанным каталогом.

2. Это уже вопрос к содержанию MIB-а, а вы спросили, как пользоваться. Я написал как, Cisco MIB у меня так работают :).

Например: snmptable -c <> -C i -m +BGP4-MIB <IP> bgpPeerTable

(-M мне не надо, каталог прописан в snmp.conf строчкой "mibdirs +<dir>")

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...
На сайте используются файлы cookie и сервисы аналитики для корректной работы форума и улучшения качества обслуживания. Продолжая использовать сайт, вы соглашаетесь с использованием файлов cookie и с Политикой конфиденциальности.