How to Configure Admin Actions in Magento 2?

How to Configure Admin Actions in Magento 2?

Admin Actions in Magento 2 enables you to track all changes to your Magento website. It also allows you to view each admin's log history and activities. This tutorial will cover the process of logging admin actions in your Magento 2 store. These outlined steps will enable the systematic tracking of modifications initiated by individual administrators.

Key Takeaways

  • Discover the importance of the Magento 2 Admin Action Log in tracking and monitoring all admin activities within your store.

  • Explore how to configure and view the detailed logs, ensuring transparency and accountability for multiple admin users.

  • Learn how to manage and export the action logs to better analyze and review the actions taken in your Magento 2 store.

  • Understand the significance of enabling and reviewing admin actions, fostering better security and control.

  • Explore setting up the log archive and handling bulk actions to track operations within the system.

What is Magento 2 Admin Action Log?

The Magento 2 Admin Action Log function is designed to record all modifications made by the administrator. It captures a range of details on admin activities. It includes the specific action, its outcome (success or failure), and the admin's name. It also identifies the object targeted by the action. Admin Action log also records the IP address and date data associated with the action.


Note: The Admin Actions Logging feature is exclusively accessible in Magento Adobe Commerce.

What is Action Logs Report?

The Action Logs Report in Magento provides a detailed record of all Admin actions configured for logging. This report offers detailed insights into these actions, including timestamped records, IP addresses, and user names. It also captures important admin user data and any associated changes made during the action.

The Action Logs Report includes the following information:

  • Time: It indicates the exact date and time when a specific action occurred.

  • Action Group: The action group corresponds to the type of action, aligning with the settings for Admin Actions Logging.

  • Action: This field logs the specific action that was performed.

  • IP Address: It displays the IP address of the computer from which the action originated.

  • Username: This identifies the login ID of the admin user responsible for the action.

  • Result: It reflects whether the action was successful or encountered a failure.

  • Full Action Name: It provides the backend action name associated with the logged action.

  • Details: This field categorizes the backend action.

  • Full Details: Here, you can find a detailed breakdown of all the logged details related to the admin action.

Steps to Configure Magento 2 Action Log

  1. Navigate to the Magento Admin panel and click Stores.

  2. In the Settings section, select Configuration.

  3. Select Admin under Advanced in the panel on the left.

  4. In the Admin Actions Logging section, you have options to:

  • Enable admin logging by marking the Admin Sign In checkbox.

  • Disable admin logging by unchecking the same checkbox.

Note: You have various other enabled options to choose from. It includes admin permission roles, CMS Blocks, CMS Hierarchy, etc.

Step-by-step guide on configuring Admin Action Log in Magento 2 for enhanced security

  1. Click the Save Config button to apply these changes.

Steps to View the Magento 2 Admin Action Log Report

  1. To view the Action Log Report, go to Magento Admin Panel > System > Action Logs > Report.

  2. The Action Logs Report provides the following information:

Detailed instructions on accessing Admin Action Log reports in Magento 2

  • Time: The date and time the action occurred.
  • Action Group: Type of action aligned with the settings for Admin Actions Logging.
  • Action: The action that was logged.
  • IP Address: The IP address of the computer on which the action was performed.
  • Username: The login ID for the admin user.
  • Result: The success or failure of the action taken.
  • Full Action Name: The backend action name.
  • Details: The backend action category.
  • Full Details: All logged details of the admin action.
  1. Click View on the Full Details sections to see all the listed admin actions.

  2. In the Action Logs Report, you can filter the options fields you want to display.

Methods for filtering the Admin Action Log Report in Magento 2 to streamline analysis

How to Export the Action Logs Report

  1. Navigate to the Admin Panel and go to System > Action Logs > Report.

  2. In the report view, you'll find an Export To option.

Exporting Admin Action Log Reports from Magento 2 as CSV or XML files for data analysis

  1. Choose your preferred export format from the following options:
  • CSV: This option exports the data in a comma-separated value (CSV) file format. It contains plain text data that can be easily opened and analyzed.

  • Excel XML: Select this option to export the data in an XML-based, spreadsheet-friendly format. It is suitable for use in Excel or other spreadsheet software.

  1. Once you've selected your desired export format, click the Export button.

  2. The generated export file will be automatically saved to your designated download folder.

How to Configure the Log Archive?

The Admin Actions archive lists all the CSV log files stored on the server. You can control how long log entries are stored and how frequently they are archived through configuration in backend settings.

By default, the file names in the archive include the current date and time in ISO format, which is represented as "yyyyMMddHH."

Note: Log archiving requires a cron job to be set up and running on your admin server.

  1. To configure the Log Archive, go to Admin Panel > Store > Settings > Configuration > Advanced > System.

  2. Expand the Admin Actions Log Archiving section to set these two options:

Configuring the Admin Action Log Archive settings in Magento 2 for optimal log management

  • Log Entry Lifetime, Days: Specify the days you want to retain log entries in the database before they are automatically deleted. The default is set at 60 days.

  • Log Archiving Frequency: Choose Daily, Weekly, or Monthly as the frequency at which log archives should be created.

  1. Click Save Config. to save your changes.

  2. To view your Admin Actions Archive, go to System > Actions Logs > Archive.

What are Bulk Actions?

The Bulk Actions Log records the details of asynchronous mass operations that run in the background. These operations often involve importing/exporting data or assigning custom prices to multiple products within a shared catalog.

The Bulk Actions Log records the details of these operations, providing transparency and tracking capabilities.

To configure how Bulk Actions are handled in Magento Admin, follow these steps:

  1. Go to Stores > Settings > Configuration > Advanced > System.

  2. Expand the Bulk Actions section to set up the log save option:

Overview of Bulk Actions in Magento 2 and the logging of background operations

  • Day Saved in Log: Enter the number of days bulk actions are saved in a log. The Default is set at 60 days.
  1. Click Save Config. to save your changes.

  2. To view the records of Bulk Actions in Magento, go to System > Actions Logs > Bulk Actions.

Benefits of Admin Action Log

  1. Increased Security: The Admin Action Log enhances Magento security by tracking all admin actions, ensuring your store remains safe from harmful acts. It offers real-time monitoring, allowing you to identify and address any suspicious activities promptly.

  2. Accountability for Admin Actions: It plays a crucial role in maintaining accountability for admin actions. It enables store owners and developers to track and monitor every action performed by admin users.

FAQs

1. What security benefits does the Admin Action Log in Magento 2 offer?

The Admin Action Log in Magento 2 significantly enhances security by meticulously recording all actions initiated by admin users. It helps in real-time monitoring and enables quick identification of any suspicious activities.


2. How many admin actions does the database store in Magento 2 by default?

Magento 2, by default, retains admin actions for a set period, typically 60 days. It manages and stores these actions in the database, providing a detailed log of admin activities. The default configuration enhances system efficiency by maintaining these records.


3. How can Magento 2 support multiple admins in the Admin Action Log?

Magento 2 supports multiple admins efficiently by enabling the Admin Action Log to show and manage actions performed by various Magento administrators. This feature helps maintain accountability for each individual's actions, ensuring transparency within the system.


4. What steps can a store owner take to keep better track of enabled admin actions in Magento 2?

Store owners can optimize the Admin Action Log in Magento 2 by regularly checking the Action Logs Report. It will help in post-action reviews and maintain a consistent check on the actions performed. It also ensures better visibility and control over the logged activities.


5. How does the Admin Action Log help manage admin actions that are enabled?

The Admin Action Log provides a detailed breakdown of all logged admin actions. This feature aids in keeping track of the actions taken. It also offers an organized view to help store owners and developers monitor and manage the activities effectively.

Summary

Admin Actions in Magento 2 helps you monitor admin activities within the Magento 2 platform. It ensures transparency and security in the store's operations. This tutorial covered the steps to configure, manage, and export admin action logs. It also enables users to view and analyze these actions for enhanced security efficiently.


Explore Magento server hosting for optimal performance and support, ensuring a seamless and secure environment for your Magento 2 store.

Maria A.
Maria A.
Technical Writer

Maria has over five years of expertise in content marketing, specialising in Magento insights and industry trends. She excels in creating engaging content that resonates within the Magento community.


Get the fastest Magento Hosting! Get Started