https://github.com/gravitee-io/gravitee-reporter-file
Gravitee Reporter - Accesslog
https://github.com/gravitee-io/gravitee-reporter-file
product-apim security-scan
Last synced: 21 days ago
JSON representation
Gravitee Reporter - Accesslog
- Host: GitHub
- URL: https://github.com/gravitee-io/gravitee-reporter-file
- Owner: gravitee-io
- License: apache-2.0
- Created: 2015-07-24T13:39:02.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2025-04-01T16:13:26.000Z (about 1 month ago)
- Last Synced: 2025-04-01T17:33:51.510Z (about 1 month ago)
- Topics: product-apim, security-scan
- Language: Java
- Homepage:
- Size: 230 KB
- Stars: 0
- Watchers: 28
- Forks: 6
- Open Issues: 6
-
Metadata Files:
- Readme: README.adoc
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.adoc
- License: LICENSE.txt
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
= Gravitee File Reporter
ifdef::env-github[]
image:https://img.shields.io/static/v1?label=Available%20at&message=Gravitee.io&color=1EC9D2["Gravitee.io", link="https://download.gravitee.io/#/gravitee-reporter-file/"]
image:https://img.shields.io/badge/License-Apache%202.0-blue.svg["License", link="https://github.com/gravitee-io/gravitee-reporter-file/blob/master/LICENSE.txt"]
image:https://img.shields.io/badge/semantic--release-conventional%20commits-e10079?logo=semantic-release["Releases", link="https://github.com/gravitee-io/gravitee-reporter-file/releases"]
image:https://circleci.com/gh/gravitee-io/gravitee-reporter-file.svg?style=svg["CircleCI", link="https://circleci.com/gh/gravitee-io/gravitee-reporter-file"]
image:https://f.hubspotusercontent40.net/hubfs/7600448/gravitee-github-button.jpg["Join the community forum", link="https://community.gravitee.io?utm_source=readme", height=20]
endif::[]== 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:
[cols="1,1,1"]
|===
| 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 https://documentation.gravitee.io/apim/getting-started/configuration/configure-reporters#file-reporter[documentation website] for more details