Example of a Dynamic Application with an Identity-Based Relationship

Download this manual as a PDF file

In this example, we will describe how to build a pair of Dynamic Applications that create relationships between Sciencelogic Database Servers and the Data Collectors and Message Collectors in the same system.

Use the following menu options to navigate the SL1 user interface:

  • To view a pop-out list of menu options, click the menu icon ().
  • To view a page containing all of the menu options, click the Advanced menu icon ().

Building Dynamic Applications with an Identity-Based Relationship

In this example, we will describe how to build a pair of Dynamic Applications that create relationships between Sciencelogic Database Servers and the Data Collectors and Message Collectors in the same system.

In this example, the data used to build the relationships is in the master.system_settings_licenses database table. This table contains information about SL1 Appliances, including the appliance type, name, IP address, etc. On a Database Server, this table contains a row for each appliance in the system. On a Data Collector or Message Collector, this table contains a row for only that Data Collector or Message Collector.

The following database fields are used in this example:

  • id. The automatically assigned ID number for the appliance. This will be combined with the host name of the appliance to create a unique identifier for the relationships.
  • name. The host name of the appliance configured in the System > Settings > Appliances page. This will be combined with the id of the appliance to create a unique identifier for the relationships.
  • function. The type of appliance. The appliance types are stored as integer values. This field contains 5 for Data Collectors and 6 for Message Collectors.

The following database query is used in this example:

SELECT CONCAT(CAST(id AS CHAR), name) as uid,

CASE

WHEN function=5 THEN "Data Collector"

WHEN function=6 THEN "Message Collector"

END as func

FROM master.system_settings_licenses

WHERE function IN (5,6);

This query returns two values:

  • uid. A string concatenation of the id and name fields. This will be used as the unique identifier for the relationships. This example assumes that this combination of fields is unique for all appliances in all SL1 systems.
  • func. A string representation of the appliance type. This will be used as the namespace for the relationships.

The query returns rows only for Data Collectors and Message Collectors.

Defining the Basic Properties for the Dynamic Application

To create the Dynamic Application that creates the identity, which will be aligned to Data Collectors and Message Collectors, perform the following steps:

NOTE: For details on each field and its possible options, see the section on Creating Dynamic Applications.

  1. Go to the Dynamic Applications Manager page (System > Settings > Appliances).
  2. Select the Actions button, and then select Create New Dynamic Application. The Dynamic Applications Create New Application page appears.

  1. Supply values in the following fields:
    • Application Name. Enter "ScienceLogic Collector Identity"
    • Application Type. Select Database Configuration.
    • Poll Frequency. To see data as quickly as possible, select Every 1 Minute in this field.
  2. This example does not have specific requirements for the other settings defined in this page. You can leave the remaining fields set to the default values. Select the Save button to save the Dynamic Application.

Defining the Collection Objects

To create the collection objects for the Dynamic Application that creates the identity:

NOTE: For more details on collection objects, see the section on Dynamic Application Development.

  1. Select the Collections tab. The Dynamic Applications | Collections Objects page appears.

  1. Supply values in the following fields to create the collection object for the relationship identifier:
    • Object Name. Enter ID.
    • SQL Query. Enter the database query for this example.
    • Group. The namespace and identifier collection objects must be in the same group. Select Group 1 in this field.
    • Usage Type. This collection object will collect the uid values from the database query, which are the identifiers for the relationships. Select Group Index in this field.
    • Trended Column. This collection object will collect the uid values from the database query. Enter "uid" in this field.
  2. Select the Save button to save the new collection object.
  3. Select the Reset button to clear the form fields.

  1. Supply values in the following fields to create the collection object for the relationship namespace:
    • Object Name. Enter Appliance Type.
    • SQL Query. Enter the database query for this example.
    • Group. The namespace and identifier collection objects must be in the same group. Select Group 1 in this field.
    • Usage Type. This collection object will collect the appliance function values from the database query, which are the namespaces for the relationships. Select Identity Namespace in this field.
    • Trended Column. This collection object will collect the appliance function values from the database query. Enter "func" in this field.
  2. Select the Save button to save the new collection object.

Creating the Dynamic Application that Creates the Relationship

Both Dynamic Applications in this example collect the same data with only minor configuration differences. Therefore, to create the Dynamic Application that creates the relationship, which will be aligned to Database Servers, you can create a copy of the ScienceLogic Collector Information Dynamic Application as the starting point. To create the Dynamic Application that creates the relationship, perform the following steps:

  1. Go to the Dynamic Applications Manager page (System > Settings > Appliances).
  2. Select the wrench icon () for the "ScienceLogic Collector Identity" Dynamic Application.

  1. Supply values in the following fields:
    • Application Name. Enter "ScienceLogic Collector Information"
  2. Select the Save As button to save the new Dynamic Application.
  3. Select the Collections tab. The Dynamic Applications | Collections Objects page appears.

  1. The difference between the collection objects in the identity-defining Dynamic Application (the previous Dynamic Application) and the relationship-defining Dynamic Application (this Dynamic Application) is the Usage Type setting for the namespace collection object. Select the wrench icon () for the Appliance Type object.
  2. In the Usage Type drop-down list, select Relationship Namespace.
  3. Select the Save button to save the collection object.

Aligning the Dynamic Applications

To align the example Dynamic Applications:

  1. Discover the Database Server, Data Collectors, and Message Collectors in a SL1 system.
  2. Additionally, you must add a firewall rule to the monitored Data Collectors and Message Collectors to allow connections on port 7707 from the All-In-One Appliance or Data Collector that is performing collection.
  3. Align the ScienceLogic Collector Information Dynamic Application with the Database Server and use the default Central Database credential. To do this:
  1. Go to the Device Manager page (Registry > Devices > Device Manager).
  1. Find the Database Server. Select its wrench icon ().
  2. Select the Collections tab.
  3. From the Actions menu, select Add Dynamic Application.
  4. In the Dynamic Application Alignment modal page, select the following:
  • Dynamic Applications. Select ScienceLogic Collector Information.
  • Credentials. Select EM7 Central Database. If the monitored Database Server does not use the default username and password, you must edit the credential to use the new username and password.
  1. Align the ScienceLogic Collector Identity Dynamic Application with the Data Collectors and Message Collectors and use the default Collector Database credential. To do this:
  2. Go to the Device Manager page (Registry > Devices > Device Manager).
  3. Find the Data Collector. Select its wrench icon ().
  4. Select the Collections tab.
  5. From the Actions menu, select Add Dynamic Application.
  6. In the Dynamic Application Alignment modal page, select the following:
  • Dynamic Applications. Select ScienceLogic Collector Identity.
  • Credentials. Select EM7 Central Database. If the monitored Database Server does not use the default username and password, you must edit the credential to use the new username and password.
  1. Repeat the bulleted steps for each Data Collector and Message Collector.

Viewing Dynamic Application Relationships

If the example Dynamic Applications are configured correctly and collection is successful, the relationships are displayed in the following places:

  • In the Topology tab in the Device Reports panel for the Database Server, Data Collectors, and Message Collectors:

  • In the Device Relationships page (Registry > Networks > Device Relationships):

  • In pages under the Views tab that display relationships between devices. For example, the Organizational Map page (Classic Maps > Device Maps > Organizational):