<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Retrieve list of alarm descriptions in C# in vSphere Management SDK Discussions</title>
    <link>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/865213#M4274</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once you have a list of mObj for the Alarms, then retrieve AlarmInfo from the mObj for each Alarm using 'info' property. AlarmInfo inherits the 'description' property from AlarmSpec. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can dig out some code if you like &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.vmware.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://stripeyfish.wordpress.com/"&gt;Stripey&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 May 2012 14:09:55 GMT</pubDate>
    <dc:creator>stripeyfish</dc:creator>
    <dc:date>2012-05-25T14:09:55Z</dc:date>
    <item>
      <title>Retrieve list of alarm descriptions in C#</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/865211#M4272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I do it?&amp;nbsp; It seems like such a simple thing yet I'm struggling (I can do other things like get VMs, DC's, etc but I am still learning...).&amp;nbsp; I can get the alarm ID's, just having trouble with the descriptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please point me in the right direction?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 09:42:57 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/865211#M4272</guid>
      <dc:creator>Slingsh0t</dc:creator>
      <dc:date>2012-05-25T09:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve list of alarm descriptions in C#</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/865212#M4273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you retrieving the alarms?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;One method is to use the AlarmManger and the GetAlarm() method - &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc_50%2Fvim.alarm.AlarmManager.html"&gt;http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc_50%2Fvim.alarm.AlarmManager.html&lt;/A&gt;&lt;SPAN&gt; which will return you an array of Alarms. If you loop through each one, you will see that you can retrieve the description for the alarm which is extended in the AlarmSpec &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc_50%2Fvim.alarm.AlarmSpec.html"&gt;http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc_50%2Fvim.alarm.AlarmSpec.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(e.g. alarm-&amp;gt;info-&amp;gt;AlarmSpec-&amp;gt;description)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 14:06:37 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/865212#M4273</guid>
      <dc:creator>lamw</dc:creator>
      <dc:date>2012-05-25T14:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve list of alarm descriptions in C#</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/865213#M4274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once you have a list of mObj for the Alarms, then retrieve AlarmInfo from the mObj for each Alarm using 'info' property. AlarmInfo inherits the 'description' property from AlarmSpec. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can dig out some code if you like &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.vmware.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://stripeyfish.wordpress.com/"&gt;Stripey&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 14:09:55 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/865213#M4274</guid>
      <dc:creator>stripeyfish</dc:creator>
      <dc:date>2012-05-25T14:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve list of alarm descriptions in C#</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/865214#M4275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the responses guys,&amp;nbsp; Here is the code I've got so far, any ideas why its not working?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;using System;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;using System.Collections.Generic;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;using System.Linq;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;using System.Text;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #009900;"&gt;using VMware.Vim;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;namespace ConsoleApplication2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class Program&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; static void Main(string[] args)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006600;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VimClient c = new VimClient();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006600;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServiceContent sc = c.Connect("redacted", null, null);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006600;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UserSession us = c.Login("redacted", "redacted");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006600;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006600;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #333399;"&gt;ManagedObjectReference alarmMOR = new ManagedObjectReference();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333399;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alarmMOR.Type = "Alarm";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333399;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alarmMOR.Value = "alarm-3";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333399;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333399;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AlarmManager alarmMg = new AlarmManager(c,alarmMOR);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006600;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(&lt;/SPAN&gt;&lt;SPAN style="color: #333399;"&gt;alarmMg.Description&lt;/SPAN&gt;&lt;SPAN style="color: #006600;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;lt;- alarmMg.Description always seems to come back as null!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006600;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006600;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.Disconnect();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #660000;"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 14:36:51 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/865214#M4275</guid>
      <dc:creator>Slingsh0t</dc:creator>
      <dc:date>2012-05-25T14:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve list of alarm descriptions in C#</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/865215#M4276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to get a list of descriptions for all alarms currently defined, then you first need to get a reference to the AlarmManager from the ServiceContent obtained from your connection to vCenter.&lt;/P&gt;&lt;P&gt;The use GetAlarm on the AlarmManager to get an array of ManagedObject IDs for all the alarms.&lt;/P&gt;&lt;P&gt;Then loop through this list of mObj, to obtain the AlarmInfo (using info) using a property collector function. Info.Description will be the description for each alarm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are you trying to do with Alarms? &lt;/P&gt;&lt;P&gt;If its import and export I have that covered - see link below &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.vmware.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://stripeyfish.wordpress.com"&gt;Stripey&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 15:19:39 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/865215#M4276</guid>
      <dc:creator>stripeyfish</dc:creator>
      <dc:date>2012-05-25T15:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve list of alarm descriptions in C#</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/865216#M4277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have any perl api script to get the list of alarm (VM alarm) with description ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2015 15:15:02 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/865216#M4277</guid>
      <dc:creator>samsvmware</dc:creator>
      <dc:date>2015-04-01T15:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve list of alarm descriptions in C#</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/2969458#M14781</link>
      <description>&lt;P&gt;Please give a complete answer with code sample ....&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 10:04:23 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK/Retrieve-list-of-alarm-descriptions-in-C/m-p/2969458#M14781</guid>
      <dc:creator>afarinesh</dc:creator>
      <dc:date>2023-05-20T10:04:23Z</dc:date>
    </item>
  </channel>
</rss>

