Customizing the SNMP trap output
IBM QRadar uses SNMP to send traps that provide information when rule conditions are met.
By default, QRadar uses the QRadar management information base (MIB) to manage the devices in the communications network. However, you can customize the output of the SNMP traps to adhere to another MIB.
Procedure
- Use SSH to log in to QRadar as the root user.
-
Go to the /opt/qradar/conf directory and make backup copies of the
following files:
- eventCRE.snmp.xml
- offenseCRE.snmp.xml
-
Open the configuration file for editing.
- To edit the SNMP parameters for event rules, open the eventCRE.snmp.xml file.
- To edit the SNMP parameters for offense rules, open the offenseCRE.snmp.xml file.
-
To change the trap that is used for SNMP trap notification, update the following text with the
appropriate trap object identifier (OID):
-<creSNMPTrap version="3" OID="1.3.6.1.4.1.20212.1.1" name="eventCRENotification">
-
Use the following table to help you update the variable binding information:
Each variable binding associates a particular MIB object instance with its current value.
Table 1. Value types for variable binding Value type Description Example string
Alphanumeric characters
You can configure multiple values.
integer32
A numerical value
name="ATTACKER_PORT" type="integer32">%ATTACKER_PORT%
oid
Each SNMP trap carries an identifier that is assigned to an object within the MIB
OID="1.3.6.1.4.1.20212.2.46"
gauge32
A numerical value range
counter64
A numerical value that increments within a defined minimum and maximum range
-
For each of the value types, include any of the following fields:
Table 2. Fields for the variable bindings Field Description Example Native
For more information about these fields, see the /opt/qradar/conf/snmp.help file.
Example: 1If the value type isipAddress
, you must use a variable that is an IP address. The string value type accepts any format.Custom
Custom SNMP trap information that you configured for the custom rules wizard
Example: 1If you used the default file information and want to include this information in the SNMP trap, include the following code:<variableBinding name="My Color Variable Binding" OID="1.3.6.1.4.1.20212.3.1" type="string"> My favorite color is %MyColor%</variableBinding>
1Surround the field name with percentage (%) signs. Within the percentage signs, fields must match the value type.
- Save and close the file.
- Copy the file from the /opt/qradar/conf directory to the /store/configservices/staging/globalconfig directory.
- Log in to the QRadar as an administrator.
-
On
the navigation menu (
), click Admin.
-
Select Advanced > Deploy Full Configuration.
Important: QRadar continues to collect events when you deploy the full configuration. When the event collection service must restart, QRadar does not restart it automatically. A message displays that gives you the option to cancel the deployment and restart the service at a more convenient time.