Active IQ Unified Manager Discussions

How create OnCommand events

michaelalbers
5,193 Views

Hi all,

how can I create OnCommand events?

Is there a SDK or a tool that can create events from another server.

SnapCreator can do this but I have Scripts doing something an they should create the event for reporting.

Thanks all

Michael

1 ACCEPTED SOLUTION

michaelalbers
5,193 Views

Hi Amir,

thank you for advice.

I have now found a solution for my problem.

Within the netapp-manageability-sdk-5.0 I found the tool apitest.exe. With this tool I can create ZAPI call directed to OnCommand.

Syntax generating custom event:

apitest -t dfm host.domain.com username password event-generate event-name script:information-event source 1 event-message "SUCCESS: Backupscript xxx"

This way I can send from any system events to OnCommand. 🙂

Regards,

Michael

View solution in original post

3 REPLIES 3

amirm
5,193 Views

Hi Michael,

You can use "dfm event generate" CLI or NMSDK API "event-generate" to generate custom/built in events:

[root@oncommand ~]# dfm event generate help

 

NAME

    generate -- generate a particular user-defined event

 

SYNOPSIS

    dfm event generate [ -t <timestamp> ] <event-name> <source> [ <event-message> ]

 

DESCRIPTION

    This command is used to generate custom events. Script plugins can

    use the command to generate built-in script status events such as

    script:warning-event. This command cannot be used to generate other

    built-in events.

 

    timestamp: specifies the event generation time in

    YYYY-MM-DD,HH:MM:SS format.

    If not specified, the time when the command is invoked is used.

    event-name: specifies the name of the event.

    source: specifies ID/name of source object of the event.

    event-message: A message specific to this event.

    This message will be displayed as part of event details.

Regards,

-Amir

michaelalbers
5,194 Views

Hi Amir,

thank you for advice.

I have now found a solution for my problem.

Within the netapp-manageability-sdk-5.0 I found the tool apitest.exe. With this tool I can create ZAPI call directed to OnCommand.

Syntax generating custom event:

apitest -t dfm host.domain.com username password event-generate event-name script:information-event source 1 event-message "SUCCESS: Backupscript xxx"

This way I can send from any system events to OnCommand. 🙂

Regards,

Michael

amirm
5,193 Views

Hi Machael,

Good to know that you found the utility that fits your requirement.

Now that you have latest NMSDK 5.0 you may be also interested in knowing that NMSDK has improved ZAPI explorer through which not only you can execute and see the APIs for OnCommand and ONTAP but also create workflows using new ZExplorer Developer Interface(ZEDI) without actually writing a single line of code yourself! You can find ZEDI under <NMSDK_INTALL_PATH>\zedi\zexplore.

For demo on ZEDI and more please see https://communities.netapp.com/community/interfaces_and_tools/developer/zedi

Cheers,

-Amir

Public