Internal Logs Source
The Vector internal_logs
source
the internal logs source exposes all log and trace messages emitted by the
running Vector instance.
Requirements
Configuration
- Common
- Advanced
- vector.toml
- vector.yaml
- vector.json
[sources.my_source_id]type = "internal_logs" # required
Output
This component outputs log events with the following fields:
{"*" : null,"message" : "Vector has started.","metadata" : {"kind" : "event","level" : "TRACE","module_path" : "vector::internal_events::heartbeat","target" : "vector"},"timestamp" : "2020-10-10T17:07:36+00:00"}
- requiredstring
message
The textual message for this log or trace.
- View examples
- requiredtimestamp
timestamp
The exact time the log or trace was generated.
- View examples
- required*
*
Each field from the original message is copied into the event.
- requiredtable
metadata
Metadata from the source log or trace event.
- requiredstring
kind
What kind of call site caused this log or trace.
- Enum, must be one of:
"event"
"span"
- View examples
- Enum, must be one of:
- requiredstring
level
The level of verbosity of the described span or event.
- Enum, must be one of:
"TRACE"
"DEBUG"
"INFO"
"WARN"
"ERROR"
- View examples
- Enum, must be one of:
- requiredstring
module_path
The path to the internal module where the span occurred
- View examples
- requiredstring
target
Describes the part of the system where the span or event that this metadata describes occurred.
- 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 errorinstance
- 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
Context
By default, the internal_logs
source will augment events with helpful
context keys as shown in the "Output" section.
Logs are limited by startup options
At startup, the selection of log messages generated byvector is set by a combination of the `$LOG` environmentvariable and the `--quiet` and `--verbose` command-lineoptions. This internal logs source will only receivelogs that are generated by these options.