ONTAP Discussions

How can I collect OnTap configuration information more easily?

wzndragon1
2,770 Views

Hello everyone,

    I need to collect the information of about 30 nodes with the following command every day,Now my practice is to input commands one by one. I don't know what batch processing method is, or there are scripts that can execute the following commands in batch. The tool I use is SecureCRT. I hope I can get help!

 

system node run -node * -command sysconfig -ca
system node run -node * -command sysconfig -v
system node run -node * -command sysconfig -a
system node run -node * -command sysconfig -r
system node run -node * -command storage show disk -p
system node run -node * -command storage show fault
system node run -node * -command environment chassis list-sensors
system node run -node * -command environment all
system node run -node * -command aggr status -v
system node run -node * -command vol status -v
system node run -node * -command ifstat -a
lun show -node * -v
system node run -node * -command vol status -s
system node run -node * -command vol status -f
system node run -node * -command disk show -n
system node run -node * -command disk show -v

1 ACCEPTED SOLUTION

paul_stejskal
2,698 Views

The probably easiest way is to run keyfile SSH auth instead of password and get the output that way...

 

ssh cluster 'command'

 

For example on my vSIM:

pstejska@PSTEJSKA03-PC:/mnt/c/Users/pstejska$ vsim version
Access restricted to authorized users

Last login time: 12/17/2021 20:17:10
NetApp Release 9.10.1RC1: Wed Oct 27 02:46:19 UTC 2021

pstejska@PSTEJSKA03-PC:/mnt/c/Users/pstejska$

 

As you can see, no password needed. If you get fancier with bash you can do more.

 

Note: I just use WSL for this and it works perfect.

 

View solution in original post

3 REPLIES 3

paul_stejskal
2,699 Views

The probably easiest way is to run keyfile SSH auth instead of password and get the output that way...

 

ssh cluster 'command'

 

For example on my vSIM:

pstejska@PSTEJSKA03-PC:/mnt/c/Users/pstejska$ vsim version
Access restricted to authorized users

Last login time: 12/17/2021 20:17:10
NetApp Release 9.10.1RC1: Wed Oct 27 02:46:19 UTC 2021

pstejska@PSTEJSKA03-PC:/mnt/c/Users/pstejska$

 

As you can see, no password needed. If you get fancier with bash you can do more.

 

Note: I just use WSL for this and it works perfect.

 

SpindleNinja
2,688 Views

Question - why all this manual output from a node level needed daily?  

There's also a tool out there call Config Advisor, that you can automatically schedule to run and will collect a lot of info. 

https://docs.netapp.com/us-en/ontap/software_setup/task_check_cluster_with_config_advisor.html

 

Otherwise, what Paul said. 

TMACMD
2,685 Views

Semicolon separate

 

system node run -node * -command “sysconfig -ca; sysconfig -v; sysconfig -a ;  sysconfig -r”

 etc…

Public