github.com/observiq/carbon@v0.9.11-0.20200820160507-1b872e368a5e/docs/operators/host_metadata.md (about)

     1  ## `host_metadata` operator
     2  
     3  The `host_metadata` operator adds hostname and ip to the resource of incoming entries.
     4  
     5  ### Configuration Fields
     6  
     7  | Field              | Default          | Description                                                                                     |
     8  | ---                | ---              | ---                                                                                             |
     9  | `id`               | `host_metadata`  | A unique identifier for the operator                                                            |
    10  | `output`           | Next in pipeline | The connected operator(s) that will receive all outbound entries                                |
    11  | `include_hostname` | `true`           | Whether to set the `hostname` on the resource of incoming entries                               |
    12  | `include_ip`       | `true`           | Whether to set the `ip` on the resource of incoming entries                                     |
    13  | `on_error`         | `send`           | The behavior of the operator if it encounters an error. See [on_error](/docs/types/on_error.md) |
    14  
    15  ### Example Configurations
    16  
    17  #### Add static tags and labels
    18  
    19  Configuration:
    20  ```yaml
    21  - type: host_metadata
    22    include_hostname: true
    23    include_ip: true
    24  ```
    25  
    26  <table>
    27  <tr><td> Input entry </td> <td> Output entry </td></tr>
    28  <tr>
    29  <td>
    30  
    31  ```json
    32  {
    33    "timestamp": "2020-06-15T11:15:50.475364-04:00",
    34    "record": {
    35      "message": "test"
    36    }
    37  }
    38  ```
    39  
    40  </td>
    41  <td>
    42  
    43  ```json
    44  {
    45    "timestamp": "2020-06-15T11:15:50.475364-04:00",
    46    "resource": {
    47      "hostname": "my_host",
    48      "ip": "0.0.0.0",
    49    },
    50    "record": {
    51      "message": "test"
    52    }
    53  }
    54  ```
    55  
    56  </td>
    57  </tr>
    58  </table>