概要: Plesk Action Log helps you keep track of actions performed by Plesk users of all levels (customers, resellers, and administrators) via the Plesk graphical interface or via the API.

In this topic, you will learn how to view and filter the Action Log in Plesk. You will also learn how to configure what action types are logged, how to configure Action Log entries’ rotation, and also how to download and clear the Action Log.

前提条件

To use the instructions in this topic, the free Log Browser extension must be installed.

The extension is included in the “Recommended” preset, but if it is not installed on your Plesk server, you can install it from the Extensions Catalog.

Viewing the Serverwide Action Log

The serverwide Action Log shows all actions performed by Plesk users of all levels via the Plesk graphical interface or via the API. It does not show actions performed via the CLI, because those are performed within the context of a system user, and not a Plesk user.

For every logged action, you can see the date and time the action was performed, the IP address it was performed from, the name of the Plesk user that performed the action, as well as any additional information, depending on the type of action (for example, the name of the domain the action affected in some way).

image action log entry

To view the serverwide Action Log:

  1. 登录到 Plesk
  2. Go to Tools & Settings, and then click Action Log (under “Plesk”).
  3. To update the list of available Action Log entries, click Refresh. As new actions are taken in Plesk, the list of available entries is not updated automatically.

You can now see all entries currently available in the Action Log. To search for specific entries, apply a filter.

You can also see the Action Log for individual websites. They only show the actions related to the website in question.

To view the Action Log for an individual website:

  1. 登录到 Plesk
  2. 请转到 网站与域名
  3. If the menu on the right is collapsed, expand it by clicking the image sidebar right show icon icon, and then click Action Log.
  4. Select the desired website, and then click OK.
  5. To update the list of available Action Log entries, click Refresh. As new actions are taken in Plesk, the list of available entries is not updated automatically.

You can now see all entries currently available in the Action Log that are related to the selected website. To search for specific entries, apply a filter.

To apply a filter to the Action Log:

  1. 登录到 Plesk
  2. Go to Tools & Settings, and then click Action Log (under “Plesk”).
  3. Click the image filter icon icon, set the desired filter, and then click Apply.
  4. To update the list of available Action Log entries matching the filter, click Refresh. As new actions are taken in Plesk, the list of available entries matching the filter is not updated automatically.
  5. To clear the current filter, click the image filter icon icon, click the image clean icon icon, and then click Apply.

Once a filter is applied, you will only see the Action Log entries matching the filter.

When applying the filter, the “Changed field” field indicates any parameter name found in the “Details” column to the left of the semicolon, for example, “Client GUID” or “Domain Name”. Using this field will filter out all Action Log entries that do not have the corresponding parameter name in its “Details” column.

image changed field example

For example, if you specify “Domain Name” in the “Changed field” field and apply the filter, all Action Log entries that do not have “Domain Name” in the “Details” column will be filtered out.

The “Changed value” field indicates any parameter value found in the “Details” column to the right of the semicolon, for example, “3437b7f3-6d18-4347-a123-47fcb4b734cd” or “example.com”. Using this field will filter out all Action Log entries that do not have the corresponding parameter value in its “Details” column.

image changed value example

For example, if you specify “example.com” in the “Changed field” field and apply the filter, all Action Log entries that do not have “Domain Name” in the “Details” column will be filtered out.

Configuring What Action Types are Logged

Plesk Action Log can keep track of a wide variety of action types (for example, user accounts being created, or subscriptions’ limits being updated). If you do not want to keep track of actions of a certain type, you can disable the logging of those actions to the Action Log. By default, actions of all supported types are logged.

注解: The logging of certain action types cannot be disabled if NIS2 directive compliance is enabled on the server.

To configure what action types are logged:

  1. 登录到 Plesk
  2. Go to Tools & Settings, and then click Action Log (under “Plesk”).
  3. 单击 设置
  4. Clear the checkboxes corresponding to the action types you do not want to be logged.
  5. Make sure that the checkboxes corresponding to the action types you want to be logged are selected, and then click Save.

Only the actions of the selected types will now be logged to the Action Log.

Configuring Log Entries’ Rotation

To keep the number of available Action Log entries manageable, you can configure Plesk to only keep the entries for a set number of days, weeks, or months, or to only keep the specified number of latest entries.

You can also configure Plesk to keep the Action Log entries indefinitely, until removed manually. Doing so will result in the size of the Plesk database growing. Make sure that you do not run out of free disk space if you select this option.

To configure Action Log entries’ rotation:

  1. 登录到 Plesk

  2. Go to Tools & Settings, and then click Action Log (under “Plesk”).

  3. 单击 设置

  4. Scroll to the bottom of the list.

  5. To keep the entries for a set number of days, under “Store records”, select the “For period” option, and then specify the number of days, weeks, or months to keep the entries for, and then click Save.

  6. To keep the specified number of latest entries, under “Store records”, select the “By number” option, and then specify the number of latest entries to keep, and then click Save.

  7. To keep the entries indefinitely, under “Store records”, select the “Forever” option, and then click Save.

    注解: The “Forever” option is unavailable if NIS2 directive compliance is enabled on the server.

The Action Log entries will now be rotated according to the settings you specified.

下载操作日志

You can download all currently available Action Log entries in the form of a .txt file.

To download the Action Log:

  1. 登录到 Plesk
  2. Go to Tools & Settings, and then click Action Log (under “Plesk”).
  3. 点击 下载

The .txt file containing all currently available Action Log entries will be saved to your browser’s downloads directory.

清除操作日志

You can manually clear all currently available Action Log entries. As new actions are taken in Plesk, the corresponding entries will continue to be logged starting from the moment the Action Log is cleared. It is not possible to selectively clear some Action Log entries but not others, and once the Action Log is cleared, it is not possible to undo the action.

注解: The Action Log cannot be cleared manually if NIS2 directive compliance is enabled on the server.

To clear the Action Log:

  1. 登录到 Plesk
  2. Go to Tools & Settings, and then click Action Log (under “Plesk”).
  3. Click Clear items, and then click Clear items once again.

The contents of the Action Log are now cleared and cannot be recovered. The logging of new actions will continue.