EdgeX-API doc
  • EdgeX Foundry Background
  • Getting Started
    • Install
    • UI Console
      • V1.0
      • V1.1
    • Experiencing EdgeX
  • Edge to Cloud
    • Azure
    • AWS
    • Aliyun
  • Edge to Edge
    • MQTT Export Service
    • MQTT Import Service
    • Grafana Dashboard Connection
  • Industrial SDK Setup
  • Device Connection
    • Configuration
    • Programming Basics
    • EdgeX Version
    • Platform
      • System Information
      • RF
    • Cold Chain
      • G1 Sensor
      • Gateway
    • Printer
    • Scanner SDK
    • Battery
    • IP Camera
    • SNMP
    • Modbus
    • Medical Cart
  • Advanced Services APIs
    • EdgeX Service Layers
    • Core Data Service APIs
    • Meta Data Service APIs
    • Command Service APIs
    • Alarm Service APIs
  • Edge AI
    • Face Detection
    • Facial Recognition
  • Edge to WISE-PaaS
    • Smart Pump Station Solution
    • Cloud Cold Chain Solution
    • Integration with WISE-PaaS
  • Edge to Cloud(for Delhi only)
    • Azure
    • AWS
  • Retail Utility
    • OPOS Manager
  • Medical Utility
    • AMiS Link
  • Vertical Utility
    • Self-Diagnostics
    • System Diagnostics
    • DeviceChecking / Kiosk
    • DeviceChecking / Server
    • Device Diagnostic Dashboard
    • Windows Lockdown/ Kiosk
    • Retail System Manager
    • Scanner Utility
  • Application Cases
    • Smart Warehouse
    • Smart Kiosk
    • Demo Video
Powered by GitBook
On this page
  • Content
  • Introduction
  • Alarm Service APIs
  • Rules management

Was this helpful?

  1. Advanced Services APIs

Alarm Service APIs

Content

  • Introduction

  • Alarm Service APIs

Introduction

Alarm service includes a lightweight rule engine, which provides IoT analytics and streaming capability. The rules are based on Source, SQL and Sink.

It is an edge lightweight IoT data analytics / streaming software implemented by Golang, and it can be run at all kinds of resource constrained edge devices. Kuiper rules are based on Source, SQL and Sink.

  • Source: The data source of streaming data, such as data from MQTT broker. In EdgeX scenario, the data source is EdgeX message bus, which could be MQTT broker.

  • SQL: SQL is where you specify the business logic of streaming data processing. Kuiper provides SQL-like statements to allow you to extract, filter & transform data.

  • Sink: Sink is used for sending analysis result to a specified target. For example, send analysis result to another MQTT broker, or an HTTP rest address.

It provides a set of REST API for streams and rules management in addition to CLI.

By default, the REST API are running in port 9081. You can change the port in /etc/kuiper.yaml for the restPort property. We have used support-rulesengine API version 1.0.0 that running in port 48075.

Alarm Service APIs

Rules management

  • create a rule

  • show rules

  • describe a rule

  • update a rule

  • drop a rule

  • start a rule

  • stop a rule

  • restart a rule

  • get the status of a rule

create a rule

(1) Example for MQTT output:

User application subscribes the broker and topic, then will get the alarm data with JSON format as below.

[{"RandomValue_Int8": -6}]

(2) Example for Rest API output:

User application implements the your-restapi-server/api/action method, then the RestAPI server will get the alarm data with JSON format as below.

{RandomValue_Int8: -97}

(3) CPU temperature example for MQTT output:

  • An example of CPU temperature

  • Create a sink that both name and type is EdgeX

  • The sink result will be published to the topic result and you can get the data context from the MQTT broker as below: [{"device":"cpu","temperature":62}]

(4) Battery temperature example for MQTT output:

  • An example of battery temperature

  • Create a sink that name is demo and type is zmq

  • The sink result will be published to the topic result and you can get the data context from the MQTT broker as below: [{"device":"Battery-POC6-01“, "temperature":31}]

(5) Battery remaining capacity example for MQTT output:

  • An example of battery remaining capacity

  • Create a sink that name is demo and type is zmq

  • The sink result will be published to the topic result and you can get the data context from the MQTT broker as below: [{"device":"Battery-POC6-01“, “capacity":100}

show rules

Example:

describe a rule

Example:

update a rule

Example:

drop a rule

Example:

start a rule

Example:

stop a rule

Example:

restart a rule

Example:

get the status of a rule

Example:

Reference:

PreviousCommand Service APIsNextEdge AI

Last updated 2 years ago

Was this helpful?

1. 2. 3. 4.

https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/edgex/edgex_rule_engine_tutorial.md
https://fuji-docs.edgexfoundry.org/support-rulesengine.html
https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/restapi/overview.md
https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/sqls/streams.md