Zoomdata Version

Activity Logging

The Zoomdata Server records user and server-based activities in log files. These files can be used by Zoomdata administrators to troubleshoot issues that may occur with the Zoomdata Server, for example, activities related to setting up data sources or creating charts and dashboards. By default, when Zoomdata is installed in your network environment, a log file is created. However, this file is not automatically enabled for activity logging. You need to manually enable the logging of activities once Zoomdata is deployed in your environment.

To manage logging for your environment, see the following:

Logging Options

See the table below for the activity logging options available to you:

Activity Logging Options in Zoomdata:
Default logging location: /opt/zoomdata/logs/zoomdata-activity.log

Activity logging is enabled in two stages:

  1. Enabling the target storage location(s): By default, the log file is created when the Zoomdata Server is installed.
  2. Enabling and assigning the activities to be logged in the storage media. By default, not all activities are enabled. You can manually enable these activites.

For a list of the activities that can be logged, refer to thisReference Sheet , which also identifies the activities enabled by default and activites that needs to be manually enabled.

Default Configurations for the Log File

The log file is created with the following parameters:

  • By default, the log file is stored in /opt/zoomdata/logs
  • The default size for the log file set by Zoomdata is 10MB.
  • Only one log file is active at any given time. When the max allowable size is reached, the file is archived and a new one is created to continue the logging process.

Changing the default Configurations for The Active log file

Zoomdata Administrators with ' Supervisor ' credentials are able to edit the default configurations for the log file. Keep in mind that changes to the default configurations can only be applied to the current, active Log file. Archived Log files are not changed.

To edit the default configuration:

  1. Log out of Zoomdata and close the browser.
  2. From your terminal, SSH to your Zoomdata Server .
  3. Stop the Zoomdata service.
    For the appropriate Linux command line (for CentOS v6, v7 or Ubuntu v14, v16) , refer to the article Stopping Zoomdata Services .
  4. Use the following command to access and open the configuration file:
    vi /etc/zoomdata/zoomdata.properties
    - If you are not logged in as a root user, then you need to enter:
    sudo vi /etc/zoomdata/zoomdata.properties
    - If the configuration file does not exist, this command creates it.
  5. Enter/modify any of the following configuration options:
    If these entries do not exist in the properties file, you need to add them.
    • To change the number of activity log files to be archived and saved:
      zoomdata.activity.log.file.max.index= 1
      Replace the number ' 1 ' with the desired number of activity log files that should be retained. Default value is 1.
    • To change the size of the current active log file (in MB):
      zoomdata.activity.log.file.size= 10
      Replace the number ' 10 ' with the desired file size for your activity log file.
    • To change the location of the Log file:
      zoomdata.activity.logs.dir= local_dir
      Replace ' local_dir ' with the specific directory that stores your activity log file(s).
  6. Save and exit the configuration file.
  7. Restart Zoomdata services.
    For the appropriate Linux command line, refer to the article Starting the Zoomdata Server.

Enable/Disable Activity Logging to a file

Enabling the File for Activity Logging

To record the activities to a file, you need to enable the log file. Keep in mind, that settings for the activity event do not affect the storage configuration. That is, you can enable the activity event for logging, but disable the storage. As a result, the storage won't contain any records about that activity event.
Run the following cURL command:

curl -u supervisor: password -XPUT 'http:// localhost:8080 /zoomdata/service/system/activity/FILE ' -H "Content-Type: application/json" --data ' true '

Replace the following placeholders:

  • localhost:8080 - specify the address of the instance on which Zoomdata is installed
  • false - to disable the logging of all activities to the Log file
  • true - to enable the Log file* (please note that you still need to enable each individual activity that you want logged into this file)
  • This flag only enables the log file itself. By default, no activities are logged. You still need to enable each individual activity that you want logged.
  • For a list of the activities that can be logged, refer to this Reference Sheet .
If your password contains special characters, you might need to include single quotations around the password for the cURL command to be recognized by your server.

To disable the Log file, run the cURL command with the data value set to 'false'.

Enabling Activity Logging By Activity Type

You can also enable the logging of specific activities. To do so, run the following cURL:

curl -u supervisor: password -XPUT 'http : // localhost:8080 /zoomdata/service/system/activity/type/ activityType /FILE ' -H "Content-Type: application/json" --data 'true'

Replace the following placeholders:

  • localhost:8080 - specify the address of the instance on which Zoomdata is installed
  • activityType - specify the type of selected activity* (for example, AUTHENTICATION and USER )
  • enabled - value options: true/false - set the corresponding value to enable or disable selected activity output
For a list of the activities that can be logged, refer to this Quick Reference Sheet .
If your password contains special characters, you might need to include single quotations around the password for the cURL command to be recognized by your server.

Checking if Activity Logging is enabled for the Log File or a Specific Activity Type

To check if activity logging is enabled for the log file, run the following cURL:

curl -u supervisor: password -XGET 'http:// localhost:8080 /zoomdata/service/system/activity/FILE'

Replace the placeholder:

  • localhost:8080 - specify the address of the instance on which Zoomdata is installed

If the response returns a 'false' status, it means that particular activity is not being logged.

If the response returns a 'true' status, then that particular activity is being logged.

To check whether a specific activity type is being logged in the Log File, run the following cURL:

curl -u supervisor: password -XGET 'http:// localhost:8080 /zoomdata/service/system/activity/type/ activityType '

Replace the placeholders:

  • localhost:8080 - specify the address of the instance on which Zoomdata is installed
  • activityType - specify the address of the instance on which Zoomdata is installed

If the response returns a 'false' status, it means that particular activity is not being logged.

If the response returns a 'true' status, then that particular activity is being logged.


Related Articles:

Was this topic helpful?