Skip to content

gravitee-io/gravitee-reporter-file

Repository files navigation

Gravitee File Reporter

Gravitee.io License Releases CircleCI Join the community forum

Presentation

This reporter writes access logs to a file, by corresponding one line to one request access to gateway.

Compatibility matrix

Plugin version APIM version JDK version

3.x

4.x

17

2.x

3.x

8

Line format

For now, line format is defined as the following:

[TIMESTAMP] (LOCAL_IP) REMOTE_IP API KEY METHOD PATH STATUS LENGTH TOTAL_RESPONSE_TIME

Where:

  • TIMESTAMP is the timestamp from which request began to be processed by gateway;

  • LOCAL_IP is the local host’s IP, i.e., the Gravitee node's IP which have processed request;

  • REMOTE_IP is the remote host’s IP;

  • API is the requested API name;

  • KEY is the key used to request to API;

  • METHOD is the HTTP method contained into the request;

  • PATH is the HTTP path contained into the request;

  • STATUS is the HTTP response status received from the API;

  • LENGTH is the HTTP Content-Length value received from the API.

  • TOTAL_RESPONSE_TIME is the total response time to process request (API + gateway response time).

Configuration

Hereafter available configuration parameters:

Parameter name

Description

Default value

fileName

File name to write access logs (use '%s-yyyy_mm_dd' pattern to create one file per event type on daily base)

#{systemProperties['gravitee.home']}/metrics/%s-yyyy_mm_dd}

output

Type of output file (json, message_pack, elasticsearch, csv)

json

flushInterval

interval between file flush (in ms)

1000

retainDays

The number of days to retain files before deletion. Any files with a last updated date older than this retention period are regularly deleted every day at midnight.

0 (to retain forever)

Please visit our documentation website for more details