forked from lewijacn/opensearch-cluster-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add metrics for cloud watch agent (opensearch-project#11)
Signed-off-by: Suraj Singh <[email protected]>
- Loading branch information
1 parent
1184e2c
commit 2885928
Showing
3 changed files
with
76 additions
and
0 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
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,44 @@ | ||
/* Copyright OpenSearch Contributors | ||
SPDX-License-Identifier: Apache-2.0 | ||
The OpenSearch Contributors require contributions made to | ||
this file be licensed under the Apache-2.0 license or a | ||
compatible open source license. */ | ||
|
||
interface MetricDefinition { | ||
measurement: string[]; | ||
} | ||
|
||
interface EditableCloudwatchMetricsSection { | ||
// eslint-disable-next-line camelcase | ||
metrics_collected: { | ||
cpu: MetricDefinition, | ||
disk: MetricDefinition, | ||
diskio: MetricDefinition, | ||
mem: MetricDefinition, | ||
net: MetricDefinition, | ||
}; | ||
} | ||
|
||
/** | ||
* Cloudwatch configuration - Metrics Section | ||
* | ||
* See definition at https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-Configuration-File-Details.html#CloudWatch-Agent-Configuration-File-Metricssection | ||
* | ||
* Example configuration: | ||
* ``` | ||
* metrics: { | ||
* metrics_collected: { | ||
* "cpu": { | ||
* "measurement": [ | ||
* "cpu_usage_idle", | ||
* "cpu_usage_nice", | ||
* "cpu_usage_guest", | ||
* ], | ||
* }, | ||
* } | ||
* metrics_collection_interval: 60, // seconds between collections | ||
* } | ||
* ``` | ||
*/ | ||
export type CloudwatchMetricsSection = Readonly<EditableCloudwatchMetricsSection>; |
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