Posts

Console over SSH (ONTAP)

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 over SSH all you have to do is log into the Storage Processor and then run a command:
system console

NetApp ONTAP installation (Clean)

Image
If you need to reset a NetApp FAS/AFF system back to the factory setting it is pretty easy. When you reboot the system connect to the console port on the controllers. Wait for the second "Ctrl-C" menu then press "Ctrl-C" to enter the menu below:


From here you can enter option "4" to do a clean configuration and initialize all disks.

NOTE: You should have both controllers on the same menu before proceeding with a full reset.

Another great feature of this menu is the Option 7, this allows you to upgrade the ONTAP software on the controllers. Engineers have used this to down rev or upgrade systems prior to joining a cluster.

vFoglight Cisco UCS Cartridge

Here is all of the code which you will need to get things running. I have stopped the development of this cartridge and turning it over to capable hands at Quest. Below are the files

Cisco UCS Files

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.
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

vFoglight Purge Stale Objects (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. On line "10" you can enter the number of days to go back to remove the script below will purge objects "30" days old. Also on line "17" you can show the items to purge instead of deleting them.
// Script Purpose: Remove Stale Objects from vFoglight Database // Script Platform: Foglight Managment Servers running on Windows or Linux // Script Created by: chris.walker@quest.com // Script Last Updated: 10.13.2011 // Script Version: 11.10.13 // Please see PDF documentation that should have come with this script for usage information // Note: The script formating was compressed to save page space in the PDF. Sorry this does make it harder to read. // Modify the line below to change the number of days staleDays='30';// Exmple: Deleted object with stale data that is older than "30" …

vFoglight Purge 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. On line "4" you can enter the number of day to go back and delete. This script will only remove 10,000 alarms at a time so you might want to make a rule to prune down the alarms.
def alarmSvc = server.AlarmService; def LOG = org.apache.log4j.Logger.getLogger("Alarm Purge Rule") def now = new Date(); def cutoff = now - 180; def Anchor = now - 2000; def alarms = alarmSvc.getAlarms(Anchor, cutoff); for (alarm in alarms) { alarmSvc.purgeAlarm(alarm.getID()); } LOG.info("Purged " + alarms.size() + " alarms older than " + cutoff); return "Purged " + alarms.size() + " alarms older than " + cutoff;

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();