Hi Jakob 
The important part is that the Message in the EventHeader matches (case sensitive) the Message in the EventType declaration and that the kind of the Source in the EventHeader matches one of the kinds listed in SourceKinds of the EventType.
You can also have a look at the SensorMonitor sample.
Br,
Peter
Hej Peter,
Læste lige det du skrev grundigere.
På en Analytical Event matcher den på Message. Forhåbenligt matcher den på MessageId (bemærk ID) på en “EventData” event. Har sådan en event iøvrigt et navn?
/Jakob
(Please stick to English so others can benefit as well
).
You are right - from the documentation:
“Note that when constructing events, the “MessageId” property on the EventHeader links to the event type “ID” and defines which event type it is. The “MessageId” field is used when matching the events in the rule system. The “MessageId” is a new field (2014) on the EventHeader. For backwards compatibility, the “Message” field is used for matching if “MessageId” is not specified”
https://doc.developer.milestonesys.com/html/index.html?base=gettingstarted/intro_rulesystem.html&tree=tree_search.html?search=getknowneventtypes
What EventData events should be called I honestly don’t know. 
/Peter
Hi Peter,
Thank you for the answer. I figured out that the reason events (both event and analytical) would not be raised, was because it was running in a management client plug-in and the events was raised from there.
Jakob