API7 Docs
ObservabilityError Log Logger

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

  • tcpobject · optional

    TCP server configurations.

    • hoststring · required

      IP address or the hostname of the TCP server.

    • portinteger · required

      Valid values: greater than or equal to 0

      Target upstream port.

    • tlsboolean · optional · default: false

      If true, perform SSL verification.

    • tls_server_namestring · optional

      Server name for the new TLS extension SNI.

  • skywalkingobject · optional

    Skywalking server configurations.

    • endpoint_addrstring · optional · default: http://127.0.0.1:12900/v3/logs

      Address of the SkyWalking server.

    • service_namestring · optional · default: APISIX

      Service name for the SkyWalking reporter.

    • service_instance_namestring · optional · default: APISIX Service Instance

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

  • clickhouseobject · optional

    ClickHouse server configurations.

    • endpoint_addrstring · optional · default: http://127.0.0.1:8123

      ClickHouse endpoint.

    • userstring · optional · default: default

      ClickHouse username.

    • passwordstring · optional

      ClickHouse password.

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

    • databasestring · optional

      Name of the database to store the logs.

    • logtablestring · optional

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

  • kafkaobject · optional

    Kafka server configurations.

    • brokersarray · required

      Valid values: greater than 0

      List of Kafka broker nodes.

      • hoststring · required

        The host of Kafka broker.

      • portinteger · required

        The port of Kafka broker.

      • sasl_configobject · optional

        The SASL configuration of Kafka broker

        • mechanismstring · optional · default: PLAIN

          Valid values: PLAIN

          The mechanism of SASL configuration.

        • userstring · required

          The user of SASL configuration.

        • passwordstring · required

          Password for the Kafka SASL configuration. The value is encrypted before storage when data encryption is enabled.

    • tlsobject · optional

      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.

      • verifyboolean · optional · default: false

        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_topicstring · required

      Target topic to push the logs for organization.

    • producer_typestring · optional · default: async

      Valid values: async or sync

      Target topic to push the logs for organization.

    • required_acksinteger · optional · default: 1

      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.

    • keystring · optional

      Key used for allocating partitions for messages.

    • cluster_nameinteger · optional · default: 1

      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_intervalinteger · optional · default: 30

      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.

  • timeoutinteger · optional · default: 3

    Valid values: greater than 0

    Time to keep the connection alive after sending a request.

  • keepaliveinteger · optional · default: 30

    Valid values: greater than or equal to 1

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

  • levelstring · optional · default: WARN

    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.

  • namestring · optional · default: error-log-logger

    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_sizeinteger · optional · default: 1000

    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_timeoutinteger · optional · default: 3

    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_durationinteger · optional · default: 60

    Valid values: greater than 0

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

  • retry_delayinteger · optional · default: 1

    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_countinteger · optional · default: 0

    Valid values: greater than or equal to 0

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