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