Quantcast
Channel: VMware Communities : Discussion List - VMware {code}
Viewing all articles
Browse latest Browse all 2738

Alarm management with C# in .Net

$
0
0

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.


Viewing all articles
Browse latest Browse all 2738

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>