Skip to content

Latest commit

 

History

History
58 lines (47 loc) · 1.63 KB

host_metadata.md

File metadata and controls

58 lines (47 loc) · 1.63 KB

host_metadata operator

The host_metadata operator adds hostname and ip to the resource of incoming entries.

Configuration Fields

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

Example Configurations

Add static tags and labels

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"
  }
}