Docs

Error Log Logger Configuration

Configuration reference for the Error Log Logger plugin (`error-log-logger`): the parameters and plugin metadata, each attribute with its type, whether it is required, its default and its accepted values.

Parameters

See plugin common configurations (opens in Apache APISIX docs) for configuration options available to all plugins.

There are no parameters for this plugin to be configured on routes or services.

Plugin Metadata

tcp — object · optional · since APISIX 2.9

TCP server configurations.

host — string · required · since APISIX 2.9

IP address or the hostname of the TCP server.

port — integer · required · since APISIX 2.9

Valid values: greater than or equal to 0

Target upstream port.

tls — boolean · optional · default: false · since APISIX 2.9

If true, perform SSL verification.

tls_server_name — string · optional · since APISIX 2.9

Server name for the new TLS extension SNI.

skywalking — object · optional · since APISIX 2.9

Skywalking server configurations.

endpoint_addr — string · optional · default: http://127.0.0.1:12900/v3/logs · since APISIX 2.9

Address of the SkyWalking server.

service_name — string · optional · default: APISIX · since APISIX 2.9

Service name for the SkyWalking reporter.

service_instance_name — string · optional · default: APISIX Service Instance · since APISIX 2.9

Service instance name for the SkyWalking reporter. Set to $hostname to get the local hostname.

clickhouse — object · optional · since APISIX 2.13.0

ClickHouse server configurations.

endpoint_addr — string · optional · default: http://127.0.0.1:8123 · since APISIX 2.13.0

ClickHouse endpoint.

user — string · optional · default: default · since APISIX 2.13.0

ClickHouse username.

password — string · optional · since APISIX 2.13.0

ClickHouse password.

The password is encrypted with AES before being stored in etcd.

database — string · optional · since APISIX 2.13.0

Name of the database to store the logs.

logtable — string · optional · since APISIX 2.13.0

Table name to store the logs. The table should have a data column where the plugin will push logs to.

kafka — object · optional · since APISIX 3.2.0

Kafka server configurations.

brokers — array · required · since APISIX 3.2.0

Valid values: greater than 0

List of Kafka broker nodes.

host — string · required · since APISIX 3.2.0

The host of Kafka broker.

port — integer · required · since APISIX 3.2.0

The port of Kafka broker.

sasl_config — object · optional · since APISIX 3.2.0

The SASL configuration of Kafka broker

mechanism — string · optional · default: PLAIN · since APISIX 3.2.0

Valid values: PLAIN

The mechanism of SASL configuration.

user — string · required · since APISIX 3.2.0

The user of SASL configuration.

password — string · required · since APISIX 3.2.0

Password for the Kafka SASL configuration. The value is encrypted before storage (opens in Apache APISIX docs) when data encryption is enabled.

tls — object · optional · since APISIX 3.18.0 · API7 Gateway 3.9.17

TLS configuration for connecting to Kafka brokers. Setting this object makes the plugin connect over TLS; omit it to connect in plaintext. Introduced in API7 Enterprise 3.9.17 and 3.10.4, and APISIX 3.18.0.

verify — boolean · optional · default: false · since APISIX 3.18.0 · API7 Gateway 3.9.17

If true, verify the Kafka broker's TLS certificate against the configured trusted CA store. The default is false, so enabling tls encrypts the connection but does not authenticate the broker. Set it to true in production.

kafka_topic — string · required · since APISIX 3.2.0

Target topic to push the logs for organization.

producer_type — string · optional · default: async · since APISIX 3.2.0

Valid values: async or sync

Target topic to push the logs for organization.

required_acks — integer · optional · default: 1 · since APISIX 3.2.0

Valid values: -1, 0, or 1

Number of acknowledgements the leader needs to receive for the producer to consider the request complete. This controls the durability of the sent records. See Kafka documentation for more information.

key — string · optional · since APISIX 3.2.0

Key used for allocating partitions for messages.

cluster_name — integer · optional · default: 1 · since APISIX 3.2.0

Valid values: greater than or equal to 1

Name of the cluster. Used when there are two or more Kafka clusters. Only works if producer_type is set to async.

meta_refresh_interval — integer · optional · default: 30 · since APISIX 3.2.0

Valid values: greater than or equal to 1

Time interval to auto refresh the metadata. Same as the refresh_interval parameter in lua-resty-kafka, but in seconds.

timeout — integer · optional · default: 3 · since APISIX 2.2

Valid values: greater than 0

Time to keep the connection alive after sending a request.

keepalive — integer · optional · default: 30 · since APISIX 2.2

Valid values: greater than or equal to 1

Time to keep the connection alive after sending data, in seconds.

level — string · optional · default: WARN · since APISIX 2.2

Valid values: STDERR, EMERG, ALERT, CRIT, ERR, ERROR, WARN, NOTICE, INFO, or DEBUG

Severity level to filter the error logs. Note that ERR is the same as ERROR.

name — string · optional · default: error-log-logger · since APISIX 2.2

Unique identifier of the plugin for the batch processor. If you use Prometheus to monitor APISIX metrics, the name is exported in apisix_batch_process_entries.

batch_max_size — integer · optional · default: 1000 · since APISIX 2.2

Valid values: greater than 0

The number of log entries allowed in one batch. Once reached, the batch will be sent to the configured logging service. Setting this parameter to 1 means immediate processing.

inactive_timeout — integer · optional · default: 3 · since APISIX 2.2

Valid values: greater than 0

The maximum time in seconds to wait for new logs before sending the batch to the logging service. The value should be smaller than buffer_duration.

buffer_duration — integer · optional · default: 60 · since APISIX 2.2

Valid values: greater than 0

The maximum time in seconds from the earliest entry allowed before sending the batch to the logging service.

retry_delay — integer · optional · default: 1 · since APISIX 2.2

Valid values: greater than or equal to 0

The time interval in seconds to retry sending the batch to the logging service if the batch was not successfully sent.

max_retry_count — integer · optional · default: 0 · since APISIX 2.2

Valid values: greater than or equal to 0

The maximum number of unsuccessful retries allowed before dropping the log entries.