Configuring LIC links
You can configure the bnz-lic-link.yaml file to add your own launch-in-context (LIC) links to all views of Z ChatOps bot response messages except four Z ChatOps commands: help, default, credential-store, and alias.
Procedure
-
Go to the Z ChatOps configuration directory.
- For container users:
- Go to the directory where you extract the IBM Z® ChatOps container archive.
- Run the following command to open an interactive shell on the IBM Z ChatOps container that is running.
./bnzContainer.sh shell - Go to the configuration directory.
cd config
Tip: If you are familiar with docker/podman commands, you can use the commands to open the interactive bash shell. You can also edit the configuration files directly in the mounted path of the zchatops-configuration-114 volume. - For native installation
users:
cd $ZCHATOPS_HOME/config
- For container users:
- Edit the LIC link configuration file bnz-lic-link.yaml.
# Licensed material - Property of IBM # © Copyright IBM Corporation 2023. # This file controls the LIC (launch in context) links configuration for all views of bot response message except # four Z ChatOps commands: help, default, credential-store and alias. # You can follow the two samples below to add your own LIC links to your target message view. # Example 1: Add a LIC link to an incident when it is sent from Z System Automation, thus users can navigate to # the "Explore Automation Domain" page of IBM Service Management Unite when they click the "Explore # Automation Domain" with a link added. # Note that JSONpath "$[?(@.reportedBy.product=="SA z/OS")].location.domainName}" is used to pick out # the domain name value from the incident view and pass it to the request parameter "SELECT_PATH_DOMAIN_TOPO0" # of the specified URL. The link is not shown when the picked out value is empty. # - messageView: incident # licLinks: # - url: https://localhost:16311/ibm/action/launch?pageID=com.ibm.eez.ui.navigationElement.DomainExplorer&IGN_DOM_AS_PARM=true&SELECT_PATH_DOMAIN_TOPO0={$[?(@.reportedBy.product=="SA z/OS")].location.domainName} # displayText: Explore Automation Domain # Example 2: Add a LIC link to all bot response message except JSON format response message of Z ChatOps automation # domain status command, thus users can navigate to "Explore Automation Domain" page of IBM Service # Management Unite when they click "Explore Automation Domain" with a link added. # Note that JSONpath "{$..name}" is used to pick out the domain name value from the status view and pass # it to the request parameter "SELECT_PATH_DOMAIN_TOPO0" of the specified URL. The link is not shown when # the picked out value is empty. # - messageView: ad list status # licLinks: # - url: https://localhost:16311/ibm/action/launch?pageID=com.ibm.eez.ui.navigationElement.DomainExplorer&IGN_DOM_AS_PARM=true&SELECT_PATH_DOMAIN_TOPO0={$..name} # displayText: Explore Automation Domain # Specify the target view of bot response messages where you want to add your own LIC (launch in context) links to # the "View in" field in the view. # Note: 1. The target view is indicated by Z ChatOps command in the format "c resource command action command object". # For example, "ad list status" refers to the list and detail view of the automation resource command output. # 2. You can specify the messageView as "incident" if you want to add your own LIC links to the "View in" field # of an incident that is sent to chat tool channels. # 3. You can also pick out some values from the target view using JSONPath and pass them to your own LIC links # as request parameters. # You must run related command with --json-format or --jf option to get the JSON format data of the view. # 4. You cannot add LIC links to all views of four Z ChatOps commands: help, default, credential-store, and alias. # - messageView: your command resource your command action your command object # # Specify all LIC links that you want to add to the "View in" field one by one # licLinks: # # Specify the URL of your LIC link # - url: The URL of your LIC link # # Specify the display text of your LIC link. The value is required and cannot be left empty. # displayText: The display text of your LIC link- messageView
- Specifies the target view of bot response messages where you want to add your own LIC (launch in
context) links to the View in field in the view.
- The target view is indicated by Z ChatOps command in the format of
command resource command action command object. For example,ad list statusrefers to the list and detail view of the automation resource command output. For more information about IBM Z ChatOps commands, see IBM Z ChatOps Commands.Note: LIC links can not be added to the commands@botname help,@botname default,@botname alias,@botname credential-store, and@botname command. - If you want to add your own LIC links to the View in field of an incident
that is sent to chat tool channels, you can specify the
messageViewasincident.
- The target view is indicated by Z ChatOps command in the format of
- url
- Specifies the URL of the LIC link that you want to add to the View in
field of the specified message view. You can also pick out some values from the specified message
view using JSONPath and pass them to the URL as request parameters. Note that the JSONPath
expression is used to evaluate each individual record within an array. You must run related command
with
--json-formator--jsoption to get the JSON format data of the view.You can refer to Getting bot response messages in JSON format for how to get a command response message in the JSON format and JSONPath documentation for more information about the rules of JSONPath.
- displayText
- Specifies the text that you want to display for the LIC link in the specified message view. This text is required and cannot be left empty.
- Run the bnzsvr restart command to restart Z ChatOps to make the changes take effect. For more information, see Starting and stopping Z ChatOps.