Integrating ST2


Configure custom action alarms through ST2 from the ExtremeCloud IQ Site Engine:

  1. In the Actions window, select the Add button
  2. Enter the custom action details.
  3. Select Save.
  4.   NOTE: Input parameters for pack name and action name are mandatory. Other parameters may also be required, depending on the action.

ExtremeCloud IQ Site Engine Framework Help Utility

The ExtremeCloud IQ Site Engine ST2Integration framework provides the python code for you to generate new ST2 Security Token and Application Key. You can also query ST@ rules, actions and packs, and action parameters at run time to figure out what actions, rules and packs are available for the ST2 and what the parameters are for the action.

See the following CLI examples:

cd /usr/local/Extreme_Networks/NetSight/ST2Integration

python ST2ApiUtils.py -h


Usage: ST2ApiUtils.py [options]

Options:

-h, --help Show this help message and exit
-t, --token Specify the option for generating ST2 token
-k, --apikey Specify the option for generating ST2 API key
-i, --st2info Specify the option for getting ST2 information for:

  • Rules or actions or packs:
    -l, --actionlist Specify the option for getting ST2 information

  • All Webhook actions:
    -a, --st2action Specify the option for getting Stackstorm information

  • A specific action:
    python ST2ApiUtils.py -t 10.177.216.101 st2admin extreme
    315acc13a47e4e928d212c80c874a473
    python ST2ApiUtils.py -k 10.177.216.101 st2admin bwc_12345
    NDY3ZjU2ODg4ZTYxMTFlMTMwM2U5MGUyNDBkM2Y0Y2QzNTUyYzRhZDlhZWZmNDcyMGFjM2E3NzNmZmMzMjExZA
    python ST2ApiUtils.py -i xmc <actions/rules/packs>

    Action/Rule/Pack information is returned and saved in the ../config/st2webhook_<actions/rules/packs>.json, file, depending on the input parameter.

python ST2ApiUtils.py -l xmc

Action list is returned for all action names and all parameters corresponding to the actions in the file ../config/ st2webhook_action_list.conf.

This list indicates the available actions and the manadatory parameters for creating a custom action to invoke ST2 Webhook:

  • [get_device_config]
  • deviceip
  • [ping_validation]
  • deviceip
  • message
  • severity
  • [remove_operator_limit_port]
  • deviceip
  • message
  • [restart_radius]
  • Deviceip
  • python ST2ApiUtils.py -a xmc restart_radius

Parameter list is returned for the action:

deviceip

StackStorm ExtremeCloud IQ Site Engine Pack

ExtremeCloud IQ Site Engine pack is installed on ST2 at /opt/stackstrom/packs/xmc as part of deployment.

Some actions generate an email message requesting status or device configuration information. To receive it, replace email address from default xmcsupport@extreme.com to your email address in the following files:

  • /opt/stackstorm/packs/xmc/actions/workflows/get_device_config.meta.yaml
  • /opt/stackstorm/packs/xmc/actions/workflows/ping_validation.meta.yaml
  NOTE: Actions/Workflows provided are examples and targeted only for a very specific switch as a proof of concept.

ST2 GUI

Once you login to the ST2 system, you can see history of executed actions and a list of actions and rules.

  1. Login https://<st2 integration Ip>/ with username “st2admin” and password “extreme."
  2. Select CONNECT.
  3. The ST2Admin window opens. Select the Actions button in the top ribbon.
  4. The left panel shows the pack name and list of actions that belong to that pack.
  5. Select an action.
  6. Input parameters in the right panel to run an action.
  7. Select the Rules button in the top ribbon.
  8. The left panel shows pack name and list of rules belong to that pack.
  9. Select one rule.
  10. Modify rule in the right panel.
  11. Select the History button in the top ribbon to review a history of the actions you select.


For information on related help topics: