Diagnostic Tools

Download this manual as a PDF file

This section describes some diagnostic tools for troubleshooting and diagnosing problems in Skylar One (formerly SL1).

Use the following menu options to navigate the Skylar One user interface:

Viewing Information About ScienceLogic Processes

The Process Manager page allows you to view a list of ScienceLogic processes and optionally define parameters for those processes. These processes gather, manipulate, and publish the data used in Skylar One.

ScienceLogic recommends that you do not edit the values in this page without first consulting ScienceLogic. Incorrect values can severely disrupt ScienceLogic platform operations.

ScienceLogic processes fall into three scheduling categories or Frequencies:

Skylar One performs many tasks in parallel:

Viewing the List of ScienceLogic Processes

To view the list of process in the Process Manager page:

  1. Go to the Process Manager page (System > Settings > Admin Processes).
  2. The Process Manager page displays information about each ScienceLogic process. The Process Manager page displays the following for each process:

number of tasks a process is responsible for completing/Batch Factor = number of child processes that will be spawned

NOTE: Batch Factor defines the maximum number of worker processes or child processes. This value has precedence over the value specified in dynamic_collect_num_request_workers.

(Frequency * Time Factor) + Frequency = Run Length

For example, suppose a process runs every 15 minutes (as specified in the Frequency field). A Time Factor of 2 means the process is allowed to run for 45 minutes. A Time Factor of 0 means the process is allowed to run for 15 minutes.

Debugging a Process and Viewing Debug Logs

When you debug a process, you tell Skylar One to use verbose logging for that process. You can then view Skylar One log file to view the logs.

There might be circumstances where you have narrowed down a problem to a specific ScienceLogic process (for example, based on an error message or event). When this happens, you might find it helpful to turn on debugging for that process and view the debug logs.

ScienceLogic recommends that you enable the debug option only while troubleshooting a problem while working with ScienceLogic Support or while following a troubleshooting guide, and that you then immediately turn off debugging when you have completed troubleshooting. Do not leave the debug option enabled during normal operation of Skylar One. When you turn on debugging, Skylar One will run significantly more slowly.

You cannot enable debug mode for the "Message Collection: SNMP Trap" or "Message Collection: Syslog" processes.

To enable the debug option for a process:

  1. In the Process Manager page, find the process you want to edit. Select its wrench icon ().
  2. The Process Editor page appears and is populated with values for the selected process.
  3. Edit the following field:
  1. Click the Save button in the Process Editor page.
  2. Log in to the console of the appliance where the process is running. Alternately, you can use SSH to open a shell session on the appliance. Log in as em7admin with the appropriate password.

TIP: To view a list of IP addresses for all appliances in your system, go to the Appliance Manager page (System > Settings > Appliances).

  1. If the process you are debugging is a process that has a Frequency of Always, you must restart the process to make it pick up the new debug status (enabled). To restart the process, enter the following at the shell prompt:

sudo service process_name restart

For example, if you were debugging the process for the event engine, you would enter:

sudo service em7_event restart

  1. Navigate to the directory /var/log/em7. View the file silo.log. The most recent entries will be posted at the end of the file.
  2. After you have finished troubleshooting the process, remember to disable debugging. If the process has a Frequency of Always, you must restart the process to make it pick up the new debug status (disabled).

Viewing Information About Unhandled Exceptions

An exception specifies that something happened "out of the norm" that is preventing the software from executing the next step. Exceptions are a specific type of error, usually the result of invalid input, missing input, or a network error that prevents communication between software modules. For most exceptions, Skylar One will handle the exception by logging a specific error in the System Logs and will continue to run the process. However, if the platform does not handle the exception, the process will stop running, and Skylar One will generate an error message describing the unhandled exception.

Viewing the List of Unhandled Exceptions

To view the list of unhandled exceptions for all appliances:

  1. Go to the Unhandled Exceptions page (System > Monitor > Unhandled Exceptions).
  2. The Unhandled Exceptions page displays the following for each unhandled exception:

Viewing the Output of the System Status Script

For each Database Server, Data Collector, and Message Collector, you can view the output of the system status script for that appliance. To do this:

  1. Go to the Appliance Manager page (System > Settings > Appliances).
  2. Locate the Database Server, Data Collector, or Message Collector that you want to view diagnostic information about.
  3. Click on its magnifying-glass icon () to view the output of the system status script for that appliance.

Viewing the Database Tables on the Database Server

In some circumstances, you might need to view the contents of the database tables (the permanent tables are stored on the Database Server). There are two ways to do this:

Accessing the Database Tool

The Database Tool page allows administrators to view information about the internal ScienceLogic databases and run SQL queries against those internal databases.

The Database Tool page is available only in versions of Skylar One prior to 12.2.1 and displays only for users that have sufficient permissions to access the page.

CAUTION: Contact ScienceLogic for details on using the Database Tool page and troubleshooting databases. Do not make changes to the database or run the Optimizer Tool without guidance from ScienceLogic.

To access the database tool:

  1. Go to the Database Tool page (System > Tools > DB Tool).
  2. To run an SQL query from the Database Tool page, enter values in the following fields:

NOTE: You must be familiar with SQL and know how to build a proper query before using the Database Tool page.

  1. Click the Go button to execute the query.
  2. The results from the query are displayed in the pane at the bottom of the page.
  3. To view the reports about the a database(s), click the Actions menu. The following options are available:

Contact ScienceLogic for details on using the Database Optimizer Tool page. Do not run the Optimizer Tool without guidance from ScienceLogic.

Disabling Normalization, Re-Enabling Normalization, and Backfilling Raw Data

ScienceLogic does not recommend stopping normalization on Data Collectors. However, there are rare occasions where ScienceLogic Customer Support might ask you to disable normalization as part of troubleshooting.

To disable normalization:

  1. Either go to the console of the Database Server or use SSH to access the Database Server.

  2. Log in as user em7admin with the appropriate password.

  3. Type the following at the command line:

    sudo visilo

    This is the file where users can customize the silo.conf file. In step #6, you will execute a command that sends these changes to the system silo.conf file.

  1. In the LOCAL section, add the following line:

    rollups_disabled=ON

  2. Save your changes and exit the file (:wq).
  3. Restart the data collection process to ensure they receive the change. Type the following at the command line:

    sudo service em7_hfpulld restart

    sudo service em7_lfpulld restart

    sudo service em7_mfpulld restart

To re-enable normalization and normalize data that was collected while normalization was disabled:

  1. Either go to the console of the Database Server or use SSH to access the Database Server.
  2. Log in as user em7admin with the appropriate password.
  3. Type the following at the command line:

    sudo visilo

  4. In the LOCAL section, add the following line:

    rollups_disabled=OFF

  5. Save your changes and exit the file (:wq).
  6. Restart the data collection process to ensure collectors receive the change. Type the following at the command line:

    sudo service em7_hfpulld restart

    sudo service em7_lfpulld restart

    sudo service em7_mfpulld restart

  7. At the command line, type the following to normalize the data that was collected while normalization was disabled:

    [/opt/em7/backend/data_normalizer_backfill.py --database, <database> --dids <[device IDs]> --start <start date> --end <end date> --workers <number of workers>

NOTE: To get help, at the shell prompt, type "/opt/em7/backend/data_normalizer_backfill.py -h".

where:

For example:

python /opt/em7/backend/data_normalizer_backfill.py --database dynamic_app_data_16 --start '2017-10-01 00:00:00' --end '2017-10-10 00:00:00' --workers 10

This command normalizes raw data collected by the Dynamic Application with an application ID of 16, associated with all subscriber devices (no device IDs specified, so defaults to "all devices"), and that was collected between midnight on October 1, 2017 and midnight on October 10, 2017. The data_normalizer_backfill.py code uses ten worker processes to perform the normalization.

Enable Logging for Data Pull Storage Objects

To investigate missed polls or slow database queries, you can temporarily enable logging for data pull storage objects. After you complete the diagnostics, you must disable logging for data pull storage objects, because the logging can affect the performance of data pull.

Enable

To enable logging for data pull storage objects:

  1. Either go to the console of the Database Server or use SSH to access the Database Server.
  2. Log in as an administrator.
  3. At the shell prompt, enter the following:

    sudo visilo

  4. In the silo.conf file, add the following lines:

    [DATAPULL]

    log_storage_object_stats = 1

  5. Save your changes to the file (:wq).
  6. You must restart the data collection processes to ensure they receive the change. To do this, enter the following at the shell prompt:

    sudo service em7_hfpulld restart

    sudo service em7_lfpulld restart

    sudo service em7_mfpulld restart

Disable

When you have completed your diagnostics, disable logging for data pull storage objects. To do this:

  1. Either go to the console of the Database Server or use SSH to access the Database Server.
  2. Log in as an administrator.
  3. At the shell prompt, enter the following:

    sudo visilo

  4. In the silo.conf file, edit the following:

    [DATAPULL]

    log_storage_object_stats = 0

  5. Save your changes to the file (:wq).
  6. You must restart the data collection processes to ensure they receive the change. To do this, enter the following at the shell prompt:

    sudo service em7_hfpulld restart

    sudo service em7_lfpulld restart

    sudo service em7_mfpulld restart

Controlling Developer Log Settings

In rare cases, you may need to modify log levels or suppression of certain logs in Skylar One, usually at the request of ScienceLogic Customer Support. To do so, you can use the following pages:

Both of these pages are helpful for debugging and troubleshooting issues in Skylar One.

This section describes the options included on the Skylar One Developer Logs and PHP Developer Logs pages.

These pages are available only for Administrator-level users in Skylar One.

Generating Developer Logs for the Default User Interface (AP2)

You can configure developer log settings for the default user interface (AP2) from the Skylar One Developer Logs page (System > Tools > Skylar One Developer Logs) and then generate logs filtered based on your configuration.

This page is only available for Administrator-level users in Skylar One.

To generate developer logs for the default user interface (AP2):

  1. Go to the Skylar One Developer Logs page (System > Tools > Skylar One Developer Logs).

  2. In the Log Levels field, select the maximum log level you want to capture. In order of severity, your options are: 

    • Error

    • Warning

    • Info

    • Debug

    • Trace

    • Log

    When you select a maximum log level, the log will capture messages of that severity level and higher. For example, if you select Info, the log will include messages with severities of Info, Warning, and Error.

  3. In the Capture log for the field, select the log duration. This field determines the length of time during which the log info will be captured. Your options range from next 1 minute to next 24 hours.

  4. Click Capture Log. The log will appear in the Completed Logs pane, along with its status and other information.

  5. When the log file has finished compiling, you can click its hyperlink in the Completed Logs pane to download it. The completed log file includes a version of the /var/log/sl1/nextui.log file, with the contents filtered based on the selections you made on the Skylar One Developer Logs page.

Log files are automatically deleted 24 hours after they are created.

Generating Developer Logs for the Classic User Interface

You can configure developer log settings for the default user interface (AP2) from the PHP Developer Logs page (System > Tools > PHP Developer Logs) and then generate logs filtered based on your configuration.

This page is only available for Administrator-level users in Skylar One.

To generate developer logs for the classic user interface:

  1. Go to the PHP Developer Logs page (System > Tools > PHP Developer Logs).

  2. In the UI Developer Log Levels section, select the types of messages that you want written to the user interface log file (em7php.log). Each type of message has an associated number; the log level is the sum of all enabled messages. The numbers and associated message types are:

    • 1. Critical

    • 2. Error

    • 4. Warning

    • 8. Info

    • 16. Debug

    • 32. Trace

    To determine the log level, sum the numbers associated with each type of message you want to enable. For example, if you want to enable Critical, Error, and Warning messages, then you would sum one, two, and four to get a log level value of seven.

  3. In the UI/REST MySQL Query Log Levels section, select the types of messages you want written to the mysqli.log file. This log file collects every PHP-based call to MySQL and includes general information about the query. Determine the granularity of data you want by selecting one or more of the following checkboxes:

    • Error

    • Warning

    • Info (non-error)

    • Request URI (if you want the mysqli.log file to include the request uniform resource identifier)

  4. In the Advanced Settings section, configure the suppressions and the date/time format you want to use by editing the following fields:

    • Suppression List. This list acts as a bitmask to log entries. For example, to suppress all entries for css-em7, you would enter "css.em7::127", where 127 is the sum of all possible log levels. You can specify multiple suppressions in the list, separated by commas.

    • Datetime Format. Specifies a user-defined date format that will be used for system logs. You can use any date variables supported by the PHP date function in this field.

      Seconds and milliseconds are always appended to the date/time stamp.

    • Include IP in log filenames. Select this option to add the IP address from which the user is logged in to the name of each log file.

  5. In the Set Log Config field, enter a length of time (in minutes) during which the log info will be captured.

  6. Click Set Log Config to confirm your log configuration settings.

  7. To download a log file, click the name of the log you want to download under Download Logs.