The host_metadata
operator adds hostname and ip to the resource of incoming entries.
Field | Default | Description |
---|---|---|
id |
host_metadata |
A unique identifier for the operator |
output |
Next in pipeline | The connected operator(s) that will receive all outbound entries |
include_hostname |
true |
Whether to set the hostname on the resource of incoming entries |
include_ip |
true |
Whether to set the ip on the resource of incoming entries |
on_error |
send |
The behavior of the operator if it encounters an error. See on_error |
Configuration:
- type: host_metadata
include_hostname: true
include_ip: true
Input entry | Output entry |
{
"timestamp": "2020-06-15T11:15:50.475364-04:00",
"record": {
"message": "test"
}
} |
{
"timestamp": "2020-06-15T11:15:50.475364-04:00",
"resource": {
"hostname": "my_host",
"ip": "0.0.0.0",
},
"record": {
"message": "test"
}
} |