Clustered ONTAP Daily Health Checks Script

The following post is part based on the earlier post from 1st January: Clustered ONTAP Storage Admins' Health Checks. Here we present a few Clustered ONTAP Storage Admins daily health checks (really there’s too much for a daily checks list …) Please feel free to modify as you see fit. Some of the commands quite nicely display the power of the Clustershell CLI.

Note:

## Two hashes or more is a comment
# One hash you can unhash (for Data ONTAP 8.2+/ where the command needs a date/ where the command needs the local cluster name)

##############################
## CDOT DAILY CHECKS SCRIPT ##
##############################

rows 0
set diag
y

###########################
## Analyze The Event Log ##
###########################

event log show -severity emergency
event log show -severity alert
event log show -severity critical
event log show -severity error
event log show -severity warning
## example for the last 24 hours
# event log show -time "01/21/2014 09:00:00".."01/22/2014 09:00:00" -severity !informational,!notice,!debug

#############################
## Display Some Dashboards ##
#############################

dashboard alarm show
dashboard performance show

####################
## Cluster Checks ##
####################

cluster show
storage failover show
## 2-Node Clusters
# cluster ha show
date
## CDOT 8.2+
# cluster date show

###############################################
## License Checks (not really a daily check) ##
###############################################

system license show -fields expiration-date

#################
## Node Checks ##
#################

node show -fields health
system health alert show -fields indication-time
## ... and if they're old alerts you can delete them with
# system health alert delete -node * -monitor * -alert-id * -alerting-resource *
system node run -node * -command fru_led status

###############################################
## NDMPD check for jobs running and snapshot ##
###############################################

ndmpd status -fields data-state,data-operation,mover-state,mover-mode
snapshot show -snapshot snapshot_for_backup.* -fields create-time

########################
## Autosupport checks ##
########################

system node autosupport show -state !enable
system node autosupport history show -status !ignore -fields status,last-update

###############################
## Aggregate and Disk Checks ##
###############################

storage aggregate show -state !online
storage aggregate show -aggregate * -percent-used >75
storage aggregate show -aggregate * -raidstatus !”raid_dp,normal”
storage disk show -state broken
storage disk show -container unassigned
sto disk show -container-type aggregate -average-latency > 20 -fields average-latency,aggregate

###################
## Volume Checks ##
###################

vol show -state !online
vol show -vserver * -volume * -percent-used >79 -fields state,size,available,percent-used,space-guarantee -type RW
vol show -vserver * -volume * -percent-used <33 -fields state,size,available,percent-used,space-guarantee -type RW 
vol show -snapshot-policy none -type RW -fields volume,size,available,used
vol show -snapshot-space-used > 99 -type RW -fields percent-snapshot-space,snapshot-space-used
vol show -space-guarantee volume -type RW -fields volume,size,available,used
vol show -is-sis-logging-enabled true -type RW -fields volume,sis-space-saved-percent
vol show -is-sis-logging-enabled false -type RW -volume !vol0 -fields volume,size,used
df -i -vserver * -volume * -percent-inodes-used >79
vol efficiency show -fields progress,schedule,policy,last-op-end,state

#####################
## Snapshot Checks ##
#####################

## CDOT 8.2+
# vol show -snapshot-count 0
## CDOT 8.2+
# vol show -snapshot-count > 200
## CHANGE THE DATE - use http://www.timeanddate.com/date/dateadd.html
# vol snap show -create-time <"Wed Oct 09 00:00:00 2013" -fields state,size,create-time,owners
vol snap show -snap !hourly.*,!weekly.*,!daily.*,!snapmirror.*,!*smvi*,!eloginfo*,!exchsnap* -fields state,size,create-time,owners

####################
## Network Checks ##
####################

net port show -link !up
net int show -is-home false
net int show -status-oper !up

################
## SAN Checks ##
################

lun show -mapped unmapped -lun !*rws,!*aux
lun show -lun *.rws # Example - SMBR flexclones
lun show -lun *.aux # Example - failed SME jobs
fcp int show -status-oper !up
iscsi int show -status-oper !up

#######################
## SnapMirror Checks ##
#######################

snapmirror show -healthy false
snapmirror show -status !Idle
snapmirror show -state !snapmirrored
## CHANGE THE LOCAL to CLUSTER you're running the command from
## ... for the snapmirror command below since schedule displays on destination cluster only!
# snapmirror show -schedule "-" -fields state,status -source-cluster !LOCAL
## Compare the following two outputs, should roughly have same number of not RW vols as snapmirrors to this cluster
# snapmirror show -destination-cluster LOCAL -fields destination-volume
# vol show -type !RW


Comments

  1. am new into cdot, its very usefull. Thank you!!

    Also am looking cdot-administration commands and performance and cdot-ontap upgrade cmds. (solaipoovan@yahoo.com)

    I appreciate your help!

    ReplyDelete
  2. Hi. First of all you have really great blog. Thanks for your posts.

    Can you explain me syntaxis of this row line "vol show -vserver * -volume * -percent-used <33 -fields="" -type="" available="" o:p="" percent-used="" rw="" size="" space-guarantee="" state="">"
    It's not clear for me.

    ReplyDelete
    Replies
    1. Hello Smasher, afraid it was blogger not liking the less than sign. Should be corrected now. Cheers, vCosonok

      Delete
  3. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! yoni soap v love

    ReplyDelete
  4. I am grateful to this blog site providing special as well as useful understanding concerning this subject. Gym Weight Belt

    ReplyDelete
  5. Get your personal protective equipment (PPE) and test kits in bulk supply at Pfizer Med Supply for the ongoing campaign and prevention measures against Covid 19. Reach out to the contact mail for more information and enquiries. corona virus test kits supply

    ReplyDelete
  6. Listen cautiously whenever you hear clinical "specialists" crying that a substance or strategy has not been "deductively" assessed in a twofold visually impaired investigation and is thusly not yet "demonstrated" powerful. what is this

    ReplyDelete
  7. This blog aware me about different programs which can become very useful for our friends and kids. Few websites provide combined courses and few of the are separately for single subject. Glad to get this information. Skin Rejuvenation Treatment

    ReplyDelete
  8. It is truly a practical blog to discover some various resource to include my knowledge. Hydrafacial Treatment

    ReplyDelete
  9. I definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work. Aegean College

    ReplyDelete
  10. Hello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. kelowna counselling

    ReplyDelete
  11. This content is written very well. Your use of formatting when making your points makes your observations very clear and easy to understand. Thank you. Sugar Bal

    ReplyDelete

Post a comment