This
Creating and Aligning a Configuration Object in PowerFlow
A configuration object supplies the login credentials and other required information needed to execute the steps for a PowerFlow application. The Configurations page () of the PowerFlow user interface lists all available configuration objects for that system.
You can create as many configuration objects as you need. A PowerFlow application can only use one configuration object at a time, but you can use (or "align") the same configuration object with multiple applications.
To use this SyncPack, you will need to use an existing configuration object in the PowerFlow user interface or create a new configuration object. Next, you need to align that configuration object to the relevant applications.
Creating a Configuration Object
For this SyncPack, you can make a copy of the "Opsgenie Config" configuration object, which is the sample configuration file that was installed with the OpsgenieSyncPack.
The "Opsgenie Config" configuration object contains all of the required variables. Simply update the variables from that object to match your SL1 and Opsgenie settings.
To create a configuration object based on the "Opsgenie Config" configuration object:
- In the PowerFlow user interface, go to the Configurations page ().
- Click the Edit. The Configuration pane appears: button () for the "Opsgenie Config" configuration object and select
-
Click Create Configuration pane appears.
. The -
Complete the following fields:
- Friendly Name. Name of the configuration object that will display on the Configurations page.
- Description. A brief description of the configuration object.
- Author. User or organization that created the configuration object.
- Version. Version of the configuration object.
-
In the Configuration Data field, update the default variable definitions to match your PowerFlow configuration:
- opsgenie_api_key. The API key for the Opsgenie Team that you want to send alerts to.
- opsgenie_univ_api_key. The universal API key for Opsgenie.
- proxy_host. The hostname or IP address of the HTTP proxy that will be used when making an API request to Opsgenie.
- proxy_protocol. The protocol of the HTTP proxy. Enter either 'HTTP' or 'HTTPS'.
- proxy_user. The username for your associated HTTP proxy.
- proxy_password.The password for your associated HTTP proxy.
- sl1_host. The hostname or IP address of the SL1 system the alerts will synchronize to.
- sl1_user. The username for your SL1 system.
- sl1_password. The password for your SL1 system.
- schedule_name. The name of the on-call schedule on Opsgenie to query when collection the current on-call user(s).
- maintenance_description. The description of your Opsgenie maintenance.
- maintenance_policy_id. The ID of your Opsgenie maintenance.
- maintenance_time_length. The time configuration of your Opsgenie maintenance.
- maintenance_state. The state rule defined in maintenance.
- device_id. The SL1 device ID that the Opsgenie Heartbeat application will use when sending alerts. Typically, this is a device that represents the Opsgenie service.
- heartbeat_name. The name of your Heartbeat URL.
- opsgenie_base_url. The base URL of the Alert Rest API.
- opsgenie_private_instance_url. The URL to use for links to the Opsgenie user interface. Enter the base URL you navigate to. This URL will be displayed in SL1 and will open your Opsgenie instance in a browser.
- resolve_from_org. The option to resolve events from Opsgenie
- default_ack_user. The default user to acknowledge events and alerts.
- populate_external_url. The option to add an Opsgenie incident URL to the corresponding SL1 event.
You can generate an API key for SL1 to use in the Integrations page of the Opsgenie Teams user interface.
For information on adding an API key in Opsgenie, see https://support.atlassian.com/opsgenie/docs/api-key-management/.
- Click . You can now align this configuration object with one or more applications.
Aligning a Configuration Object and Configuring PowerFlow Applications
With this SyncPack, any status changes made to an SL1 event is sent to Opsgenie to update the corresponding alert. Any status changes to the Opsgenie alert are synced back to the corresponding SL1 event. You will need to align the Opsgenie applications with the relevant configuration object in PowerFlow, and, if needed, update any other fields on the Configuration pane for the applications.
To run this SyncPack, you must "align" the configuration object to run with the following PowerFlow applications:
- "Bulk Clear SL1 Events"
- "Create Opsgenie Maintenance"
- "Get Oncall Details From Opsgenie and Send to SL1"
- "Opsgenie Heartbeat"
- "Pass Acknowledgment details from Opsgenie to SL1"
- "Close Opsgenie Alert"
- "Save Accounts To Cache"
- "Create Alert in Opsgenie from a received SL1 event"
To align the configuration object with the relevant PowerFlow applications:
-
On the Applications page of the PowerFlow user interface, open one of the PowerFlow applications listed above and click (). The Configurations pane for that application appears:
-
From the Configurations drop-down, select the configuration object you want to use.
The values for proxy_host and the other parameters that appear in the Configuration pane with a padlock icon () are populated either by the configuration object you aligned with the application or by the Run Book Action. Do not modify these values. If you encounter an error, make sure your Run Book Action is configured properly.
- Click to align that configuration with the application.
- Wait until you see the "App & Config modifications saved" pop-up message before proceeding.
- Repeat this process for the other PowerFlow applications.
Scheduling PowerFlow Applications
You can create one or more schedules for a single application in the PowerFlow user interface. When creating each schedule, you can specify the queue and the configuration file for that application.
To trigger some applications in this SyncPack, you must schedule the application. If you want to use the following applications, you must schedule the application:
PowerFlow Application | Recommended Schedule Time |
---|---|
Bulk Clear SL1 | Every minute |
Opsgenie Heartbeat | Every 5 minutes |
Pass Acknowledged Alerts from Opsgenie to SL1 | Every minute |
Save Accounts To Cache | Every hour |
To schedule an application:
-
On the Applications page (), click the button for the application you want to schedule. The Schedule window appears, displaying any existing schedules for that application:
If you set up a schedule using a cron expression, the details of that schedule display in a more readable format in this list. For example, if you set up a cron expression of */4 * * * *, the schedule on this window includes the cron expression along with an explanation of that expression: "Every 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, and 56th minute past every hour".
- Select a schedule from the list to view the details for that schedule.
-
Click the + icon to create a schedule. A blank Schedule window appears:
- In the Schedule window, complete the following fields:
- Schedule Name. Type a name for the schedule.
- Switch to. Use this toggle to switch between a cron expression and setting the frequency in seconds.
- Cron expression. Select this option to schedule the application using a cron expression. If you select this option, you can create complicated schedules based on minutes, hours, the day of the month, the month, and the day of the week. As you update the cron expression, the Schedule window displays the results of the expression in more readable language, such as Expression: "Every 0 and 30th minute past every hour on the 1 and 31st of every month", based on */30 * * /30 * *.
- Frequency in seconds. Type the number of seconds per interval that you want to run the application.
- Custom Parameters. Type any JSON parameters you want to use for this schedule, such as information about a configuration file or mappings.
-
Click Schedule window. Also, on the Applications page, the word "Scheduled" appears in the Scheduled column for this application, and the button contains a check mark:
. The schedule is added to the list of schedules on the initial
After you create a schedule, it continues to run until you delete it. Also, you cannot edit an existing schedule, but you can delete it and create a similar schedule if needed.
To view or delete an existing schedule:
- On the Applications page, click the button for the application that contains a schedule you want to delete. The Schedule window appears.
- To delete the selected schedule, click . The schedule is removed.
When either multiple SL1 instance or multiple Opsgenie instances are involved with PowerFlow, you should create an individual configuration object for each SL1 or Opsgenie instance. Next, create an individual schedule for each configuration object. Each schedule should use a configuration object that is specific to that single SL1 or Opsgenie instance. Creating copies of a PowerFlow application from a SyncPack for the purpose of distinguishing between domains is not supported, and will result in issues on upgrades.