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

     1  ## `k8s_event_input` operator
     2  
     3  The `k8s_event_input` operator generates logs from Kubernetes events. It does this by connecting to the
     4  Kubernetes API, and currently requires that Carbon is running inside a Kubernetes cluster.
     5  
     6  ### Configuration Fields
     7  
     8  | Field        | Default           | Description                                                                                      |
     9  | ---          | ---               | ---                                                                                              |
    10  | `id`         | `k8s_event_input` | A unique identifier for the operator                                                             |
    11  | `output`     | Next in pipeline  | The connected operator(s) that will receive all outbound entries                                 |
    12  | `namespaces` | All namespaces    | An array of namespaces to collect events from. If unset, defaults to all namespaces.             |
    13  | `write_to`   | $                 | The record [field](/docs/types/field.md) written to when creating a new log entry                |
    14  | `labels`     | {}                | A map of `key: value` labels to add to the entry's labels                                        |
    15  | `resource`   | {}                | A map of `key: value` labels to add to the entry's resource                                      |
    16   
    17  ### Example Configurations
    18  
    19  #### Mock a file input
    20  
    21  Configuration:
    22  ```yaml
    23  - type: k8s_event_input
    24  ```
    25  
    26  Output events:
    27  ```json
    28  {
    29    "timestamp": "2020-08-13T17:41:44.581552468Z",
    30    "severity": 0,
    31    "labels": {
    32      "event_type": "ADDED"
    33    },
    34    "record": {
    35      "count": 1,
    36      "eventTime": null,
    37      "firstTimestamp": "2020-08-13T16:43:57Z",
    38      "involvedObject": {
    39        "apiVersion": "v1",
    40        "fieldPath": "spec.containers{carbon}",
    41        "kind": "Pod",
    42        "name": "carbon-g6rzd",
    43        "namespace": "default",
    44        "resourceVersion": "18292818",
    45        "uid": "47d965e6-4bb3-4c58-a089-1a8b16bf21b0"
    46      },
    47      "lastTimestamp": "2020-08-13T16:43:57Z",
    48      "message": "Pulling image \"observiq/carbon:dev\"",
    49      "metadata": {
    50        "creationTimestamp": "2020-08-13T16:43:57Z",
    51        "name": "carbon-g6rzd.162ae19292cebe25",
    52        "namespace": "default",
    53        "resourceVersion": "29923",
    54        "selfLink": "/api/v1/namespaces/default/events/carbon-g6rzd.162ae19292cebe25",
    55        "uid": "d210b74b-5c58-473f-ac51-3e21f6f8e2d1"
    56      },
    57      "reason": "Pulling",
    58      "reportingComponent": "",
    59      "reportingInstance": "",
    60      "source": {
    61        "component": "kubelet",
    62        "host": "kube-master-1"
    63      },
    64      "type": "Normal"
    65    }
    66  }
    67  ```