Generate the credentials for accessing the OnPage API — a client ID and a secret key. On the OnPage dedicated webhook application, click on Register New Incoming Webhook.
OnPage helps DevOps teams keep track of every alert triggered in their environment by providing a persistent, detailed, and comprehensive incident alert management platform. OnPage’s mobile apps (iOS/Android) play the role of traditional pagers, allowing managers to distribute alerts to team members and message them. OnPage offers enterprise users a webhook API for full integration with the service, including Logz.io’s alerting mechanism.
Logs are used to trigger alerts in these messaging applications, so DevOps crews can get alerted as soon as a specific log message is initiated by a designated process running in the environment. When logging with Logz.io, techs have the option to use pre-configured integrations to get alerted by a wide range of messaging and monitoring tools
Generate the credentials for accessing the OnPage API — a client ID and a secret key. On the OnPage dedicated webhook application, click on Register New Incoming Webhook.
The credentials do not have a date and time expiration, and you may create as many keys as needed. The best practice is to have only one to make it easier in case you need to remove the Logz.io integration.
The new integration must be saved, otherwise, the credentials will not be registered correctly.
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.
Enter a name and description for the new endpoint and then configure the webhook URL and method as follows:
Use the following JSON format:
{“clientId”:”clientId”,”secretKey”:”secretKey”,”message”:{“subject”:”Alert from Logz.io”,”body”:”This is an alert from Logz.io”,”recipients”:[“OnPageId”],”priority”:”HIGH”}}
Make sure to validate the JSON before inserting it in the endpoint configuration.
The “OnPageId” is the OnPage ID of the recipient (i.e., the person to whom you want to send the alert). The ID is created when the recipient signs in to the OnPage smartphone app (iOS/Android).
After saving the new endpoint, it will be added to the list of endpoints defined in Logz.io:
Test the integration by creating a new alert in Logz.io from the “Discover” tab in Kibana. Enter your query in the “Search” field. In this example, the query is for an Apache access log that reports a 504 error (type:apache_access AND response:504):
Once you have narrowed down the type of log message, 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:
On the first page of the wizard, configure the trigger conditions by selecting which specific conditions will trigger an alert.
After naming and describing the alert on the following page, select the OnPage endpoint on the third and final page of the wizard:
Once created, and according to the definitions entered in the alert, Logz.io will trigger an alert if a 504 response is logged from the Apache web server, and a page will be sent to the OnPage recipient.