RFC for Implement SNMP trap on openBMC.

Alexander Amelkin a.amelkin at yadro.com
Wed Mar 28 02:34:22 AEDT 2018


I personally think that GitHub issue is the best place for such
discussion as it allows to have in one place all the background for the
taken decision once the feature is implemented.

I have posted a link there to our current implementation of SNMP support
for OpenBMC.

It is far from being ideal and currently only supports YADRO MIB.
Support for other IANA enterprise numbers and other MIBs is yet to be
added (you're all welcome to do so).

Please take a look at https://github.com/YADRO-KNS/phosphor-snmp

Alexander

17.03.2018 14:47, Ratan Gupta wrote:
> Hi All,
>
> I am working on the
> issue(https://github.com/openbmc/openbmc/issues/3002) to Implement
> SNMP trap notification support on openBMC.
> I would be explaining a rough idea of how we plan to go about.
> Please share your thoughts and feedback on this proposal.
>
> Requirement:- Enable support for SNMP trap notification on openbmc.
>               Currently the requirement is to send the SNMP trap in
> the following cases
>               1) Whenever the error log gets created.
>               2) Whenever the BMC state changes to runtime.
>
> NOTE:- In future We would extend the support of sending trap in other
> use cases.
>               1) Sending the sensor telemetry data.
>               2) Application specific use cases.
>                    eg:- Multiple Authentication failure.
>
> Configurable Trap Parameters
> ===================
>
> 1) Manager IP
> 2) Interested Trap types
>     Notice
>         Warning
>         Critical
>
>
> How to configure the SNMP Manager IP on bmc?
>
> - Through REST (and hence D-Bus) API
>
> We can define the MIB structure depending on the eventType
>
> eg
>
> ==>eventType = ErrorLog
>
> Structure for errorLog MIB
> ================
> AgentIP   :   BMC IP Address
> TimeStamp :   Time when the trap generated
> deviceName:-  DbusObjectPath
> alertLevel:-  Would be given by the config yaml
>     Following properties data would be fetched by making Dbus call on
> that object.
> ErrorId:
> ErrorSeverity:
> ErrorMessage:
> ErrorAdditionalData{array of key value}:
> ErrorResolutionStatus:
>
> ===>eventType = Configuration
> AgentIP   :   BMC IP Address
> TimeStamp :   Time when the trap generated
> deviceName:-  DbusObjectPath
> alertLevel:-  Would be given by the config yaml
> eventMessage:- "BMC state changed"
> PropertyName:-
> PropertyValue:-
>
> Implement the snmp trap feature
> =====================
>
> Currently on openbmc the data is being modeled as D-bus Object so we
> would be
> leveraging the capabilities given by the existing
> app(phosphor-Dbus-Monitor) to get the
> triggers on following conditions to generate the snmp trap.
>
> 1) whenever the new object gets added
>       eg error object under /xyz/openbmc_project/Logging
>
> 2) There is some property change on the configured D-bus object
>       eg Network configuration change.
>
> 3) Some property reached a specific value/threshold value.
>       eg BMC state change to "poweron" or CPU temperature is > X
>
> NOTE:- There could be cases which is independent on the D-bus object
>        eg:- Generate a trap whenever there is multiple authentication
> failure
>        We would expose a D-bus api to generate a trap to handle
> application
>        specific use cases.
>
> Config YAML of Phosphor-Dbus-Monitor
> ========================
> - name: create property event
>   class: callback
>   callback: snmpEvent
>   paths: D-bus path group
>   properties: Group of interested Properties
>   eventSeverity: Notice/Warning/Critical
>   eventType: Error log / Sensor / State.
>   eventMessage: "User can give the message as per the eventType"
>          PropertyChange:- Normal property Change could be eventType as
> Notice eg:- StateChange/Network Configuration change
>          PropertyChange would become Warning:- if we have met a
> specific condition on a property
>                            eg Proc Temprature > some configured
> temperature value.
>
> Opensource:- NetSnmp
>              Comes up with full suite of tools like snmp
> agent,snmptrapd, mib2c, bunch of other tools
>              Currently the support is for trap so we need minimal of
> above(libsnmp,mib2c).
>
> Regards
>
> Ratan Gupta
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20180327/a25b4e9b/attachment.sig>


More information about the openbmc mailing list