alarmService = server.get("AlarmService")
currentAlarms = alarmService.getCurrentAlarms();
def alarms = [] as TreeMap;
def result = new StringBuilder();
for (currentAlarm in currentAlarms)
{
def alarmName = currentAlarm.getSourceName()
def alarmEntry = alarms[alarmName]
if(alarmEntry == null)
{
alarms[alarmName] = 1
}
else
{
alarms[alarmName] = alarmEntry + 1
}
}
for (alarm in alarms.entrySet())
{
result.append(alarm.getKey()).append(" ").append(alarm.getValue()).append("\n")
}
return result
Tuesday, March 13, 2012
vFoglight Alarms with Counts (Groovy Script)
Using the script editor located in Administration > Tooling > Script Console. Best to go ahead and save these for running at a later date when you need them. This will give you all of the alarms in the system along with the number of times it has triggered.
Subscribe to:
Post Comments (Atom)
Raspberry Pi Zero W - Wireless Configuation
create the file under "boot" folder wpa_supplicant.conf country=GB ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev u...

-
Recently I was working with a customer and our Professional Services people as we were doing an upgrade. If you want to view the console ove...
-
I recently setup a Brocade SAN Switch for zones in an HP C7000 Blade Enclosure. I thought I would run through all of the steps. Step 1. T...
-
I came across another complete Cacti ISO yesterday and began working with it. I was very impressed with everything that is comes with and ho...

No comments:
Post a Comment