#AIQUM alert custom script cannot get cluster info?

1 messages · Page 1 of 1 (latest)

fair willow
#

I add a custom shell script to the alert setup,
from the email that I get, I can see there are cluster FQDN and cluster name information,
But from the alert script attributes, I can get only svm and vol name, how can I get the cluster info from the script?

rocky fern
#

This may require a RFE or customization of your script.
https://docs.netapp.com/us-en/active-iq-unified-manager/events/concept_how_scripts_work_with_alerts.html#example-for-obtaining-arguments-from-scripts
The arguments that can be retrieved are the event source id and event source name. The source of an event may not be the cluster so it may only print out the child object.

You can retrieve the cluster via um cli(You do have to log into the um cli)

The example below is for a volume but the source object type may vary depending on the event.

root@UnifiedManager:~# um volume list -volume 222235
Volume ID Volume Name Volume SnapLockType


222235 test non_snaplock

root@UnifiedManager:~# um cluster list help

NAME
list -- lists managed clusters.

SYNOPSIS
um cluster list [-q] [-ObjectType <objectId>]

DESCRIPTION
The "cluster list" command lists the clusters.
[-q] --Lists the clusters without headers.
[-ObjectType <objectId>] -- Lists the clusters after filtering on the specified object.
ObjectType can be disk, aggr, node, cluster, lun, qtree, volume, quota, svm. Refer to the example section for details.

EXAMPLE
um cluster list -aggr 1
In this example, "-aggr" is the objectType and "1" is the objectId.
The command lists the cluster to which the aggregate with ID 1 belongs.

So

um cluster list -volume 222235

Cluster ID Name Hostname or IP Address DatasourceID Last Refresh Time


222001 cluster1 <ip here> 40 Tue Nov 14 12:11:35 EST 2023