...
...
...
...
Section | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Code Block | ||
---|---|---|
| ||
<device device_id="snmpZyxel_router_device"> <trapd_device> <source_address>192.168.97.94</source_address> </trapd_device> <sensor_gateways> <sensor_gateway sensor_gateway_id="snmpZyxel_ports"> <trap key_filter='1.3.6.1.2.1.2.2.1.1.'> <OIDs> <OID>1.3.6.1.6.3.1.1.5.3</OID> <OID>1.3.6.1.6.3.1.1.5.4</OID> </OIDs> </trap> </sensor_gateway> </sensor_gateways> </device> |
In this configuration, the trapd will listen to any trap that starts with "1.3.6.1.2.1.2.2.1.1.", and that contain the bind variables defined in the OID parameters. Then it will create a string with the bind variables and send it to the sensor that has a "key" that matches the key_filter.
Sensor Configuration for trap receiving
Code Block | ||
---|---|---|
| ||
<sensor sensor_id="snmpZyxel_port8"> <sensor_class>unknown</sensor_class> <state_evaluation_expressions> <state_evaluation_expression> <expression>str(value).replace('u','').__contains__("'1.3.6.1.6.3.1.1.4.1.0': '1.3.6.1.6.3.1.1.5.4'")</expression> <true>OK</true> </state_evaluation_expression> <state_evaluation_expression> <expression>str(value).replace('u','').__contains__("'1.3.6.1.6.3.1.1.4.1.0': '1.3.6.1.6.3.1.1.5.3'")</expression> <true>CRITICAL</true> </state_evaluation_expression> </state_evaluation_expressions> <sensor_gateway sensor_gateway_id="snmpZyxel_ports"> <demux> <keys> <key>1.3.6.1.2.1.2.2.1.1.8</key> </keys> </demux> </sensor_gateway> </sensor> <sensor sensor_id="snmpZyxel_port7"> <sensor_class>unknown</sensor_class> <state_evaluation_expressions> <state_evaluation_expression> <expression>str(value).replace('u','').__contains__("'1.3.6.1.6.3.1.1.4.1.0': '1.3.6.1.6.3.1.1.5.4'")</expression> <true>OK</true> </state_evaluation_expression> <state_evaluation_expression> <expression>str(value).replace('u','').__contains__("'1.3.6.1.6.3.1.1.4.1.0': '1.3.6.1.6.3.1.1.5.3'")</expression> <true>CRITICAL</true> </state_evaluation_expression> </state_evaluation_expressions> <sensor_gateway sensor_gateway_id="snmpZyxel_ports"> <demux> <keys> <key>1.3.6.1.2.1.2.2.1.1.7</key> </keys> </demux> </sensor_gateway> </sensor> <sensor sensor_id="snmpZyxel_port6"> <sensor_class>unknown</sensor_class> <state_evaluation_expressions> <state_evaluation_expression> <expression>str(value).replace('u','').__contains__("'1.3.6.1.6.3.1.1.4.1.0': '1.3.6.1.6.3.1.1.5.4'")</expression> <true>OK</true> </state_evaluation_expression> <state_evaluation_expression> <expression>str(value).replace('u','').__contains__("'1.3.6.1.6.3.1.1.4.1.0': '1.3.6.1.6.3.1.1.5.3'")</expression> <true>CRITICAL</true> </state_evaluation_expression> </state_evaluation_expressions> <sensor_gateway sensor_gateway_id="snmpZyxel_ports"> <demux> <keys> <key>1.3.6.1.2.1.2.2.1.1.6</key> </keys> </demux> </sensor_gateway> </sensor> |
...