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
acknowledgements: no
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 literalOverrides the name of the log field used to add the current hostname to each event.
By default, the global log_schema.host_key
option is used.
Set to ""
to suppress this key.
default:
host
pid_key
optional string literalOverrides the name of the log field used to add the current process ID to each event.
By default, "pid"
is used.
Set to ""
to suppress this key.
default:
pid
Outputs
<component_id>
Default output stream of the component. Use this component’s ID as an input to downstream transforms and sinks.
Output Data
Logs
Line
An individual log or trace message.
*
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
source_type
required
string
literal
The name of the source type.
Examples
internal_logs
timestamp
required
timestamp
The exact time the log or trace was generated.
Examples
2020-10-10T17:07:36.452332Z
Telemetry
Metrics
linkcomponent_discarded_events_total
counterThe number of events dropped by this component.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_name
Deprecated, use
component_id
instead. The value is the same as component_id
.component_type
The Vector component type.
host
optional
The hostname of the system Vector is running on.
pid
optional
The process ID of the Vector instance.
component_errors_total
counterThe total number of errors encountered by this component.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_name
Deprecated, use
component_id
instead. The value is the same as component_id
.component_type
The Vector component type.
error_type
The type of the error
host
optional
The hostname of the system Vector is running on.
pid
optional
The process ID of the Vector instance.
stage
The stage within the component at which the error occurred.
component_received_event_bytes_total
counterThe number of event bytes accepted by this component either from
tagged origins like file and uri, or cumulatively from other origins.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_name
Deprecated, use
component_id
instead. The value is the same as component_id
.component_type
The Vector component type.
container_name
optional
The name of the container from which the data originated.
file
optional
The file from which the data originated.
host
optional
The hostname of the system Vector is running on.
mode
optional
The connection mode used by the component.
peer_addr
optional
The IP from which the data originated.
peer_path
optional
The pathname from which the data originated.
pid
optional
The process ID of the Vector instance.
pod_name
optional
The name of the pod from which the data originated.
uri
optional
The sanitized URI from which the data originated.
component_received_events_total
counterThe number of events accepted by this component either from tagged
origins like file and uri, or cumulatively from other origins.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_name
Deprecated, use
component_id
instead. The value is the same as component_id
.component_type
The Vector component type.
container_name
optional
The name of the container from which the data originated.
file
optional
The file from which the data originated.
host
optional
The hostname of the system Vector is running on.
mode
optional
The connection mode used by the component.
peer_addr
optional
The IP from which the data originated.
peer_path
optional
The pathname from which the data originated.
pid
optional
The process ID of the Vector instance.
pod_name
optional
The name of the pod from which the data originated.
uri
optional
The sanitized URI from which the data originated.
component_sent_event_bytes_total
counterThe total number of event bytes emitted by this component.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_name
Deprecated, use
component_id
instead. The value is the same as component_id
.component_type
The Vector component type.
host
optional
The hostname of the system Vector is running on.
output
optional
The specific output of the component.
pid
optional
The process ID of the Vector instance.
component_sent_events_total
counterThe total number of events emitted by this component.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_name
Deprecated, use
component_id
instead. The value is the same as component_id
.component_type
The Vector component type.
host
optional
The hostname of the system Vector is running on.
output
optional
The specific output of the component.
pid
optional
The process ID of the Vector instance.
events_out_total
counterThe 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
The Vector component ID.
component_kind
The Vector component kind.
component_name
Deprecated, use
component_id
instead. The value is the same as component_id
.component_type
The Vector component type.
host
optional
The hostname of the system Vector is running on.
output
optional
The specific output of the component.
pid
optional
The process ID of the Vector instance.
source_lag_time_seconds
histogramThe difference between the timestamp recorded in each event and the time when it was ingested, expressed as fractional seconds.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_name
Deprecated, use
component_id
instead. The value is the same as component_id
.component_type
The Vector component type.
host
optional
The hostname of the system Vector is running on.
pid
optional
The process ID of the Vector instance.
How it works
Logs are limited by startup options
At startup, the selection of log messages generated by Vector is determined by a
combination of the
VECTOR_LOG
environment variable and the --quiet
and --verbose
command-line options. The internal_logs
source only receives logs that are generated by these options.