Do we have any web API/Rest API URL to get event details from check_Mk?

api
notifications

(Mohammed Islam) #1

Hi Team,

Need to integrate Check_Mk with HPE Ops connector 10.11 to forward events from Check_MK to HPE OMi. Do we have any web API/Rest API URL to get event details from check_Mk?
Or please guide me to send events from Check_MK to HPE OMi. Thanks in adv.


(Philipp Näther) #2

Is the event console socket sufficient? You can access it like livestatus:

OMD[mysite]:~$ echo "GET events" | unixcat tmp/run/mkeventd/status


(Mohammed Islam) #3

Thanks Philipp for your quick response!

Is there any API action to get incident details ? as we have this action action=get_all_hosts for get all host …I need similar API Action for Incident/Notification details ?

I believe this i the script we need modify -

/omd/sites/<Site_Name>/share/check_mk/web/plugins/webapi/webapi.py


(Philipp Näther) #4

Here you can find the available web api commands https://mathias-kettner.com/cms_web_api_references.html


(Mohammed Islam) #5

Yes Philipp …that web API commands list i have checked … lot of commands available in that page but for event details there is no API command listed on that page. So, I need help to find out API command for event details …?


(Philipp Näther) #6

So I would assume there is no web api command for events. You may also want to ask the guys in the mailing list https://mathias-kettner.com/community.php. Maybe they got an idea.
I already suggested you the only thing I know to access events beside from the web interface (mkeventd socket). Of course you can use the event log, but that is probably also not the way you are looking for.