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 } |
|
<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] |
Codified parameter defining the agent type. |
|
<MOTIVATION> |
[R] |
String:* { External_Service, IoT_Service, DB_Storage, FileSystem_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 |
|
<LON> |
[O] |
double |
|
<SERVICE_URI> |
[O] |
String |
Km4City URI of the service involved in the Process. |
<MESSAGE> |
[O] |
String |
Text message for additional notes. |