VMware {code} Community
cloud09
Contributor
Contributor

How do i retrieve alarm for specific VM?

I am creating a java application where I want to retrieve alarms and display it to the user. I cannot find an API that gives me the VirtualMachine name and the details of the alarm/s connected to it.

I am not sure if AlarmManager has the details I am looking for; but I have tried running the PrintAlarmManager.java from vijava API and it only gives me the following information:

Alarm expression #9

metric:110

red:9000

type:HostSystem

yellow:7500

Alarm expression #10

metric:110

red:9000

type:VirtualMachine

yellow:7500

Anyone who could help me on this? I would really appreciate it.

Tags (2)
0 Kudos
1 Reply
cloud09
Contributor
Contributor

In addition, when I am trying to retrieve the alarm object through

Alarm[] alarmArray = alarmMgr.getAlarm(virtualmachine);

it is giving me an error that says, +com.sun.jdi.ClassNotLoadedException: Type has not been loaded occurred while retrieving component type of array. +

I'm not sure what this is and why can't I get the Alarm object. Maybe the informations I am looking for is already there.

0 Kudos