Soracom

IoT Template Gallery

  • Templates
  • Monitor multiple SIMs with Ping and send email notifications

This guide explains the overview, setup, and customization points of the “Monitor multiple SIMs with Ping and send email notifications” template.

Overview

This template is a Flux app that retrieves a list of SORACOM IoT SIMs and performs Downlink Ping health checks (optionally limited to SIMs in a specified SIM group). If any SIM fails, it aggregates the failed SIM IDs and sends an email notification. It is useful for monitoring the health of multiple devices at once.

  • Retrieve a SIM list and process it per SIM
  • If you specify group_ids, Ping is performed only for SIMs in the specified groups (if unset/empty, all retrieved SIMs are targeted)
  • Aggregate failed SIM IDs and send an email notification
  • You can customize the execution interval, number of SIMs retrieved, Ping count/timeout, and notification content

By default, only 10 SIMs are retrieved (limit=10). If you have many SIMs to monitor, increase the limit in the Get SIM list action.

Example Email Notification

The sent email will look like:

Estimated Costs

Initial Costs

Item
Cost
Notes
SORACOM IoT SIM
From 5 USD
SORACOM IoT SIM
Required if you do not already have a SORACOM IoT SIM.

Monthly Costs

Item
Estimated Cost for This App
Notes
SORACOM Flux
Up to 0.8184 USD/month (*1)
When executed every 12 hours, only 10 SIMs are retrieved (limit=10).
SORACOM IoT SIM
From $0.06/day
Monthly fee for SORACOM IoT SIM
  • (*1) The SORACOM Flux Developer plan includes up to 10,000 events/month free per account. Events exceeding 10,000/month are charged at 0.0011 USD per event.
  • (*1) If the app runs every 12 hours (twice a day), it runs up to 62 times per month (31 days). Since the SIM list is split per SIM, the estimated event count is 62 * (1 + 10 + 1) = 744. At 0.0011 USD per event, 744 * 0.0011 = 0.8184 USD (varies depending on limit, filtering by group ID, etc.).
  • Event counts and credits are initially set to the same upper limits as the free bundle allocation. When the limit is reached, app launches and action executions triggered by events will no longer occur. If you wish to use beyond these limits, please update the limits in advance. When you set limits that exceed the monthly bundle allocation, excess events and credits will be available on a pay-as-you-go basis.
  • (*2) In addition to the monthly base fee, data communication charges apply. For details, please refer to Japan Coverage IoT SIM and SORACOM Arc.

This is an estimate and may vary based on actual usage. For accurate pricing, please check the Pricing & Fee Schedule and usage details in the User Console.

Preparation

Before deploying this template, please prepare the following:

  • Email destination: A verified email address (registered in SORACOM’s Email Addresses feature)
  • Target SIMs/devices: Downlink Ping must be available

Creating the App

At app creation time, you can set the following parameters:

Parameter
Description
email_send_to
Destination email address for notifications (must be verified)
group_ids
Group IDs of the SIM groups to monitor (optional; if set, only SIMs in these groups are targeted)

The interval timer event source is OFF by default. Manually test the app and confirm the email notification, then turn the event source ON.

Customization

You can customize the behavior of each action in Flux Studio.

Number of target SIMs (Get SIM list action)

Update the limit in the SORACOM API action Get SIM list.

  • To change the number of SIMs retrieved: modify limit=10
  • Even when using group ID, filtering happens after the SIMs are retrieved, so set limit high enough if you have many SIMs

Execution interval (Interval Timer)

Update the interval timer schedule definition (e.g., 12 hours). During testing, it can be helpful to set a shorter interval temporarily and restore it before going live.

Notification condition / content (Email Notification)

  • The email notification action is executed only when len(payload.messages) > 0 (when there is at least one failed SIM).
  • To customize the subject/body, update the CONFIG of the Email Notification action.
  • For available functions and syntax for conditions/templates, see Action payload and condition syntax.

Troubleshooting

  • No email received
    • Confirm the destination email address is verified.
    • Confirm the email action condition (len(payload.messages) > 0) is satisfied.
  • Group ID is set, but Ping is not executed / wrong SIMs are targeted
    • Check the group ID value and the limit of the Get SIM list action (default: 10).
    • Confirm the Ping action condition references group IDs correctly, for example:
      payload.groupId == "123xxxxx-x45x-67x8-9101-1121xx31415xx" || payload.groupId == "151yyyyy-y41y-31y2-1110-9876yy54321yy"
      
  • All SIMs fail / Ping fails
    • Check the device online status and radio conditions.
    • Confirm your SIM/device supports Downlink Ping (sendDownlinkPing).
  • Not sure which SIMs are monitored
    • Check group ID and the Get SIM list limit (default: 10).

If it does not work as expected, check the app execution history. For details, see View Logs.