EventLog API

×

Warning message

You can't delete this newsletter because it has not been sent to all its subscribers.

This page presents an operative documentation of the EventLogger API. The EventLogger API are HTTP REST API through which it is possible to call and instantiate a logging action by the EventLogger tool, exploiting the Rsyslog protocol on the EventLogger tool without the requirement to install nor configuring Rsyslog also on the different clients. 

The HTTP call must have the following form (parameters to be passed are highlighted in bold):

http://<EVENTLOGGER_HOST>/RsyslogAPI/rsyslog.php?p=log&pid=<PID_LOCAL>&tmstmp=<TIMESTAMP>&modCom=<COMM_MODE>&IP_local=<IP_LOCAL>&IP_ext=<IP_EXT>&payloadSize=<PAYLOAD_SIZE>&agent=<AGENT>&motivation=<MOTIVATION>&lang=<LANG>&lat=<LAT>&lon=<LON>&serviceUri=<SERVICE_URI>&message=<MESSAGE>

where <EVENTLOGGER_HOST> is the IP or host name of the EventLogger host.

In the following, a description and usage of API parameters:

PARAMETER

Required [R] / Optional [O]

TYPE

DESCRIPTION

<PID_LOCAL>

[R]

String

<TIMESTAMP>

[R]

Unix-Epoch Millisecond Timestamp

<COMM_MODE>

[R]

String:* { TX RX }

  • Communication mode is a codified parameter describing if the IoT device or ETL process is in transmission mode (TX) or in receiving mode (RX).

<IP_LOCAL>

[R]

String

<IP_EXT>

[R]

String

IP of the external host to / from which the current agent represented by <IP_LOCAL> is transmitting / receiving data, according to the <COMM_MODE> parameter. It can be of both forms IPv4 or DNS.

<PAYLOAD_SIZE>

[R]

double

Measure of data flow traffic (transmitted or received, according to the <COM_MODE> parameter) between <IP_LOCAL> and <IP_EXT>. It can be a measure expressed in KBytes (KB) or absolute count, according to the <MOTIVATION> parameter.

<AGENT>

[R]

String:* { Node-Red ETL Data-Analytics }

Codified parameter defining the agent type.

<MOTIVATION>

[R]

String:* { External_Service, IoT_Service, DB_StorageFileSystem_Storage, Message_Count, User_Count, IoT_Count, Message_Control }

Codified parameter defining the type of operation performed by the Microservice calling the EventLogger API.

<LANG>

[O]

String

Language of data transmitted to / by the current Microservice

<LAT>

[O]

double

  • For Node-RED/IoT: it is the GPS Latitude of Microservice owner.
  • For ETL: it is the Latitude of the service / device involved in the Process.

<LON>

[O]

double

  • For Node-RED/IoT: it is the GPS Longitude of Microservice owner.
  • For ETL: it is the Longitude of the service / device involved in the Process.

<SERVICE_URI>

[O]

String

Km4City URI of the service involved in the Process.

<MESSAGE>

[O]

String

Text message for additional notes.

 
*  Codified Field: it is expected to assume also the values listed in brackets { }.