vFoglight Count Alarms (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.

import groovy.sql.Sql;
import com.quest.nitro.service.util.JDBCHelper;
msg = new StringBuilder();
try{
sql = new Sql(JDBCHelper.getDataSource());
msg.append("Alarms Table Count: \n")
msg.append(sql.rows("select count(*) from alarm_alarm"));
}catch (Exception ex){
msg.append("Exception"+ex);
}
return msg.toString();

Comments

Popular posts from this blog

Console over SSH (ONTAP)

Brocade Zone Setup

vFoglight Purge Stale Objects (Groovy Script)