Active IQ Unified Manager Discussions

OCUM 7.X create/configure alert through CLI or SDK/API

masson
4,910 Views

 Hello Community,

 

IHAC which need to create or configure OCUM Alert through API/SDK

Customer is using OCUM deployed as OVA and search for a way to manage Alert from API/SDK (not through GUI to summarize)

 

OCUM CLI with windows or RHEL version does not allow this too.

 

Is there any way to answer this customer request?

 

TIA

 

 

1 ACCEPTED SOLUTION

mbeattie
4,885 Views

Hi,

 

I checked the DFM 7.X API's in the NMSDK for you. There is no "alarm" API in OCUM as there was previously in DFM 5.X (The used to be an "AlarmCreate" method in DFM)

In OCUM 7.X there is a CLI available to manage alarms. Here's the output from OCUM 7.1P2 on Windows.

 

C:\>dfm cli login -u <%username%> -p <%password%>

C:\>dfm version
dfm 7.1P2

C:\>dfm alert create --help NAME create -- Create a new alert, triggered by particular events specified by the options. SYNOPSIS dfm alert create [ -C <event-class> ] [ -h <event-names>,... ] [ -v <event-severities>,... ] [ -l <time-from> ] [ -m <time-to> ] [ -i <repeat-interval> ] [ -b ] [ -S ] [ -A <admin-login-names>,... ] [ -r <resource-object-keys>,... ] [ -E <email-addresses>,... ] <alert-name> C:\>dfm alert --help NAME alert -- Create, modify, delete, test, and list alerts. COMMANDS dfm alert add - Adds fields to the Alert. dfm alert create - Create a new alert, triggered by particular events specified by the options. dfm alert delete - Delete fields from the Alert. dfm alert destroy - Remove the alert completely. dfm alert disable - Disable the alert. dfm alert enable - Enable the alert. dfm alert list - List the existing alerts. dfm alert modify - Change the settings for an alert. dfm alert test - Tests alert. DESCRIPTION The alert command manages the list of administrators who are interested in being alerted when different types of events occur.

I'd assume it's also possible with the OCUM vApp via SSH but you'd have to provide credentials to the dfm cli login command.

It might be possible via WFA with Invoke-NcSsh CmdLet and running multiple dfm commands within the powershell command.

I'd recommend raising a BURT\RFE to add the alert comand to the supported OCUM API's.

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

3 REPLIES 3

mbeattie
4,886 Views

Hi,

 

I checked the DFM 7.X API's in the NMSDK for you. There is no "alarm" API in OCUM as there was previously in DFM 5.X (The used to be an "AlarmCreate" method in DFM)

In OCUM 7.X there is a CLI available to manage alarms. Here's the output from OCUM 7.1P2 on Windows.

 

C:\>dfm cli login -u <%username%> -p <%password%>

C:\>dfm version
dfm 7.1P2

C:\>dfm alert create --help NAME create -- Create a new alert, triggered by particular events specified by the options. SYNOPSIS dfm alert create [ -C <event-class> ] [ -h <event-names>,... ] [ -v <event-severities>,... ] [ -l <time-from> ] [ -m <time-to> ] [ -i <repeat-interval> ] [ -b ] [ -S ] [ -A <admin-login-names>,... ] [ -r <resource-object-keys>,... ] [ -E <email-addresses>,... ] <alert-name> C:\>dfm alert --help NAME alert -- Create, modify, delete, test, and list alerts. COMMANDS dfm alert add - Adds fields to the Alert. dfm alert create - Create a new alert, triggered by particular events specified by the options. dfm alert delete - Delete fields from the Alert. dfm alert destroy - Remove the alert completely. dfm alert disable - Disable the alert. dfm alert enable - Enable the alert. dfm alert list - List the existing alerts. dfm alert modify - Change the settings for an alert. dfm alert test - Tests alert. DESCRIPTION The alert command manages the list of administrators who are interested in being alerted when different types of events occur.

I'd assume it's also possible with the OCUM vApp via SSH but you'd have to provide credentials to the dfm cli login command.

It might be possible via WFA with Invoke-NcSsh CmdLet and running multiple dfm commands within the powershell command.

I'd recommend raising a BURT\RFE to add the alert comand to the supported OCUM API's.

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

masson
4,862 Views

Hi Matt,

 

Thank you for this reply

 

I've search in every documentation available for OCUM 7.1 and found nothing about this CLI

I only found information arround "um" cli

Capture.PNG

 

Nothing about "dfm" CLI Smiley Sad

 

I've also read that CLI are only available for RHEL and Windows version not for OVA version

With OVA version when you rich the @IP through SSH, you get the maintenance menu only, or i miss something.

 

TIA

pizzle85
3,636 Views

I know this is an old thread but Im look for help with this command. Im a systems developer and have no experience or direct involvement with NetApp stuff. Im writing some code to automate the creation and management of SMB shares on a netapp array using our service portal software. Part of our process is to set up an alert for each share to notify the owner that the share is almost out of space. I found the dcm CLI and am trying to execute a create command. However when i try to add the resource object key to the CLI it fails with a  generic error:

 

dfm alert create -v "Warning" -h "Volume Space Nearly Full" -E email@work.com -r 2d8d7890-3a14-11e8-becb-00a098d3e52c:type=volume,uuid=5fc7b798-6a50-4eb6-bd21-86f031f62196 clitest3

 

Ive tried every variation of the resource object key i could think of, single quotes, double quotes, just the first part, just the last part, etc but nothing seems to work. DO you have any working examples of the command working?

 

If i run that same command without the -r section it creates the alert as expected with not resource attached.

 

Also, do you know what the -b and -S do?

Public