Edge Monitoring

From RifidiWiki

Jump to: navigation, search

Introduction

In all versions Edge Monitoring is available through JMX/MBeans via RMI.

Note: The Edge Server can also be monitored via JConsole: https://docs.oracle.com/javase/8/docs/technotes/guides/management/jconsole.html

Remote process connection string: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi



Starting in Edge 3.1 Monitoring is now accessible though Resftful Services (leveraging Jolokia plugin. Jolokia exposes all JMX/Mbeans via Rest

The types of components which can be monitored include

  • Java Virtual Machine (Memory, CPU etc..)
  • Sensors/Readers (Status, Properties etc..)
  • OSGI (Status, Applications etc..)
  • Messaging

Starting in Edge 3.6 event notifications (application and sensor) via MQTT are included.


Rest Configuration via Jolokia

Note: Default port changed from 8080 to 8091 in Rifidi 3.1.1 (as 8080 is a popular port used by other web servers such as Tomcat) In rifidiserver.ini - A full list of Rifidi Edge configuration parameters can be found Edge_Server_Configuration


-Dorg.osgi.service.http.port=8091

Jolokia port

Rest Examples via Jolokia

Example calls are:


Additional features can be found on Jolokia Get/Post Features

Event Notification via MQTT (released in Edge 3.6)

The feature is used to publish Server KeepAlive, Reader and Rifidi application events to a configurable MQTT topic end point. An example could be notifying via MQTT message topic that a reader has gone into a disconnected state which may mean a reader has lost connectivity, hardware and/or network issues in real-time.

Notification App Property Settings

Note: Disabled by default - set mqttnotifier.global.disable to false to enable (found in applications/Monitoring/MqttNotifierApp.properties

mqttnotifier.qos=2
mqttnotifier.broker=tcp://localhost:1883
mqttnotifier.clientid=MyAppRifidiServicesId
mqttnotifier.topic=notifications

#disable all notifications
mqttnotifier.global.disable=false

#disable individual notification types
mqttnotifier.processing.disable=false
mqttnotifier.closed.disable=false
mqttnotifier.connecting.disable=false
mqttnotifier.loggingin.disable=false
mqttnotifier.app.started.disable=false
mqttnotifier.app.stopped.disable=false
mqttnotifier.keepalive.disable=false
mqttnotifier.readerexception.disable=false

#Name for the edge server
mqttnotifier.keepalive.name=Edge Server
mqttnotifier.keepalive.timeout=20000

Rifidi Application Notifications

Example Rifidi Application Started Event - This means the Rifidi App has started.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <appstarted> <group>Monitoring</group> <name>StatsApp</name> <timestamp>1481553095850</timestamp> <ip>192.168.1.124</ip> </appstarted>

Example Rifidi Application Stopped Event - This means the Rifidi App has stopped.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <appstopped> <group>Monitoring</group> <name>StatsApp</name> <timestamp>1481553071272</timestamp> <ip>192.168.1.124</ip> </appstopped>

Sensor Notifications

Sensor State Life-cycle

  1. Closed
  2. Connecting
  3. Loggingin
  4. Processing

Example Reader Connecting Event - This means the sensor is attempting to connect.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <sensorconnecting> <sensor>LLRP_1</sensor> <timestamp>1483620651189</timestamp> <ip>192.168.1.228</ip> </sensorconnecting>

Example Reader Logging in Event - This means the sensor is attempting to log in. (last state before entering processing state)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <sensorloggingin> <sensor>LLRP_1</sensor> <timestamp>1481636929123</timestamp> <ip>192.168.1.124</ip> </sensorloggingin>


Example Reader Processing Event - This means the sensor has gone into a processing state by the session connecting.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <sensorprocessing> <sensor>LLRP_1</sensor> <timestamp>1481553161280</timestamp> <ip>192.168.1.124</ip> </sensorprocessing>

Example Reader Closed Event - This means the sensor has gone into a closed state by the session disconnecting..

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <sensorclosed> <sensor>LLRP_1</sensor> <timestamp>1481553326093</timestamp> <ip>192.168.1.124</ip> </sensorclosed>

Server Notifications (released in Edge 3.7)

Example Server KeepAlive Event - Used to notify an RIfidi Edge Server is still up.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<keepalive>
   <ip>127.0.0.1</ip>
   <name>Edge Server</name>
   <timestamp>1516854152164</timestamp>
   <uptime>15</uptime> ## In Milliseconds
</keepalive>

Reader Exception Notifications (released in Edge 3.7)

Example Server KeepAlive Event - Used to notify an RIfidi Edge Server is still up.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<readerexception>
   <sensor>LLRP_1</sensor>
   <errordescription>Reader Error</errordescription>
   <statuscode>1</statuscode> 
   <timestamp>1516854152164</timestamp>
</readerexception>

Personal tools