1. Home
  2. Docs
  3. Integrations
  4. OnPage Integrations
  5. Logz.io

Logz.io

This integration uses OnPage’s Incoming Webhooks. This is a common integration path with OnPage and many other services will support this method as well. To get started, you have to access OnPage’s Webhook Console and register a Client ID and Secret Key. These are then used to authenticate the requests being sent to OnPage. Please keep these values secure as if they were a password. Although they do not allow Read access to OnPage, anyone with these keys can create Pages within your environment.

Navigate to https://integrations.onpage.com/#/integration/web-hook and login with your nps.onpage.com credentials.

Here you will see all of your currently configured Webhooks and the ability to suspend or remove them.

Click on the Create Button

Image

Give a Webhook name (i.e., New Relic ONE integration)

Copy the Secret Key and Client ID and store it in a secure place. The Secret Key is only shown once.

Image

Creating a New Logz.io Endpoint

Now that we have the required pieces to set up the integration, we’re going to set up a new alert endpoint in Logz.io.

Under the Alerts tab in Logz.io, select the Alert Endpoints page and click Add Endpoint.

Select Custom from the endpoint type drop-down menu.OnPage Logz.io Integration

Enter a name and description for the new endpoint and then configure the web-hook URL and method as follows:

URL – enter https://webhook.onpage.com/gw/v1/page
Method – select the POST method
Header -(leave this option empty)
Body – use the following JSON format:

{
    "clientId": "-YOUR-CLIENT-ID-",
    "secretKey": "-YOUR-SECRET-KEY-",
    "message": {
        "subject": "-YOUR-ALERT-SUBJECT-",
        "body": "*-YOUR-ALERT-MESSAGE-",
        "recipients": ["OPID1", "OPID2", ...],
        "priority": "HIGH|LOW"
    }
}

Be sure to validate the JSON before inserting it in the endpoint configuration. Also, the OnPageId is the OnPage ID of the recipient — or, in other words, the person to whom you want to send the alert. The ID is created when the recipient signs into his OnPage app on his mobile device (iOS/Android).

After you save the new endpoint, it will be added to the list of endpoints defined in Logz.io: OnPage Logz.io Integration

Creating a New Alert

Now that the integration is all set up, we can now test it with a new log-based alert.

Creating a new alert in Logz.io is done from the Discover tab in Kibana. Enter your query in the Search field — in this case, I’m looking at an Apache access log that reports a 504 error (type:apache_access AND response:504): OnPage Logz.io Integration

Once you’ve narrowed down the type of log message on which you want to be alerted, click the Create Alert button. The query is copied to the Alert Creation Wizard, where it can be modified as desired: OnPage Logz.io Integration

On the first page of the wizard, you will need to configure the trigger conditions — or, in other words, select which specific conditions will trigger an alert.

Then, after naming and describing the alert on the following page, all that’s left to do is to select the OnPage endpoint on the third and final page of the wizard: OnPage Logz.io Integration

Then, after naming and describing the alert on the following page, all that’s left to do is to select the OnPage endpoint on the third and final page of the wizard: OnPage Logz.io Integration