Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions aws/cloudstream/apigateway/apigateway.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
scraper aws_apigateway_cloudstream module {
frequency = 60
lookback = 600
timeout = 30
resolution = 60
lag = 60

gauge "throughput" {
source promql "throughput" {
query = "sum by (ApiName) (amazonaws_com_AWS_ApiGateway_Count_count{ApiName=~'${join("|", resources.all.ApiName)}', Namespace!=''})"
}
}

gauge "4XX" {
source promql "4XX" {
query = "sum by (ApiName) (amazonaws_com_AWS_ApiGateway_4XXError_count{ApiName=~'${join("|", resources.all.ApiName)}', Namespace!=''})"
}
}

gauge "5XX" {
source promql "5XX" {
query = "sum by (ApiName) (amazonaws_com_AWS_ApiGateway_5XXError_count{ApiName=~'${join("|", resources.all.ApiName)}', Namespace!=''})"
}
}

gauge "latency" {
source promql "latency" {
query = "sum by (ApiName) (amazonaws_com_AWS_ApiGateway_Latency_count{ApiName=~'${join("|", resources.all.ApiName)}', Namespace!=''})"
}
}

gauge "integration_latency" {
source promql "integration_latency" {
query = "sum by (ApiName) (amazonaws_com_AWS_ApiGateway_IntegrationLatency_count{ApiName=~'${join("|", resources.all.ApiName)}', Namespace!=''})"
}
}
}

6 changes: 3 additions & 3 deletions sample/ome/rds.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ var rds_tags {
}

extends aws_rds_cloudwatch "my-rds" {
resources = var.rds
label_set = var.rds_tags
resources = var.rds
label_set = var.rds_tags
module_uri = "https://github.com/last9/openmetrics-registry/releases/download/v0.0.1/aws_cloudwatch_rds_v0.0.1.hcl"
using = {
default = "ap-south-1"
default = "ap-south-1"
}
}