1# SNMP trap 2 3phosphor-snmp currently only supports sending traps for error log entries. 4Enabling that for a system can be done by adding phosphor-dbus-monitor rules. 5 6There are a couple of ways through which the user can configure the Dbus-monitor 7to generate the SNMP trap. 8 9* Interface added signal on the D-Bus object. 10* Properties changed signal on the D-Bus object. 11 12Other OpenBMC applications can still send the SNMP trap as needed. These 13applications must use the API exposed by the libsnmp. 14 15Users need to add the notification object in the MIB and then application can 16call the library function. 17 18The OpenBMC Notification management information base (MIB) extension can be 19found at the following location. 20It defines the object descriptions needed for a management application to be 21notified of an error entry in the OpenBMC log. 22 23https://github.com/openbmc/phosphor-snmp/tree/master/mibs 24 25The phosphor-snmp repository exposes the following lib and the D-Bus service 26 27libsnmp: Exposes the API to send the SNMP trap 28phosphor-network-snmpconf: Used for configuring the SNMP manager(Client). 29 30# SNMP Manager Configuration 31 32The administrator can configure one or more SNMP managers to receive the OpenBMC 33traps. 34 35## Add the SNMP Manager 36 37### REST 38 39```curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d '{"data": ["<snmp manager ip>", <port>] }' https://<hostname/ip>/xyz/openbmc_project/network/snmp/manager/action/Client``` 40 41### busctl 42 43```busctl call xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager xyz.openbmc_project.Network.Client.Create Client sqs "<snmp manager ip>" <port>``` 44 45## Delete the SNMP Manager 46 47### REST 48 49```curl -c cjar -b cjar -k -H "Content-Type: application/json" -X DELETE https://<hostname/ip>/xyz/openbmc_project/network/snmp/manager/<id>``` 50 51### busctl 52 53```busctl call xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager/<id> xyz.openbmc_project.Object.Delete Delete``` 54 55