<commit_before>= Reporters
:page-sidebar: am_3_x_sidebar
:page-permalink: am/current/am_installguide_reporters.html
:page-folder: am/installation-guide
:page-liquid:
:page-layout: am
:page-description: Gravitee.io Access Management - Reporters
:page-keywords: Gravitee.io, API Platform, API Management, Access Gateway, oauth2, openid, documentation, manual, guide, reference, api

== Overview

_Reporters_ are used by AM Gateway and API instances to report many types of events:

* Administration metrics: administrative tasks (CRUD on resources)
* Authentication / Authorization metrics: (sign-in activity, sign-up activity)

A default reporter is created using a MongoDB or JDBC implementation according to the backend configured in the
`gravitee.yml` file.

From AM version 3.6, you can create additional reporters.

== File reporter

This implementation is a file-based reporter for writing events to a dedicated file. You can use it for ingesting events into a third party system.

=== Configuration

File reporters are configurable in the `gravitee.yml` file `reporter` section with the following properties:

|===
|property | type | required | description

|directory
|string
|N
|Path to the file creation directory. The directory must exist (default: `${gravitee.home}/audit-logs/`)

|output
|string
|N
|Format used to export events. Possible values: JSON, MESSAGE_PACK, ELASTICSEARCH, CSV (default: JSON)
|===

[source,yaml]
----
reporters:
  file:
    #directory:  # directory where the files are created (this directory must exist): default value = ${gravitee.home}/audit-logs/
    #output: JSON # JSON, ELASTICSEARCH, MESSAGE_PACK, CSV
----

NOTE: Audit logs will be created in a directory tree that represents the resource hierarchy from the organization to the domain. For example, audit logs for domain `my-domain` in environment `dev` and organization `my-company` will be created in the following directory tree: `${reporters.file.directory}/my-company/dev/my-domain/audit-2021_02_11.json`

WARNING: There is currently no retention period for the audit logs, so you need to create a separate process to remove old logs.

For details of how to create a file reporter for a domain, see link:/am/current/am_userguide_audit_log_file[Audit log file^].
<commit_msg>Fixed broken link<commit_after>= Reporters
:page-sidebar: am_3_x_sidebar
:page-permalink: am/current/am_installguide_reporters.html
:page-folder: am/installation-guide
:page-liquid:
:page-layout: am
:page-description: Gravitee.io Access Management - Reporters
:page-keywords: Gravitee.io, API Platform, API Management, Access Gateway, oauth2, openid, documentation, manual, guide, reference, api

== Overview

_Reporters_ are used by AM Gateway and API instances to report many types of events:

* Administration metrics: administrative tasks (CRUD on resources)
* Authentication / Authorization metrics: (sign-in activity, sign-up activity)

A default reporter is created using a MongoDB or JDBC implementation according to the backend configured in the
`gravitee.yml` file.

From AM version 3.6, you can create additional reporters.

== File reporter

This implementation is a file-based reporter for writing events to a dedicated file. You can use it for ingesting events into a third party system.

=== Configuration

File reporters are configurable in the `gravitee.yml` file `reporter` section with the following properties:

|===
|property | type | required | description

|directory
|string
|N
|Path to the file creation directory. The directory must exist (default: `${gravitee.home}/audit-logs/`)

|output
|string
|N
|Format used to export events. Possible values: JSON, MESSAGE_PACK, ELASTICSEARCH, CSV (default: JSON)
|===

[source,yaml]
----
reporters:
  file:
    #directory:  # directory where the files are created (this directory must exist): default value = ${gravitee.home}/audit-logs/
    #output: JSON # JSON, ELASTICSEARCH, MESSAGE_PACK, CSV
----

NOTE: Audit logs will be created in a directory tree that represents the resource hierarchy from the organization to the domain. For example, audit logs for domain `my-domain` in environment `dev` and organization `my-company` will be created in the following directory tree: `${reporters.file.directory}/my-company/dev/my-domain/audit-2021_02_11.json`

WARNING: There is currently no retention period for the audit logs, so you need to create a separate process to remove old logs.

For details of how to create a file reporter for a domain, see link:/am/current/am_userguide_audit_log_file.html[Audit log file^].

{'fraction_non_alphanumeric': 0.08441131330848498, 'fraction_numerical': 0.00526200394650296, 'mean_word_length': 5.002631578947368, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3838524', 'n_tokens_mistral': 1315, 'n_tokens_neox': 1262, 'n_words': 546}