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

The feature is used to publish 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=true Note: Disabled by default - set to false to enable

#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
  • 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>
Personal tools