Example of a Dynamic Application of Type "Database Configuration"

Download this manual as a PDF file

In this section, we will walk through a Dynamic Application that monitors the performance of a MySQL database.

This section will walk you through the Dynamic Application MySQL:DBConfiguration. The MySQL:DBConfiguration Dynamic Application makes multiple queries to an internal table in MySQL. This internal table stores variables that contain configuration information for the MySQL server, such as MySQL version, the configuration of the auto-commit feature, the maximum allowed number of connections, and the sizes of various caches.

In this section, we have aligned the Dynamic Application with the Database Server. The Database Server uses a MySQL database.

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 ().

Defining the Basic Properties for the Dynamic Application

To create the container for this Dynamic Application and define its general properties, perform the following:

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 > Manage > Applications).
  2. Select the Actions button, and then select Create New Dynamic Application. The Dynamic Applications Create New Application page appears.
  3. Supply values in the following fields:
  • Application Name. Enter MySQL:DBConfiguration.
  • Application Type. The protocol SL1 will use and the type of data that will be collected. Select Database Configuration.
  • Version Number. Accept the default value. You can customize this value and increment it according to your change-management policies.
  • Operational State. Specifies whether SL1 will collect data from devices using this Dynamic Application. This field also specifies whether SL1 will automatically align this Dynamic Application to devices during discovery, re-discovery, and nightly auto-discovery. Select Enabled.
  • Poll Frequency. Frequency at which SL1 will poll devices that use this Dynamic Application. Select "Every 2 Minutes", so we can quickly view retrieved data in this example.
  • Abandon Collection. Accept the default value. Specifies how many collection objects must be unavailable before the Dynamic Application should stop trying to collect data and wait until the next scheduled collection session. Default specifies a threshold of two collection objects.

NOTE: For all objects except those retrieved from a database, the timeout limit is specified in the credential. For database objects, the timeout limit is specified internally by SL1.

  • Context. Leave this field blank.
  1. Select the Save button to save the Dynamic Application.

Defining the Discovery Object for the Dynamic Application

A discovery object is a type of collection object. If you want SL1 to automatically align devices with a Dynamic Application during discovery, you must include a discovery object in that Dynamic Application.

To create a discovery object for the Dynamic Application MySQL: DBConfiguration, we will write a query that will return a value only if MySQL is running on a device.

To create the discovery object:

  1. Go to the Dynamic Applications Manager page (System > Manage > Applications).
  2. Select the wrench icon ( ) for the Dynamic Application named MySQL:DB Configuration.
  3. Select the Collections tab. The Dynamic Applications | Collections Objects page appears.
  4. Supply values in the following fields:
  • Object Name. Enter Discovery Object.
  • SQL Query. This field specifies the query that SL1 will use to collect the discovery object. We will query a value that indicates that a MySQL database exists, regardless of the status of the data in the database. Enter the following query:

show global variables like 'version'

  • This query searches an internal table that stores configuration information about the MySQL database (show global variables).
  • The query retrieves the value of the status variable "version" (like 'version').
  • The variable "version" contains the version number and name of the MySQL server.
  • This query will return a value only if MySQL is installed on a device. This query is not dependent on the data stored in the database.
  • Class Type. Select [100] Discovery.
  1. Select the Save button to save the collection object and the page will change to appear as it does below. Because this collection object has been defined with a Class Type of [100] Discovery, SL1 displays additional fields that are specific to discovery objects.
  2. Enter values in the following fields:
  • Alignment Condition. Specifies how this discovery object should be evaluated. Select Align if OID is present. This choice tells SL1 to automatically align the Dynamic Application with each device that returns a value for the query in the SQL Query field.
  • Validity Check. Leave blank.

Defining the Collection Objects

This section will walk you through the creation of only six collection objects for the MySQL: DBConfiguration Dynamic Application.

In this section, we will create the following collection objects:

  • mysql_version. This collection object monitors the MySQL configuration variable version. This configuration variable contains the version number and version name of the MySQL software.
  • auto_commit. This collection object monitors the MySQL configuration variable autocommit. This configuration variable specifies whether the autocommit mode is enabled (set to 1). If autocommit is enabled, users do not have to commit each transaction. If autocommit is not enabled, users must either commit each transaction to save it to the database.
  • max_connections. This collection object monitors the MySQL configuration variable max_connections. This configuration variable specifies the maximum allowed number of client connections to the database.
  • key_cache_size. This collection object monitors the MySQL configuration variable key_buffer_size. This configuration variable specifies the size of the cache where index information is stored.
  • query_cache_size. This collection object monitors the MySQL configuration variable query_cache_size. This configuration variable specifies the size of the cache where query results are stored.
  • thead_cache_size. This collection object monitors the MySQL configuration variable thread_cache_size. This configuration variable specifies the number of threads that should be saved in the thread cache.

To create these collection objects, perform the following:

  1. Go to the Dynamic Applications Manager page (System > Manage > Applications).
  2. Select the wrench icon ( ) for the Dynamic Application named MySQL: DBConfiguration.
  3. Select the Collections tab. The Dynamic Applications | Collections Objects page appears.
  4. First, we will define the mysql_version collection object. This collection object monitors the MySQL configuration variable version. This configuration variable contains the version number and version name of the MySQL software.
  5. Supply values in the following fields:
  • Object Name. Enter MySQL_version.
  • SQL Query. Enter the following:

show global variables like 'version'

  • This query searches an internal table that stores configuration information about the MySQL database (show global variables).
  • The query retrieves the value of the status variable "version" (like 'version').
  • The variable "version" contains the version number and version name of the MySQL server.
  • Class Type. Select 10 Config Character. The returned value contains both numbers and letters.
  • Group Number. Select Group 1 and Standard. In the Configuration Report page, this collection object will appear in table 1.
  • Asset/Form Link. Leave these fields blank.
  • Inventory Link. Select Disabled.
  • Change Alerting. Select Disabled. SL1 will not trigger an event if the value of this collection object changes. Notice that we will enable this option for all other collection objects in this Dynamic Application. SL1 will then automatically generate events if the value of these collection objects change.
  • Table Alignment. Select Left. This specifies that column-values will be left justified and will not be translated from hexadecimal unicode.
  • Trended Column. Enter Value. The query for this collection object returns two columns: Variable_name, which contains the name of the variable (version) and Value, which contains the value of the variable. We are interested only in the value in the Value column and want that value to appear in the Configuration Report page.
  • Description. Leave blank.
  • Formula. Leave blank.
  1. Select the Save button to save the new collection object.
  1. For the remaining collection objects, enter the following and select the Save button for each collection object. If a field is not specified in this table, accept its default value.

Object Name

SQL Query

Class Type

Group Number

Change Alerting

Trended Column

auto_commit

show global variables like 'autocommit'

[15] Config Numeric

2 Enabled Value
max_connections show global variables like 'max_connections' [15] Config Numeric 2 Enabled Value
key_cache_size show global variables like 'key_buffer_size' [15] Config Numeric 3 Enabled Value
thread_cache_size show global variables like 'thread_cache_size' [15] Config Numeric 3 Enabled Value
query_cache_size show global variables like 'query_thread_size' [15] Config Numeric 3 Enabled Value

Creating a Credential for the MySQL:DBConfiguration Dynamic Application

If you want to align the MySQL:DBConfiguration Dynamic Application with SL1's MySQL database, you must create a database credential that allows access to SL1's MySQL database.

For details on creating a credential for SL1's MySQL database, see the previous section.

Aligning the Dynamic Application with a Device

For our example, we aligned the MySQL:DBConfiguration Dynamic Application with the Database Server.

There are three ways to align the MySQL:DBConfiguration Dynamic Application with a Device:

  • During initial discovery or nightly auto-discovery. Because the MySQL:DBConfiguration Dynamic Application includes a discovery object, SL1 can automatically align this Dynamic Application with devices during discovery. For details on discovery, see the section on Discovery.
  • Manual discovery for the Dynamic Application. Because the MySQL:DBConfiguration Dynamic Application includes a discovery object, SL1 can automatically align this Dynamic Application with devices. From the Dynamic Applications Manager page, you can manually execute discovery for all devices, but only for the MySQL:DBConfiguration Dynamic Application. For details on how to perform this type of discovery, see the section Dynamic Applications and Discovery.
  • Manually associate the Dynamic Application with an existing device. For details on how to perform this type of discovery, see the section on Managing Dynamic Applications.

This section will walk you through the steps to manually align the MySQL:DBConfiguration Dynamic Application with the Database Server or the All-In-One Appliance.

To manually align the Dynamic Application to the Database Server or the All-In-One Appliance:

  1. Go the Appliance Manager page (System > Settings > Appliances). Determine the device name of the Database Server or the All-In-One Appliance.
  2. Go to the Device Manager page (Devices > Classic Devices, or Registry > Devices > Device Manager in the classic SL1 user interface).
  3. Find the device where the database resides (either the Database Server or the All-In-One Appliance). Select the device's wrench icon ().
  4. The Device Properties page appears. Select the Collections tab.
  5. In the Dynamic Application Collections page, select the Action menu and select Add Dynamic Application.
  6. The Dynamic Application Alignment page appears. Select MySQL:DBConfiguration in the Dynamic Applications pane, and select EM7 DB in the Credentials pane.
  7. Select the Save button to add the Dynamic Application to the device.
  8. At the next polling period, SL1 should start collecting the data specified in the MySQL:DBConfiguration Dynamic Application from the device where SL1's database resides.

Viewing the Configuration Report for the Dynamic Application

For our example, we aligned the MySQL:DBConfiguration Dynamic Application with the Database Server on our device em7_ao.

SL1 automatically creates a Configuration Report on each device that is aligned with the Dynamic Application. The Configuration Report displays the latest data collected from the device by the Dynamic Application.

NOTE: For more details on the Configuration Report page and a description of the actions you can perform from the Configuration Report page, see the Viewing Configuration & Journal Data section.

To view the Configuration Report for the Dynamic Application:

  1. Go to the Device Manager page (Devices > Classic Devices, or Registry > Devices > Device Manager in the classic SL1 user interface).
  2. Find the device that you aligned with the Dynamic Application. (In our example, this device is em7_ao). Select its bar-graph icon ().
  3. Select the Configs tab. The Configuration Report page appears.
  4. In the NavBar, find the entry for the MySQL:DBConfiguration Dynamic Application and expand it.
  5. In the Configuration Report page, notice how the values are stored in tables as we specified in the Group field for each collection object. That is, mysql_version is displayed in the first table, auto_commit and max_connections are displayed in the second table, and key_cache_size, query_cache_size, and thread_cache_size are displayed in the third table.