ConfD User Community

Need help in implementing notification feature

I have yang file having notifications for alarms as below:

So i am not getting when i will receive one alarm, how I can generate an event for that. So that I can poll and process accordingly.
I have gone through a sample example where confd_notification_register_stream which does the confd registration. Then through the stdin its generating an event, which is getting polled and then takes necessary action.
I have few doubts:
1.While doing confd_notification_register_stream,its not doing subscription to any leaf or node as we map the action point for rpc data or call point for transactional data.How to segregate in the case of notification.Because we have multiple yang files and in that, we have multiple notifications.
2.what is the best way to design, which can work as notification framework.
3.I have gone through the linucfg code and using that i have created framework of rpc & transactional data.But i am not able to create for notification.
4.I couldn’t understand the usecase of streamname,replay member of confd_notification_stream_cbs.

If you can help me in designing the same then it will be really helpful for me.


Hi Biswajit,

Did you check the example under: $CONFD_DIR/examples.confd/netconf_notifications ?

There you will find all the answers, in addition to the user guide.
You could replicate the example in your linuxcfg code.

Hi Nabil,
Thanks alot for your reply.
Yes i have gone through the netconf_notifications.But i could able to create generic framework for notification.for creating action points,call points,i have taken reference of linuxcfg.
But i think i should use confd_register_notification_stream for subscribing and confd_notification_send api for sending alarm notifications.Both of these apis are not getting used in linuxcfg.
So if you can guide me how i can implement which can be utilized across all the notifications features present in other yang files.


Well, this is a coding exercise. You may want to think about a way to either generate code that you then abstract with a single send_notification() API, or do this for each notification instance. There is nothing “magic” about this. Just keep in mind that each notification can be different, so you have to handle different formats.

If you want to send common system events, take a look at: