Здравствуйте. Простите если вопрос уже был, через поиск не нашёл (а может результаты читал по диагонали).
Есть железка
$get system versionКод:
Control Plane Binary : R2.44_4M
Data Plane Binary : DP_B02_10_28_04_ip1000a
Ловлю трапы с неё и похожих, и в качестве парсера использую snmptt.
По телнету в консоль вываливается
ADSL port 22 : [LOS][LOF][LOL][TRAINING].
В sql пишется такая вот строка
select formatline from snmptt where agentip='<здесь ip адрес>' and eventname='askeyEntityAlarmTrap' order by id DESC limit 10;Код:
An askeyEntityAlarmClear trap is sent when a entity clears an alarm. AdslModule 22 2086
Шаблон для snmptt
snmptt.conf.askeyКод:
#
#
#
EVENT askeyEntityAlarmTrap .1.3.6.1.4.1.3646.1300.8.2.600.2.0.1.0.1 "Status Events" Normal
FORMAT An askeyEntityAlarmClear trap is sent when a entity clears an alarm. $*
SDESC
An askeyEntityAlarmClear trap is sent when a entity clears an alarm.
It can be utilized by an NMS to trigger alarm definition table
maintenance polls.
An NMS should periodically check the items of aeHistoryAlarmTable
to detect any missed askeyEntityAlarmClear trap
events, e.g. due to throttling or transmission loss.
Variables:
1: aeAlarmLastChange
Syntax="UNSIGNED32"
Descr="The system time of the alarm vector is changed."
2: aeAlarmModuleId
Syntax="INTEGER"
0: SnmpgenModule
1: SensorModule
2: AdslModule
3: AdslPmModule
4: GeModule
Descr="A reference of the vendor-specific hardware type of the
physical entity."
3: aeAlarmPhysicalIndex
Syntax="UNSIGNED32"
Descr="Physical entity index, encoded by shelf/slot/port, 2 decimal digits
each field."
4: aeAlarmList
Syntax="UNSIGNED32"
Descr="Defines the active alarms on physical entity.
Alarm information is represented by AskeyAlarmList, A manager can
use bitwise integer operation to retrieve what type of alarms are
asserted.
All the alarm types are defined in aeAlarmDefinitionTable.
A bit value of '0' implies no such type of alarm and in contrast
a bit value of '1' implies there is an such type of alarm asserted.
All unused bits (or no alarm) are filled by 0."
5: aeAlarmSeverity
Syntax="INTEGER"
1: critical
2: major
3: minor
4: warning
5: info
99: none
Descr="The highest level of alarm severity of a physical entity."
EDESC
насчёт шаблона не уверен - генерил его сам с помощью snmpttconvertmib, пришлось дописать пару цифр в oid.
Поэтому привожу кусок лога snmptrapd
Код:
.1.3.6.1.2.1.1.3.0 = Timeticks: (9035875) 1 day, 1:05:58.75 .1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.3646.1300.8.2.600.2.0.1.0.1 .1.3.6.1.4.1.3646.1300.8.2.600.1.3.1.1.1 = INTEGER: 2 .1.3.6.1.4.1.3646.1300.8.2.600.1.3.1.1.2 = INTEGER: 22 .1.3.6.1.4.1.3646.1300.8.2.600.1.3.1.1.3 = INTEGER: 2086
Подскажите как поправить конфиг snmptt или где взять "правильный" mib, и что делать и кто виноват
Пока писал пост обнаружил свою ошибку MIB'ы R2.42mibs, а версия прошивки R2.44 ... буду разбирать дальше в деталях, но в общем вопрос всё равно открыт