Apache Pulsar Sink

The Vector pulsar sink sends logs to Apache Pulsar.

Configuration

[sinks.my_sink_id]
# General
type = "pulsar" # required
inputs = ["my-source-or-transform-id"] # required
endpoint = "pulsar://127.0.0.1:6650" # required
healthcheck = true # optional, default
topic = "topic-1234" # required
# Encoding
encoding.codec = "text" # required
  • optionaltable

    auth

    Options for the authentication strategy.

    • optionalstring

      name

      The basic authentication name.

      • View examples
    • optionalstring

      token

      The basic authentication password.

      • View examples
  • commonrequiredtable

    encoding

    Configures the encoding specific sink behavior.

    • commonrequiredstring

      codec

      The encoding codec used to serialize the events before outputting.

      • View examples
    • optional[string]

      except_fields

      Prevent the sink from encoding the specified labels.

      • View examples
    • optional[string]

      only_fields

      Prevent the sink from encoding the specified labels.

      • View examples
    • enumoptionalstring

      timestamp_format

      How to format event timestamps.

      • Default: "rfc3339"
      • Enum, must be one of: "rfc3339" "unix"
      • View examples
  • commonrequiredstring

    endpoint

    Endpoint to which the pulsar client should connect to.

    • View examples
  • commonoptionalbool

    healthcheck

    Enables/disables the sink healthcheck upon Vector boot. See Health checks for more info.

    • Default: true
    • View examples
  • commonrequiredstring

    topic

    The Pulsar topic name to write events to.

    • View examples

Telemetry

This component provides the following metrics that can be retrieved through the internal_metrics source. See the metrics section in the monitoring page for more info.

  • counter

    processed_events_total

    The total number of events processed by this component. This metric includes the following tags:

    • component_kind - The Vector component kind.

    • component_name - The Vector component ID.

    • component_type - The Vector component type.

    • file - The file that produced the error

    • instance - The Vector instance identified by host and port.

    • job - The name of the job producing Vector metrics.

  • counter

    processed_bytes_total

    The total number of bytes processed by the component. This metric includes the following tags:

    • component_kind - The Vector component kind.

    • component_name - The Vector component ID.

    • component_type - The Vector component type.

    • instance - The Vector instance identified by host and port.

    • job - The name of the job producing Vector metrics.

How It Works

Health checks

Health checks ensure that the downstream service is accessible and ready to accept data. This check is performed upon sink initialization. If the health check fails an error will be logged and Vector will proceed to start.

Require health checks

If you'd like to exit immediately upon a health check failure, you can pass the --require-healthy flag:

vector --config /etc/vector/vector.toml --require-healthy

Disable health checks

If you'd like to disable health checks for this sink you can set the healthcheck option to false.