github.com/observiq/bindplane-agent@v1.51.0/docs/logging.md (about)

     1  # Logging
     2  
     3  The BindPlane Agent offers two methods of collecting logs. First is individual receivers such as Filelog and Journald. Second is the Plugin receiver which utilizes pre-configured plugins to gather logs from many different sources.
     4  
     5  ## Using Indivudal Receivers
     6  
     7  To add logging using an individual receiver, add the receiver into your `config.yaml` similar to the Filelog example below. The available logging receivers include:
     8  
     9   * [Filelog Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver)
    10   * [TCP Log Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/tcplogreceiver)
    11   * [UDP Log Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/udplogreceiver)
    12   * [Syslog Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/syslogreceiver)
    13   * [Journald Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/journaldreceiver)
    14   * [Windows Events Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/windowseventlogreceiver)
    15  
    16  To see a full list of receivers, check the [Receivers](/docs/receivers.md) page.
    17  
    18  The example below uses the Filelog receiver. Additional [operators](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/stanza/docs/operators/README.md#what-operators-are-available) can be added to further parse logs. To see more details on the Filelog receiver, see the [OTel documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver). 
    19  
    20  ```yaml
    21  receivers:
    22    filelog:
    23      # Add relevant log paths to the include parameter
    24      include: ["/tmp/*.log"]
    25      start_at: "end"
    26      # Optionally add operators for further parsing
    27      operators:
    28        - type: json_parser
    29          timestamp:
    30            parse_from: attributes.time
    31            layout: '%Y-%m-%d %H:%M:%S'
    32  
    33  exporters:
    34    googlecloud:
    35      # To add logging to Google CLoud, add the log parameter to the exporter.
    36      project: my-project
    37      log:
    38        # Optionally, default_log_name parameter is not required
    39        default_log_name: opentelemetry.io/grpc-collector-exported-log
    40  
    41  processors:
    42    batch:
    43  
    44  service:
    45    pipelines:
    46      # Make sure to have a logs section in the pipeline
    47      logs:
    48        receivers: [filelog]
    49        processors: [batch]
    50        exporters: [googlecloud]
    51  
    52  ```
    53  
    54  ## Using the Plugin Receiver
    55  
    56  To add logging using the Plugin receiver, add the receiver into your `config.yaml` similar to the example below. For more information on the Plugin receiver, see the [documentation page](/receiver/pluginreceiver/README.md). To see a full list of available plugins, see the [plugins folder](/plugins/).
    57  
    58  ```yaml
    59  receivers:
    60    plugin:
    61      # Add the path to the plugin you wish to configure
    62      path: ./plugins/simplehost.yaml
    63      # Configure parameters for the specified plugin
    64      parameters:
    65        enable_cpu: false
    66        enable_memory: true
    67  
    68  exporters:
    69    googlecloud:
    70      # To add logging to Google CLoud, add the log parameter to the exporter.
    71      project: my-project
    72      log:
    73        default_log_name: opentelemetry.io/grpc-collector-exported-log
    74  
    75  processors:
    76    batch:
    77  
    78  service:
    79    pipelines:
    80      # Make sure to have a logs section in the pipeline
    81      logs:
    82        receivers: [plugin]
    83        processors: [batch]
    84        exporters: [googlecloud]
    85  
    86  ```