Follow

Creating alerts for Android devices

Alerts are a powerful and helpful way to assist you in managing your deployed devices. Moki provides a highly configurable method for you to set up alerts for your account. This document will explain how to create and manage alerts. 

Create an alert

The alerts page is where you create and manage your alert definitions. To create a new alert definition, you simply click on the "+" button in the upper right corner of the Alert view. 

Once clicked you can now create your alert definition.

Here are the steps for defining a new alert:

  1. Give your new alert definition a descriptive name. In this example "My Alert" is the name.
  2. Select an alert severity: Critical, Major, Minor, Warn, Info.
  3. Choose if you want to fire an alert based on an Event or Custom Data:
    • Fire alert when the event does NOT occur: You may also fire alerts based on the absence of an event type. For example, if you wish to be alerted that a device has missed scheduled heartbeats (indicating it may be offline) you can choose the event type "DEVICE_UPDATE." DEVICE_UPDATE will be reported with every heartbeat and sometimes multiple times per heartbeat so if that isn't seen for a defined period of time you can infer that the device is offline. NOTE: Moki recommends that this time period is set to at least 2x your heartbeat interval. Most devices have a 60-minute heartbeat so setting this time window to at least 120 minutes or higher will help prevent getting false reports.
    • Event: This is an event reported by Agent. Events can come from basic Android state changes or may also come from your SDK enabled apps. If you choose an Event, the alert will fire when a device in your group reports that event on their next heartbeat. There is one event that doesn't require the device to report but rather is sent from the Moki server. This is the "failed action" event. The failed action event is registered when Moki encounters an error sending an action to your device. This can be from a direct action sent to single device or based on a scheduled action. This will help to watch devices with failed actions so you can attempt to repeat them if necessary. NOTE: that Event data grows over time so your devices might not have sent some types of events to your account yet and so in those cases you won't be able to alert on them until the first time they are sent. This is also true of failed actions but as soon as an action fails it will be available for your future use. 
    • Custom Data: Custom data can be sent to Moki from SDK enabled apps. This includes many important Android device checks that Agent checks such as battery level, memory usage, etc.
    • NOTE: You can add more criteria using the "+" button in the upper right corner. The best advice, however, is to keep it simple. 
  4. Once you have defined your alert, scroll down the page and assign your alert to one or more Device Groups. Alerts are assigned to device groups. This allows you to target specific sets of devices as well as defining specific targets where your alerts are sent.

004-Alerts-Create.png

  1. Once assigned to device groups you need to scroll up and hit the create button.

Setting alert targets

The final step to creating alerts is setting your alert targets. This is done in the alert area of each device group.

007-Alerts-Device-Groups.png

  1. Decide which device group you want to configure to send the alert.
  2. Click on the "Alert" link within the box for your device group.
  3. On this page, you add alerts you have already defined in the top box by clicking the "+" button in the upper box.
  4. In the lower box, you set your alert targets. The options are email, SMS/text, or URL

Email

Email alerts require the following settings:

  1. Recipient Name
  2. Email address
  3. Severity(setting to "Info" gets all alert severities, setting to "Minor" gets alert severities Minor, Major, and Critical, and setting to "Critical" gets only alert severity of Critical)

 SMS (Text)

SMS alerts require the following settings:

  1. Recipient Name
  2. Phone Number (including area code)
  3. Carrier (choose your carrier from the select list)
  4. Severity (setting to "Info" gets all alert severities, setting to "Minor" gets alert severities Minor, Major, and Critical, and setting to "Critical" gets only alert severity of Critical)

URL

Alerts can be set to send alerts as JSON to a URL. These can be used as webhooks for applications like Zapier (tutorial coming soon), or you can create your own app and provide that URL to the alert, and you can process it how you like. 

URL alerts require the following settings:

  1. Website Name
  2. URL (webhook or custom URL)
  3. Severity(setting to "Info" gets all alert severities, setting to "Minor" gets alert severities Minor, Major, and Critical, and setting to "Critical" gets only alert severity of Critical)

That does it for creating alerts. For managing alerts see the "Managing alerts for Android devices."

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.