Error Log Logger Configuration
Parameters
See plugin common configurations 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· optionalTCP server configurations.
-
host—string· requiredIP address or the hostname of the TCP server.
-
port—integer· requiredValid values: greater than or equal to 0
Target upstream port.
-
tls—boolean· optional · default:falseIf true, perform SSL verification.
-
tls_server_name—string· optionalServer name for the new TLS extension SNI.
-
-
skywalking—object· optionalSkywalking server configurations.
-
endpoint_addr—string· optional · default:http://127.0.0.1:12900/v3/logsAddress of the SkyWalking server.
-
service_name—string· optional · default:APISIXService name for the SkyWalking reporter.
-
service_instance_name—string· optional · default:APISIX Service InstanceService instance name for the SkyWalking reporter. Set to
$hostnameto get the local hostname.
-
-
clickhouse—object· optionalClickHouse server configurations.
-
endpoint_addr—string· optional · default:http://127.0.0.1:8123ClickHouse endpoint.
-
user—string· optional · default:defaultClickHouse username.
-
password—string· optionalClickHouse password.
The password is encrypted with AES before being stored in etcd.
-
database—string· optionalName of the database to store the logs.
-
logtable—string· optionalTable name to store the logs. The table should have a
datacolumn where the plugin will push logs to.
-
-
kafka—object· optionalKafka server configurations.
-
brokers—array· requiredValid values: greater than 0
List of Kafka broker nodes.
-
host—string· requiredThe host of Kafka broker.
-
port—integer· requiredThe port of Kafka broker.
-
sasl_config—object· optionalThe SASL configuration of Kafka broker
-
mechanism—string· optional · default:PLAINValid values:
PLAINThe mechanism of SASL configuration.
-
user—string· requiredThe user of SASL configuration.
-
password—string· requiredPassword for the Kafka SASL configuration. The value is encrypted before storage when data encryption is enabled.
-
-
-
tls—object· optionalTLS 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:falseIf true, verify the Kafka broker's TLS certificate against the configured trusted CA store. The default is
false, so enablingtlsencrypts the connection but does not authenticate the broker. Set it totruein production.
-
-
kafka_topic—string· requiredTarget topic to push the logs for organization.
-
producer_type—string· optional · default:asyncValid values:
asyncorsyncTarget topic to push the logs for organization.
-
required_acks—integer· optional · default:1Valid 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· optionalKey used for allocating partitions for messages.
-
cluster_name—integer· optional · default:1Valid values: greater than or equal to 1
Name of the cluster. Used when there are two or more Kafka clusters. Only works if
producer_typeis set toasync. -
meta_refresh_interval—integer· optional · default:30Valid values: greater than or equal to 1
Time interval to auto refresh the metadata. Same as the
refresh_intervalparameter in lua-resty-kafka, but in seconds.
-
-
timeout—integer· optional · default:3Valid values: greater than 0
Time to keep the connection alive after sending a request.
-
keepalive—integer· optional · default:30Valid values: greater than or equal to 1
Time to keep the connection alive after sending data, in seconds.
-
level—string· optional · default:WARNValid values:
STDERR,EMERG,ALERT,CRIT,ERR,ERROR,WARN,NOTICE,INFO, orDEBUGSeverity level to filter the error logs. Note that
ERRis the same asERROR. -
name—string· optional · default:error-log-loggerUnique 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:1000Valid 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:3Valid 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:60Valid 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:1Valid 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:0Valid values: greater than or equal to 0
The maximum number of unsuccessful retries allowed before dropping the log entries.