Internal logs

Expose all log and trace messages emitted by the running Vector instance

status: beta role: aggregator role: daemon role: sidecar delivery: at-least-once egress: stream state: stateless output: log
The internal logs source exposes all log and trace messages emitted by the running Vector instance.

Configuration

Example configurations

{
  "sources": {
    "my_source_id": {
      "type": "internal_logs"
    }
  }
}
[sources.my_source_id]
type = "internal_logs"
---
sources:
  my_source_id:
    type: internal_logs
{
  "sources": {
    "my_source_id": {
      "type": "internal_logs",
      "host_key": "host",
      "pid_key": "pid"
    }
  }
}
[sources.my_source_id]
type = "internal_logs"
host_key = "host"
pid_key = "pid"
---
sources:
  my_source_id:
    type: internal_logs
    host_key: host
    pid_key: pid

host_key

optional string literal

The key name added to each event representing the current host. This can also be globally set via the global host_key option.

Set to "" to suppress this key.

default: host

pid_key

optional string literal

The key name added to each event representing the current process ID.

Set to "" to suppress this key.

default: pid

Output

Logs

Line

An individual log or trace message.
Fields
* required *
Each field from the original message is copied into the event.
host required string literal
The local hostname, equivalent to the gethostname command.
Examples
my-host.local
message required string literal
The textual message for this log or trace.
Examples
Vector has started.
metadata required object
Metadata from the source log or trace event.
pid required uint
The process ID of the Vector instance.
Examples
4232
timestamp required timestamp
The exact time the log or trace was generated.
Examples
2020-10-10T17:07:36.452332Z

Telemetry

Metrics

link

component_sent_event_bytes_total

counter
The total number of event bytes emitted by this component.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_scope required
The Vector component scope.
component_type required
The Vector component type.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

component_sent_events_total

counter
The total number of events emitted by this component.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_scope required
The Vector component scope.
component_type required
The Vector component type.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

events_out_total

counter
The total number of events emitted by this component. This metric is deprecated and will be removed in a future version. Use component_sent_events_total instead.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_scope required
The Vector component scope.
component_type required
The Vector component type.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

How it works

Context

By default, the internal_logs source augments events with helpful context keys.

Logs are limited by startup options

At startup, the selection of log messages generated by Vector is determined by a combination of the LOG environment variable and the --quiet and --verbose command-line options. The internal_logs source only receives logs that are generated by these options.

State

This component is stateless, meaning its behavior is consistent across each input.