-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When regenerating the doc, it updated the aws s3 doc.
- Loading branch information
Showing
5 changed files
with
179 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
apiVersion: camel.apache.org/v1alpha1 | ||
kind: Kamelet | ||
metadata: | ||
name: aws-cloudwatch-sink | ||
annotations: | ||
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIwNyIgaGVpZ2h0PSIyNTAwIiB2aWV3Qm94PSIwIDAgMjU2IDI5MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZD0iTTI1NiAxOTkuMzA1bC0xMjcuOTU3LTE4Ljc5N0wwIDE5OS4zMjlsMTI4LjAxIDQ3LjQzOUwyNTYgMTk5LjMwNSIgZmlsbD0iI0I3Q0E5RCIvPjxwYXRoIGQ9Ik0yNS42MjEgMTk3LjExM2wyMS42MyA2Ljc2MSAxLjk3MS0yLjIzOFY1MC4yODRsLTEuOTcxLTIuNTg1LTIxLjYzIDguMjc0djE0MS4xNCIgZmlsbD0iIzRCNjEyQyIvPjxwYXRoIGQ9Ik0xMjMuODMyIDE5MC40MjNsLTc2LjU4MSAxMy40NTFWNDcuNzAzbDc2LjU4MSAxNy4yMjJ2MTI1LjQ5OCIgZmlsbD0iIzc1OUMzRSIvPjxwYXRoIGQ9Ik04OS42ODYgMjE2Ljg4OWwtMjkuODQ4LTkuMjAxVjE0LjkyOEw4OS42ODYuMDA0bDIuNjEyIDIuODQ1djIxMC44NThsLTIuNjEyIDMuMTgyIiBmaWxsPSIjNEI2MTJDIi8+PHBhdGggZD0iTTE5MS45NjcgMTkyLjg5NEw4OS42ODYgMjE2Ljg4OVYwbDEwMi4yODEgMzkuODY2djE1My4wMjgiIGZpbGw9IiM3NTlDM0UiLz48cGF0aCBkPSJNMTI3Ljk2NSAyNDQuNzE0TDAgMTk5LjMyOXYyNi4zMjRsMTI3Ljk2NSA2My45ODN2LTQ0LjkyMiIgZmlsbD0iIzRCNjEyQyIvPjxwYXRoIGQ9Ik0yNTYgMjI1LjYyMmwtMTI4LjAzNSA2NC4wMTR2LTQ0LjkyMkwyNTYgMTk5LjMwNXYyNi4zMTciIGZpbGw9IiM3NTlDM0UiLz48cGF0aCBkPSJNMjIwLjAzOSAxNTUuNjkyaC0zMS4wMjZsLTg4LjQ0NSA2LjAyNkwxMjggMTY2Ljc3NWw5Mi4wMzktMTEuMDgzIiBmaWxsPSIjQjdDQTlEIi8+PHBhdGggZD0iTTEwMC41NjggMjE5LjkwNmwyNy40MiA4LjIyNi43ODktLjg0OS0uMDIzLTYxLjg0OS0uNzg5LS43NTgtMjcuMzk3LTIuOTU4djU4LjE4OCIgZmlsbD0iIzRCNjEyQyIvPjxwYXRoIGQ9Ik0yMjAuMDM5IDE1NS42OTJsLTkyLjA3NCA4Ljk4LjAyMyA2My40NiA5Mi4wNTEtMjcuNzExdi00NC43MjkiIGZpbGw9IiM3NTlDM0UiLz48L3N2Zz4K" | ||
camel.apache.org/provider: "Apache Software Foundation" | ||
labels: | ||
camel.apache.org/kamelet.type: "sink" | ||
spec: | ||
definition: | ||
title: "AWS CloudWatch Metrics Sink" | ||
description: |- | ||
Send messages to AWS CloudWatch metrics. | ||
You can set the Dimensions in the header, by using CamelAwsCwMetricDimensionName for the dimension name | ||
and CamelAwsCwMetricDimensionValue for the dimension value. | ||
Most of the property values can be defined in headers, overwriting any parameter previously defined: | ||
- CamelAwsCwMetricNamespace | ||
- CamelAwsCwMetricName | ||
- CamelAwsCwMetricValue | ||
- CamelAwsCwMetricUnit | ||
- CamelAwsCwMetricTimestamp | ||
- CamelAwsCwMetricDimensionName | ||
- CamelAwsCwMetricDimensionValue | ||
required: | ||
- cw_namespace | ||
- accessKey | ||
- secretKey | ||
- region | ||
- metricName | ||
- metricValue | ||
properties: | ||
cw_namespace: | ||
title: Cloud Watch Namespace | ||
description: The cloud watch metric namespace. | ||
type: string | ||
accessKey: | ||
title: Access Key | ||
description: The access key obtained from AWS. | ||
type: string | ||
x-descriptors: | ||
- urn:alm:descriptor:com.tectonic.ui:password | ||
secretKey: | ||
title: Secret Key | ||
description: The secret key obtained from AWS. | ||
type: string | ||
x-descriptors: | ||
- urn:alm:descriptor:com.tectonic.ui:password | ||
region: | ||
title: AWS Region | ||
description: The AWS region to connect to. | ||
type: string | ||
example: eu-west-1 | ||
metricName: | ||
title: Metric Name | ||
description: The metric name. | ||
type: string | ||
metricValue: | ||
title: Metric Value | ||
description: The metric value. | ||
type: double | ||
example: "1.2" | ||
unit: | ||
title: Metric Unit | ||
description: The metric unit | ||
type: string | ||
timestamp: | ||
title: Metric Timestamp | ||
description: The metric timestamp. | ||
type: long | ||
flow: | ||
from: | ||
uri: kamelet:source | ||
steps: | ||
- to: | ||
uri: "aws2-cw:{{cw_namespace}}" | ||
parameters: | ||
secretKey: "{{secretKey}}" | ||
accessKey: "{{accessKey}}" | ||
region: "{{region}}" | ||
name: "{{metricName}}" | ||
value: "{{metricValue}}" | ||
unit: "{{unit}}" | ||
timestamp: "{{timestamp}}" |
1 change: 1 addition & 0 deletions
1
docs/modules/ROOT/assets/images/kamelets/aws-cloudwatch-sink.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT | ||
= image:kamelets/aws-cloudwatch-sink.svg[] AWS CloudWatch Metrics Sink | ||
|
||
*Provided by: "Apache Software Foundation"* | ||
|
||
Send messages to AWS CloudWatch metrics. | ||
|
||
You can set the Dimensions in the header, by using CamelAwsCwMetricDimensionName for the dimension name | ||
and CamelAwsCwMetricDimensionValue for the dimension value. | ||
|
||
Most of the property values can be defined in headers, overwriting any parameter previously defined: | ||
- CamelAwsCwMetricNamespace | ||
- CamelAwsCwMetricName | ||
- CamelAwsCwMetricValue | ||
- CamelAwsCwMetricUnit | ||
- CamelAwsCwMetricTimestamp | ||
- CamelAwsCwMetricDimensionName | ||
- CamelAwsCwMetricDimensionValue | ||
|
||
== Configuration Options | ||
|
||
The following table summarizes the configuration options available for the `aws-cloudwatch-sink` Kamelet: | ||
[width="100%",cols="2,^2,3,^2,^2,^3",options="header"] | ||
|=== | ||
| Property| Name| Description| Type| Default| Example | ||
| *accessKey {empty}* *| Access Key| The access key obtained from AWS.| string| | | ||
| *cw_namespace {empty}* *| Cloud Watch Namespace| The cloud watch metric namespace.| string| | | ||
| *metricName {empty}* *| Metric Name| The metric name.| string| | | ||
| *metricValue {empty}* *| Metric Value| The metric value.| double| | `"1.2"` | ||
| *region {empty}* *| AWS Region| The AWS region to connect to.| string| | `"eu-west-1"` | ||
| *secretKey {empty}* *| Secret Key| The secret key obtained from AWS.| string| | | ||
| timestamp| Metric Timestamp| The metric timestamp.| long| | | ||
| unit| Metric Unit| The metric unit| string| | | ||
|=== | ||
|
||
NOTE: Fields marked with ({empty}*) are mandatory. | ||
|
||
== Usage | ||
|
||
This section summarizes how the `aws-cloudwatch-sink` can be used in various contexts. | ||
|
||
=== Knative Sink | ||
|
||
The `aws-cloudwatch-sink` Kamelet can be used as Knative sink by binding it to a Knative object. | ||
|
||
.aws-cloudwatch-sink-binding.yaml | ||
[source,yaml] | ||
---- | ||
apiVersion: camel.apache.org/v1alpha1 | ||
kind: KameletBinding | ||
metadata: | ||
name: aws-cloudwatch-sink-binding | ||
spec: | ||
source: | ||
ref: | ||
kind: InMemoryChannel | ||
apiVersion: messaging.knative.dev/v1 | ||
name: mychannel | ||
sink: | ||
ref: | ||
kind: Kamelet | ||
apiVersion: camel.apache.org/v1alpha1 | ||
name: aws-cloudwatch-sink | ||
properties: | ||
accessKey: "The Access Key" | ||
cw_namespace: "The Cloud Watch Namespace" | ||
metricName: "The Metric Name" | ||
metricValue: "1.2" | ||
region: "eu-west-1" | ||
secretKey: "The Secret Key" | ||
---- | ||
|
||
Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to. | ||
|
||
Save the `aws-cloudwatch-sink-binding.yaml` file into your hard drive, then configure it according to your needs. | ||
|
||
You can run the sink using the following command: | ||
|
||
[source,shell] | ||
---- | ||
kubectl apply -f aws-cloudwatch-sink-binding.yaml | ||
---- | ||
// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters