#I want to get details of all netapp volumes with their anti-ransomware status

1 messages · Page 1 of 1 (latest)

sick wren
#

Used many modules but the volume information is not providing files anti-ransomware , command I want output is "security anti-ransomware volume show" and below modules I tried and they are showing volume data but not he fiels anti-ransomware
netapp.ontap.na_ontap_rest_info:
gather_subset:
- security/anti-ransomware/suspects

netapp.ontap.na_ontap_rest_info:
gather_subset:
- storage/volumes

netapp.ontap.na_ontap_rest_cli:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
verb: 'GET'
command: 'security/anti-ransomware/volume'

Output should be like this:
Vserver Volume State Dry Run Start Time


nastest35 ** disabled -
nastest35 ** disabled -
nastest35 ** disabled -
nastest35 ** disabled -
nastest35 ** disabled -
nastest35 ** disabled -

tiny hollow
#

What version of ONTAP re you using?

tiny hollow
#

if you on ONTAP 9.10 i believe that is returned with

gather Subset (storage/volumes)
And you have to specificy that as a one of the fields to return.

sick wren
#

you made my day @tiny hollow , can you also please let me know which document are you referring here as I was not able to find this information.

surreal rivet
sick wren
#

thanku so much @surreal rivet and @tiny hollow for this flying help, I am able to fetch data very easily now. Now the issue is because data we are capturing is very big and I am entering those volume details in csv, the code is crashing with memory error after working on approx. 2000+ entries.

#

Traceback (most recent call last):
File "/usr/lib64/python3.9/multiprocessing/queues.py", line 244, in _feed
obj = _ForkingPickler.dumps(obj)
File "/usr/lib64/python3.9/multiprocessing/reduction.py", line 51, in dumps
cls(buf, protocol).dump(obj)
MemoryError

tiny hollow
#

How your playbook set up, we can limit fields to lower some of the data

sick wren
swift temple
#

@tiny hollow: Hi Chris
I need to list down all the local default users .admin,diag, and autosupport .However when i am running this , its not giving info of diag user. request you to please help here to get the diag account as well

  • name: Gather Local Account information
    netapp.ontap.na_ontap_rest_info:
    gather_subset:
    - security_login_account_info
    fields: '*'
    hostname: "{{ cluster_names }}"
    username: "{{ username }}"
    password: "{{ password }}"
    https: true
    register: result

  • name: Debug result structure
    debug:
    var: result