github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/metrics/aws_cloudwatch.md (about)

     1  ---
     2  title: aws_cloudwatch
     3  type: metrics
     4  status: stable
     5  ---
     6  
     7  <!--
     8       THIS FILE IS AUTOGENERATED!
     9  
    10       To make changes please edit the contents of:
    11       lib/metrics/aws_cloudwatch.go
    12  -->
    13  
    14  import Tabs from '@theme/Tabs';
    15  import TabItem from '@theme/TabItem';
    16  
    17  
    18  Send metrics to AWS CloudWatch using the PutMetricData endpoint.
    19  
    20  Introduced in version 3.36.0.
    21  
    22  
    23  <Tabs defaultValue="common" values={[
    24    { label: 'Common', value: 'common', },
    25    { label: 'Advanced', value: 'advanced', },
    26  ]}>
    27  
    28  <TabItem value="common">
    29  
    30  ```yaml
    31  # Common config fields, showing default values
    32  metrics:
    33    aws_cloudwatch:
    34      namespace: Benthos
    35      path_mapping: ""
    36      region: eu-west-1
    37  ```
    38  
    39  </TabItem>
    40  <TabItem value="advanced">
    41  
    42  ```yaml
    43  # All config fields, showing default values
    44  metrics:
    45    aws_cloudwatch:
    46      namespace: Benthos
    47      flush_period: 100ms
    48      path_mapping: ""
    49      region: eu-west-1
    50      endpoint: ""
    51      credentials:
    52        profile: ""
    53        id: ""
    54        secret: ""
    55        token: ""
    56        role: ""
    57        role_external_id: ""
    58  ```
    59  
    60  </TabItem>
    61  </Tabs>
    62  
    63  It is STRONGLY recommended that you reduce the metrics that are exposed with a
    64  `path_mapping` like this:
    65  
    66  ```yaml
    67  metrics:
    68    aws_cloudwatch:
    69      namespace: Foo
    70      path_mapping: |
    71        if ![
    72          "input.received",
    73          "input.latency",
    74          "output.sent",
    75        ].contains(this) { deleted() }
    76  ```
    77  
    78  ## Fields
    79  
    80  ### `namespace`
    81  
    82  The namespace used to distinguish metrics from other services.
    83  
    84  
    85  Type: `string`  
    86  Default: `"Benthos"`  
    87  
    88  ### `flush_period`
    89  
    90  The period of time between PutMetricData requests.
    91  
    92  
    93  Type: `string`  
    94  Default: `"100ms"`  
    95  
    96  ### `path_mapping`
    97  
    98  An optional [Bloblang mapping](/docs/guides/bloblang/about) that allows you to rename or prevent certain metrics paths from being exported. When metric paths are created, renamed and dropped a trace log is written, enabling TRACE level logging is therefore a good way to diagnose path mappings. BETA FEATURE: Labels can also be created for the metric path by mapping meta fields.
    99  
   100  
   101  Type: `string`  
   102  Default: `""`  
   103  
   104  ```yaml
   105  # Examples
   106  
   107  path_mapping: this.replace("input", "source").replace("output", "sink")
   108  
   109  path_mapping: |-
   110    if ![
   111      "benthos.input.received",
   112      "benthos.input.latency",
   113      "benthos.output.sent"
   114    ].contains(this) { deleted() }
   115  
   116  path_mapping: |-
   117    let matches = this.re_find_all_submatch("resource_processor_([a-zA-Z]+)_(.*)")
   118    meta processor = $matches.0.1 | deleted()
   119    root = $matches.0.2 | deleted()
   120  ```
   121  
   122  ### `region`
   123  
   124  The AWS region to target.
   125  
   126  
   127  Type: `string`  
   128  Default: `"eu-west-1"`  
   129  
   130  ### `endpoint`
   131  
   132  Allows you to specify a custom endpoint for the AWS API.
   133  
   134  
   135  Type: `string`  
   136  Default: `""`  
   137  
   138  ### `credentials`
   139  
   140  Optional manual configuration of AWS credentials to use. More information can be found [in this document](/docs/guides/cloud/aws).
   141  
   142  
   143  Type: `object`  
   144  
   145  ### `credentials.profile`
   146  
   147  A profile from `~/.aws/credentials` to use.
   148  
   149  
   150  Type: `string`  
   151  Default: `""`  
   152  
   153  ### `credentials.id`
   154  
   155  The ID of credentials to use.
   156  
   157  
   158  Type: `string`  
   159  Default: `""`  
   160  
   161  ### `credentials.secret`
   162  
   163  The secret for the credentials being used.
   164  
   165  
   166  Type: `string`  
   167  Default: `""`  
   168  
   169  ### `credentials.token`
   170  
   171  The token for the credentials being used, required when using short term credentials.
   172  
   173  
   174  Type: `string`  
   175  Default: `""`  
   176  
   177  ### `credentials.role`
   178  
   179  A role ARN to assume.
   180  
   181  
   182  Type: `string`  
   183  Default: `""`  
   184  
   185  ### `credentials.role_external_id`
   186  
   187  An external ID to provide when assuming a role.
   188  
   189  
   190  Type: `string`  
   191  Default: `""`  
   192  
   193