Configuring Monitoring for SL1 PowerFlow

Download this manual as a PDF file

The following sections describe how to configure SL1 to monitor SL1PowerFlow using the "ScienceLogic: PowerFlow" PowerPack:

Creating a SOAP/XML Credential for PowerFlow

The "ScienceLogic: PowerFlow" PowerPack monitors the status of the applications in your PowerFlow system. Based on the events generated by this PowerPack, you can diagnose why applications failed in PowerFlow.

The "ScienceLogic: PowerFlow" PowerPack is the main PowerPack that you can use to monitor the critical health of a PowerFlow system.

To configure SL1 to monitor PowerFlow, you must first create a SOAP/XML credential. This credential allows the Dynamic Applications in the "ScienceLogic: PowerFlowPowerPack to communicate with PowerFlow.

In addition, before you can run the Dynamic Applications in the "ScienceLogic: PowerFlowPowerPack, you must manually align the Dynamic Applications from this PowerPack to your PowerFlow device in SL1. These steps are covered in detail below.

Configuring the PowerPack

To configure the PowerFlow PowerPack:

  1. In SL1, make sure that you have already installed the "Linux Base" PowerPack, the "Docker" PowerPack, and the "ScienceLogic: PowerFlow" PowerPack on your SL1 system.
  2. In SL1, navigate to the Credentials page (Manage > Credentials or System > Manage > Credentials in the classic user interface) and select the "ScienceLogicPowerFlow Example" SOAP/XML credential. The Edit Credential page appears.
  1. Complete the following fields, and keep the other fields at their default settings:
  • Name. Type a new name for the credential.
  • URL. Type the URL for your PowerFlow system.
  • HTTP Auth User. Type the PowerFlow administrator username.
  • HTTP Auth Password. Type the PowerFlow administrator password

If you upgrade the PowerPack to version 107, be sure to remove the "False" value in the Embed Value [%1] field. If this field has the "False" value populated, it will trigger a Snippet Framework error.

  1. Click the Save & Close button. You will use this new credential to manually align the following Dynamic Applications:
  • ScienceLogic: PowerFlow Queue Configuration
  • ScienceLogic: PowerFlow Workers Configuration

  1. Go to the Devices page, select the device representing your PowerFlow server, and click the Collections tab.
  2. Click Edit, click Align Dynamic Application, and select Choose Dynamic Application. The Choose Dynamic Application window appears.
  3. In the Search field, type the name of the first of the PowerFlow Dynamic Applications. Select the Dynamic Application and click Select.
  4. Select Choose Dynamic Application. The Choose Credential window appears.
  5. In the Search field, type the name of the credential you created in steps 2-4, select the new credential, and click Select. The Align Dynamic Application window appears.
  6. Click Align Dynamic App. The Dynamic Application is added to the Collections tab.
  7. Repeat steps 6-10 for each remaining Dynamic Application for this PowerPack, and click Save when you are done aligning Dynamic Applications.

Events Generated by the PowerPack

After you align the "ScienceLogic: PowerFlow Queue Configuration" Dynamic Application in SL1, that Dynamic Application will generate a Major event in SL1 if an application fails in PowerFlow:

The related event policy includes the name of the application, the Task ID, and the traceback of the failure. You can use the application name to identify the application that failed in PowerFlow. You can use the Task ID to determine the exact execution of the application that failed, which you can then use for debugging purposes.

To view more information about the execution of an application in PowerFlow, navigate to the relevant page in PowerFlow by formatting the URL in the following manner:

https://<PowerFlow_hostname>/integrations/<application_name>?runid=<task_id>

For example:

https://192.0.2.0/integrations/sync_credentials?runid=c7e157ae-5644-4161-a241-59516feeadec

Configuring the SSH Credential

To use the "ScienceLogic: PowerFlow Healthcheck Configuration" Dynamic Application, which provides data to the PowerFlow Control Tower page, you must use an SSH credential. This PowerPack includes a sample SSH credential you can customize for your PowerFlow system.

To configure the SSH credential:

  1. Go to the Credentials page (Manage > Credentials).
  2. Locate and select the "ScienceLogic: PowerFlow SSH" credential. The Edit Credential modal page appears.
  1. Complete the following fields, and keep the other fields at their default settings:
  • Name. Type a name for the credential.
  • Organizations. Select the organizations to which the credential will belong, or enable the All Organizations toggle to make the credential available to all organizations in SL1.
  • Timeout (milliseconds). Specify a timeout value between 2000 (2 seconds) and 30000 (30 seconds).
  • Hostname/IP. Type the IP address for the PowerFlow system. The default TCP port for SSH servers is 22.
  • Username. Type the username for the PowerFlow system.
  • Password. Type the password for the PowerFlow system.
  • Private Key (PEM Format). Type the SSH private key that you want SL1 to use, in PEM format. Use RSA private key type.

The private key can have a maximum of 64 characters per line. Therefore, you cannot use keys in the OpenSSH format, because that format uses 70 characters per line. When you attempt to save the credential, SL1 will validate that the private key entered is in the correct format. You will be able to save the credential only if the private key is correctly formatted.

For PEM Keys with a Passphrase, you can use the Password field to set the Passphrase. A passphrase is not required.

If a private key is needed, you must include the lines "BEGIN RSA PRIVATE KEY" and "END RSA PRIVATE KEY", in addition to all preceding and following dashes on those lines.

  1. Click the Save & Close button. You will use this new credential to manually align the "ScienceLogic: PowerFlow Healthcheck Configuration" Dynamic Application.

Aligning the Dynamic Applications in this PowerPack

Before you can run the Dynamic Applications in the ScienceLogic: PowerFlow PowerPack, you must manually align the Dynamic Application from the PowerPack to your PowerFlow device in SL1.

First, use the SOAP/XML credential you just created to manually align the following Dynamic Applications:

  • ScienceLogic: PowerFlow Queue Configuration
  • ScienceLogic: PowerFlow Workers Configuration

Next, use the SSH credential you just created to manually align the "ScienceLogic: PowerFlow Healthcheck Configuration" Dynamic Application.

If you are installing this PowerPack for the first time, you can use the "ScienceLogic: PowerFlow" Device Template from this PowerPack to quickly align all of the Dynamic Applications. For more information, see Aligning Dynamic Applications with the Device Template.

Manually Aligning the Dynamic Applications

If you are upgrading to version 106 of this PowerPack, you will need to manually align "ScienceLogic: Healthcheck Configuration" with the SSH Credential.

To align the Dynamic Applications in this PowerPack:

  1. Go to the Devices page and select the device representing your PowerFlow server. The Device Investigator page appears.
  2. Go to the Collections tab and click Edit.
  3. Click the Align Dynamic App button. The Align Dynamic Application window appears.
  4. Select Choose Dynamic Application. The Choose Dynamic Application window appears.
  5. In the Search field, search for the "ScienceLogic: PowerFlow Queue Configuration)" Dynamic Application.
  6. Select the Dynamic Application and click Select. The Align Dynamic Application window appears again.
  7. Click the check mark () next to Use Device SNMP Credential to de-select it, and then click Choose Credential. The Choose Credential window appears.
  8. In the Search field, type the name of the SOAP/XML credential you created previously, select the credential, and click Select. The Align Dynamic Application window appears again.
  9. Click the Align Dynamic App button. The Dynamic Application is added to the Collections tab.
  10. If you have not already aligned the "ScienceLogic: PowerFlow Workers Configuration" Dynamic Application, repeat steps 3-9.
  11. Finally, align the "ScienceLogic: PowerFlow Healthcheck Configuration" Dynamic Application with the "ScienceLogic: PowerFlow SSH" credential.
  12. Click Save.

The "Disable Object Maintenance" property was checked by default for each collection object of the "ScienceLogic: PowerFlow Queue Configuration)" Dynamic Application because when a healthy PowerFlow system does not have any data collected for the collection objects, it would stop collection and be disabled automatically without this checkbox selected.

Aligning Dynamic Applications with the Device Template

If you are installing this PowerPack for the first time, you can use the "ScienceLogic: PowerFlow" Device Template from this PowerPack to quickly align all of the Dynamic Applications.

To use the Device Template to align the Dynamic Applications:

  1. On the Device Manager page (Devices > Device Manager), locate the PowerFlow Virtual Device, and click the Edit icon (). The Device Properties modal appears.
  2. On the Collections tab, click the Actions button and select Add Dynamic Application. The Dynamic Application modal appears.
  3. Select the "ScienceLogic: PowerFlow Healthcheck Configuration" Dynamic Application, select the previously saved PowerFlow SSH credential, and then click Save. The Dynamic Application is now aligned to the device.
  4. Click the Actions button and select Add Dynamic Application.
  5. Select the "ScienceLogic: PowerFlow Queue Configuration" Dynamic Application, select the existing PowerFlow SOAP/XML credential, and then click Save.
  6. Repeat step 5 for the "ScienceLogicPowerFlow Workers Configuration" Dynamic Application.
  7. Click Save and close the Device Properties modal.

Configuring the ScienceLogicPowerFlow Queue Configuration Dynamic Application

The "ScienceLogicPowerFlow Queue Configuration" Dynamic Application has a poll frequency of 15 minutes by default, and the time stamp check for start and end date of the API call is set in the "Queue Config" snippet. Because of this, if you change the poll frequency for this Dynamic Application, you must also change the value in the "Queue Config" snippet so that the timestamp for "Start" in API calls matches the last polling time.

To change the value in the snippet code:

  1. Go to the Dynamic Applications Manager page (System > Manage > Applications).
  2. Type "ScienceLogicPowerFlow Queue Configuration" in the Dynamic Application Name column.
  3. Click the wrench icon () and then select the Snippets tab. The Snippet Editor & Registry page appears.
  4. Click the wrench icon () next to Queue Config.

  5. Look for 'START_TIME': int(time.time() - (15*60)), and change 15 to the new poll frequency value.

  6. Click the Save button.

Configuring the "ScienceLogic: PowerFlow Healthcheck Configuration" Dynamic Application

The following default powerflowcontrol (pfctl) command is configured in the "Sciencelogic: PowerFlow Healtcheck Configuration" Dynamic Application:

pfctl --config "/tmp/creds.yaml" --json cluster-action --action healthcheck

You must have Read permissions for the creds.yaml file.

The healthcheck action executes various commands to verify configurations, proxies, internal connectivity, queue cluster, database cluster, indexes, NTP settings, Docker versions on all clusters, and more. Any previously reported troubleshooting issues are addressed with the healthcheck action.

The "Data Collection: SSH Collector" process must be configured with its Operating State as "disabled". If this process is enabled, the "ScienceLogic: PowerFlow Healthcheck Configuration" Dynamic Application will not be able to collect data.

Running this pfctrl command with the --json command might take a long time to return an output. If you do not see data collected, change the timeout settings in the PowerFlow SSH credential to more than 30 seconds.

Some "ScienceLogic: PowerFlow Healthcheck" Events might display as duplicates because of the way that the Healthcheck Configuration data is collected, and because of the way that the healthcheck action sends information to SL1.

Adding Credential Information Before Running the Dynamic Application

Before you can use the "ScienceLogic: PowerFlow Healthcheck Configuration" Dynamic Application, you must add credential information to a /tmp/creds.yaml file in the node running the Dynamic Application.

For example, if your PowerFlow system uses a three-node configuration, the creds.yaml file must contain credential information in the following format (this example displays the three different credential configurations you can use):

hosts:

10.2.11.101:

user: useradmin

password: passw0rd123

key_file: /Users/fred.jones/test_ca/user

passphrase: passphrase456

10.2.11.102:

user: useradmin

key_file: /Users/fred.jones/Code/Python/IS4/is_servicecontrol/testkey

10.2.11.103:

user: useradmin

password: passw0rd123

Moving the creds.yaml File

If you place the creds.yaml file in a path other than a /tmp/creds.yaml file, you must update the path in the Snippet Arguments field of the "Health" collection object:

  1. On  the Dynamic Applications page (System > Manage > Dynamic Applications), Locate the "ScienceLogic: PowerFlow Healthcheck Configuration" Dynamic Application, and then click its wrench icon ().

  2. Go to the Collections tab.

  3. Locate the "Health" collection object, and then click its wrench icon (). The fields at the top of the modal are updated with details about that object.

  4. In the Snippet Arguments field, replace the path in the command to use the new path. For example:

    {"id":"health", "post_proc":["parser_pfctl"]}|||pfctl --config "/home/creds.yaml" --json cluster-action --action healthcheck

Running the pfctl Command Without a creds.yaml File

Alternately, you can enter the credentials details directly into the pfctl command, and you will not need a creds.yaml file.

This credential option is insecure and should be used only for debugging purposes. Logging produced during execution of the Dynamic Application includes the SSH command invocation. Because of this, credentials provided directly in the command will also be visible in the log output.

The following command shows the format for this situation:

pfctl --host <host> <username>:<password> --host <host> <username>:<password> --host <host> <username>:<password> --json cluster-action --action healthcheck

The following example shows what the command looks like when you replace the fields in <brackets>, above, with actual values:

pfctl --host 10.2.11.101 useradmin:passw0rd123 --host 10.2.11.102 useradmin:passw0rd123 --host 10.2.11.103 useradmin:passw0rd123 --json cluster-action --action healthcheck