Hello everyone, I am trying to collect SnapMirror fields using the endpoint api/private/cli/snapmirror . According to the documentation, I should receive the following fields ( and others...) : destination_path => destination_location relationship_id => relationship_id cg_item_mappings => cg_item_mappings destination_volume => destination_volume destination_volume_node => destination_node destination_vserver => destination_vserver healthy => healthy last_transfer_type => last_transfer_type policy_type => policy_type relationship_group_type => group_type relationship_type => relationship_type schedule => schedule source_path => source_location source_volume => source_volume source_vserver => source_vserver status => relationship_status unhealthy_reason => unhealthy_reason break_failed_count => break_failed_count break_successful_count => break_successful_count lag_time(duration) => lag_time last_transfer_duration(duration) => last_transfer_duration last_transfer_end_timestamp(timestamp) => last_transfer_end_timestamp last_transfer_size => last_transfer_size newest_snapshot_timestamp(timestamp) => newest_snapshot_timestamp resync_failed_count => resync_failed_count resync_successful_count => resync_successful_count total_transfer_bytes => total_transfer_bytes total_transfer_time_secs => total_transfer_time_secs update_failed_count => update_failed_count update_successful_count => update_successful_count However, the response I am receiving contains only the following fields: "records": [
{
"source_path": "#:#####",
"source_vserver": "#",
"source_volume": "#",
"destination_path": "#:#",
"destination_vserver": "#",
"destination_volume": "#"
}
] Does anyone have any insights on what might be going wrong? BTW I did not have any issues with aggregation and the nic_common endpoint/fields before. Thanks in advance for your help! PS : The polar in question is the REST API, and the version of my harvest in the cluster is 9.12.1. Best,
... View more
I am recently learning powershell scripting, how can I write scripts to successfully access adv permissions, I tried to pass y after set adv, but it didn't work, I don't know how to solve this problem, hope someone can help modify my script my script # Set connection information $ONTAPHost = Read-Host "Enter the IP address of the ONTAP cluster" $User = Read-Host "Enter username" $Password = Read-Host "Enter password" $OutputFile = "commands_output.txt" # Output file path # Import Posh-SSH module from removable drive, need to change the drive letter Import-Module F:\Posh-SSH # Create an SSH session and pass credentials $securePassword = $Password | ConvertTo-SecureString -AsPlainText -Force $credential = New-Object System.Management.Automation.PSCredential($User, $securePassword) # Define command array $commands = @( "cluster show", "set adv", "system node image show" ) # Try to connect to the ONTAP cluster try { # Creating an SSH Session $session = New-SSHSession -ComputerName $ONTAPHost -Credential $credential -ErrorAction Stop Write-Host "SSH session established successfully." # If the file already exists, clear the file contents if (Test-Path $OutputFile) { Clear-Content -Path $OutputFile } # Loop through the array of commands and execute them in turn foreach ($command in $commands) { Write-Host "`nExecuting command: $command" try { # Execute the current command and get the result $result = Invoke-SSHCommand -SessionId $session.SessionId -Command $command -ErrorAction Stop # Record the command execution to a file Add-Content -Path $OutputFile -Value "`n::> $command" # Output the result of the command if ($result.Output) { $result.Output -split "`n" | ForEach-Object { Add-Content -Path $OutputFile -Value $_ } } else { Add-Content -Path $OutputFile -Value "No output received for '$command'." } } catch { Write-Host "Error executing command: $command" Add-Content -Path $OutputFile -Value "Error executing command: $command - $_" } } } catch { Write-Host "Failed to establish SSH session or execute command: $_" Add-Content -Path $OutputFile -Value "Failed to establish SSH session or execute command: $_" exit } finally { # Make sure to close the SSH session at the end of the script if ($session) { Remove-SSHSession -SessionId $session.SessionId Write-Host "SSH session closed." } } outputfile ::> cluster show Last login time: 11/25/2024 16:21:20 Node Health Eligibility --------------------- ------- ------------ FAS2720-01 true true FAS2720-02 true true 2 entries were displayed. ::> set adv Last login time: 11/25/2024 16:22:14 ::> system node image show Last login time: 11/25/2024 16:22:14 Error: "image" is not a recognized command
... View more
I need to enable native audit at the volume level, not going to the share on windows -> properties-> Security and adding the SACL there as that will take long of time and fail if the user doesnt have permission over all folders and file. Is there any better way to enable SACL audit entries at the volume level from netapp cli? can you explain and post all command to enable audit and SACL on volume test per example?
... View more
In ONTAP ARP, the max snapshot copies is 8. What happens if arw.surge.snap.interval.days is set to 100 days. And there are multiple attacks, lets say, 100 attacks to same volume, how many ARP snapshots will be retained? If it is 8, then arw.surge.snap.interval.days is meanless. https://docs.netapp.com/us-en/ontap/anti-ransomware/modify-automatic-snapshot-options-task.html
... View more