How do I trigger an analytic event I created in my pluggin?

Hi support,

I created an analytic event in my pluggin, and I would like to trigger it programmatically. This event should trigger from a Sensor Alert I created that takes in data from a sensor when it alerts. I tried creating an alarm that would take in this event as the triggering event, but I’m not sure that the alarm will ever trigger if I can’t get the event to trigger.

On a side note the alarm definition is not showing up in the alarm definition folder.

var managementServer = new VideoOS.Platform.ConfigurationItems.ManagementServer(EnvironmentManager.Instance.MasterSite);
 
            var addAlarm = managementServer.AlarmDefinitionFolder.AddAlarmDefinition();

I do give addAlarm values, like a name, description and so on, and then after I say addAlarm.Execute();

Do you have any ideas for why it doesn’t appear as an alarm definition in the alarm definition folder.

Thank you!

Use VideoOS.Platform.Messaging.MessageId.Control.TriggerCommand

I recommend that you look at the ConfigAccessViaSDK sample and the Trigger button in that sample.

Side note - https://developer.milestonesys.com/s/question/0D50O00005SmlBkSAJ/how-do-i-add-an-alarm-definition-out-of-a-plugin