2 Replies Latest reply on Jun 22, 2017 1:30 PM by nrietsch

    Alarm management with C# in .Net

    nrietsch Lurker

      Hi,

       

      I'm able to get the full inventory, counters and statuses.

      I know when a host or a vm is green, yellow, red, suspended, name it!

       

      HOWEVER, I just cannot figure out how to get the alerts.

      I get the device ID and the alarm id.

       

      I understand that I need to use AlarmManager but the issue is with the GetAlarms().

       

      I saw a few samples using PowerCLI but could not find a working sample in C#.

       

      Could someone PLEASE post a sample code here?

      Once I have access to the GetAlarms, I should have access to the alarm descriptions which I can then filter by host(vm, ...) and by alarm id.

       

      I "just" need that list of alarms (with the descriptions).............

       

      The only thing slose to the alarm description I could find is: <device_type>.DeclaredAlarmState.LinkedView.Alarm.Info.Description.ToArray() but it returns an emty char[] when I KNOW that there is an active alarm.

       

      Thanks for your help.