Event management not generating message key automatically

kumaraj
Kilo Sage

Hi All,

I am pushing event using API explorer and get everything working as I expect but when i see in event's "message_key" field then I don't find any auto generated message key when i do not provide this value in API explorer.

I do not get message key generated in event record but I do get it in Alert's "message_key" field.

Any idea what can be wrong?

Thanks

19 REPLIES 19

If my answer is correct please mark it correct so others can easily find the answer. Thank you.

Robert is correct, there is a BR on the em_alert table called "Add message key if missing" which concatenates fields together to make our own message_key ::

addMessageKey();
function addMessageKey(){
	current.message_key = current.source + "_" + current.node + "_" + current.type.name + "_" + current.resource;
}

Hitoshi Ozawa
Giga Sage
Giga Sage

FYI, all of my events from PRTG do have message_key assigned.

Yes which makes sense cause certain pull/push integrations will provide that to be used as it's typically a unique key on the generating side.

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,


Message if not passed is auto generated with combination of 4 fields on event record using the BR ROB told.


This is the field which is mainly used for alert correlation in first place.


Thanks,
Ashutosh