Zoomdata Version

Activity Logging

Overview

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. In addition, Zoomdata supports logging activities to MongoDB as shown in Figure 1. Storing your activity records in a MongoDB collection lets you perform queries and create filters to search for specific activity records. You have the option to choose one or both of these options for your activity logging and set the types of activities that are logged.


Figure 1

This article covers the following topics:

Logging Options

Refer to Table 1 below for the activity logging options available to you:

Activity Logging Options in Zoomdata:
Default logging location:

Log file

/opt/zoomdata/logs

Optional/additional logging location:

MongoDB

collection name: 'activity'

In both situations, activity logging is enabled in two stages:

  1. Enabling the target storage location(s): When Zoomdata Server is installed, by default the following activities occur:
    • The Log file is created
    • An empty collection named 'activity' is created in MongoDB
  2. Enabling and assigning the activities to be logged in one or both storage media*.
*By default, no activities are logged. You need to enable each individual activity that you want logged.

The remainder of this article covers setting up the log file. If you are interested in using MongoDB to log activities, refer to the article Setting Up Activity Logging Using MongoDB for instructions.

For a list of the activities that can be logged, refer to this Quick Reference Sheet .

Default Configurations for the Log File

The Log file is created with the following configuration:

  • By default, the Log file is stored in (Zoomdata's home directory) /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 Log file is archived and a new one is created to continue the logging process (as shown in Figure 2).


Figure 2

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, if you are still in the program and close the browser.
  2. From your terminal, open a command line session.
  3. Via a command prompt, connect to your Zoomdata Server.
  4. Stop the Zoomdata Server service:
    sudo service zoomdata stop
  5. 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 will need to enter:
    sudo vi /etc/zoomdata/zoomdata.properties
    - If the configuration file does not exist, this command will create it.
  6. Enter/modify any of the following configuration options:
    If these entries do not exist in the properties file, you will 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 will store your activity log file(s).
  7. Save and exit the configuration file.
  8. Restart the Zoomdata Server:
    sudo service zoomdata start

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

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, r un 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.

check if activity logging is enabled for the Log File

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