Home Blog WordPress Management How to configure Loggly mirroring for WordPress activity logs

How to configure Loggly mirroring for WordPress activity logs

How to configure Loggly mirroring for WordPress activity logs

WP Activity Log comes jam-packed with many great features, including mirroring logs to a Log Management System. Log Management Systems benefit owners and administrators managing multiple WordPress websites and complex environments. Benefits include centralization of logs, ease of access, and added security, to name a few.

To start enjoying the many benefits of WP Activity Log and Loggly working together, you need to configure a few things. More precisely, you will need to:

  1. Set up a Loggly account (if you don’t have one already)
  2. Configure a Loggly connection in your WP Activity Log plugin
  3. Mirror the log from your WordPress website to your Loggly account

This how-to provides step-by-step instructions for the entire process from start to finish. Each section has been clearly labeled, allowing you to skip ahead should you, for example, already have a Loggly account.

One important thing to note here is that Loggly offers new customers a free trial account. This is the account that we will set up in this how-to. Of course, you can always upgrade to a full paid account at any point during the trial should you wish.

Let’s get started.

Sign-up for a Loggly account

Loggly comes with a free trial, so if you have never used a Log Management System before, this can help you assess the benefits of using Loggly with no risk. In this section, we will be setting up a Loggly account, which we will then use to mirror our WP Activity Log log to.

Step 1: Go to Loggly’s website and click on Free Trial

Go to Loggly’s website and click on FREE TRIAL, located as shown in the screenshot below.

Loggly Trial

Step 2: Create your free Loggly account

In the second step of the process, we will be creating our free Loggly account. There is no need to supply your credit card details, and the trial period runs for 30 days. Here, you will need to enter the following information:

  • Your first name
  • Your last name
  • Your work email address
  • Your country of residence

Once done, read and agree to the terms and agreements and click on Create Account.

Setup your Loggly account

Step 3: Customize your account

In the third step of this process, we will be customizing our account. We need to enter the following information:

  • Account name (this will be the URL through which you’ll access your account)
  • Username
  • Password
  • Phone number
  • Company or Organization name

Once done, click on Start Using Loggly.

Welcome to Loggly

Step 4: Confirm your email address and sign-in

You should receive an activation email in your inbox on the same email address used during the registration process. Make sure you check your spam folder, should you not find it. Click on the Verify your email button to confirm your email address and log in to your Loggly account.

Solarwinds loggly

Step 5: Retrieve your Loggly customer token

Once you’ve logged in, you will need to retrieve your Loggly customer token. We will use this token during the plugin configuration, so make sure you store it somewhere safe for the time being.

  • Click on the Logs icon from the side menu and then on Source Setup
  • Click on the Customer Tokens tab
  • Copy the Customer Token
Customer tokens

Set up the Loggly connection in WP Activity Log

Now that we have set up our Loggly account, we need to connect to it from our WordPress. This opens a line of communication between our WordPress and our Loggly account, through which we will be able to mirror our logs.

Step 1: Create a Connection

To create a Loggly connection, first head to your WordPress website. Once logged in, click on WP Activity Log and then Integrations from the side menu. Make sure you’re on the Connection tab and then click on Create a Connection. This will start the Connections Wizard, which will help us set up and configure the connection.

Integrations - external databases & third party services configuration

Step 2: Select type of connection

In the first step of the Connections Wizard, we need to select the type of connection that we want to set up. WP Activity Log is compatible with Loggly straight out of the box. All we need to do here is choose Loggly from the Type of Connection drop-down menu.

Connections Wizard - Step 1

Step 3: Ensure system meets requirements

Next, WP Activity Log will ensure that all requirements are met before proceeding to the next step. No input is required. Click Next once you receive confirmation that all requirements have been met.

Connections Wizard - Step 2

Step 4: Input Loggly customer token

In the next step of the Connections Wizard, we need to enter our Loggly customer token, which we retrieved earlier. Copy and paste the code in the Loggly token field and then click on Next.

Connections Wizard - Step 3

Step 5: Test Connection

The wizard will now test the connection to make sure that it can safely connect to Loggly. No input is required from your end as the wizard will take care of everything. Once ready, click on Next to continue.

Connections Wizard - Step 4

Step 6: Name the connection

In the last step, we need to give the connection a friendly name so that we can easily recognize it when setting up the mirror. We will be doing this next. You can name the connection whatever you want; however, naming it something recognizable such as MyLogglyConnection, as shown in the below example, will help you find it that much quicker. Once done, click on Save Connection and move to the next section.

Connections Wizard - Step 5

Set up the activity log mirroring

Now that we have set up our Loggly account and the connection, it is time to set up the mirror. The mirror will use the connection we set up in the previous step to send our log data to the Loggly account we set up in the first step. This is the last part of the process, by the end of which your logs will start safely being mirrored to Loggly.

Step 1: Set up an Activity Log Mirror

To kick off the process, first click on WP Activity Log and then Integrations from the side menu. Make sure you’re on the Mirroring tab and then click on Set up an Activity Log Mirror.

Integrations - external databases & third party services configuration

Step 2: Select the mirroring connection

You should now have the Mirroring Wizard open directly in front of you. This wizard will help us configure the mirror in no time at all.

In the first screen, we will start configuring the mirror by choosing the connection and naming it.

  • Mirror connection friendly name: Enter a name for the mirror connection. This will help you recognize this specific mirror connection should you need to set up more than one.
  • Mirror identifier in logs: Enter a name to identify this mirror in your Loggly log. This will help you recognize your logs in Loggly as coming from this mirror
  • Connection: Choose the connection that we set up in the previous section

Click Next once done.

My loggly connection

Step 3: Configure start of activity log mirroring

Next, we can choose whether we would like the wizard to initiate mirroring once the setup is complete automatically. Tick the Tick this checkbox to enable the mirror and start sending data once set up checkbox to enable.

Click Next to continue.

Mirroring Wizard

Configure mirroring events

In this last section, we can choose which events we want to be mirrored to Loggly. By default, all events are mirrored, but you can exclude certain events through the following filters:

Event IDs

Here you can choose to either send all events, send only certain events, or exclude certain events from being sent. Click here for the full list of WP Activity Log events.

Severity

Here you can exclude certain events from being mirrored to Loggly according to their severity. To exclude an event by its severity, simply click on the x located on the left side of the severity button.

Click Save Mirror once done to complete the configuration process and save your settings.

Mirroring Wizard

Configure a local copy of the activity log

The last option that we need to configure is whether we would like to retain a copy of the activity log on the WordPress database.

By default, WP Activity Log writes to the database and the mirror. To stop writing to the database, simply untick the Write activity log to the database option.

Integrations - external databases and third party services configuration

Your Loggly mirroring configuration is now complete. Head over to your Loggly account to view the logs coming in.

Posted inWordPress Management
Glenn Kouma
Glenn Kouma

Glenn has a huge passion for WordPress, has been using it for over 5 years, and even develops a couple of premium themes. Glenn enjoys blogging, music, and the outdoors. You can reach Glenn at glenn@melapress.com.


Leave a Reply

Your email address will not be published. Required fields are marked *

Stay in the loop

Subscribe to the Melapress newsletter and receive curated WordPress management and security tips and content.

Newsletter icon

It’s free and you can unsubscribe whenever you want. Check our blog for a taste.

Envelope icon
newsletter-pop-up