Skip to content

Commit

Permalink
updating appcat services to use new query
Browse files Browse the repository at this point in the history
  • Loading branch information
wejdross committed May 9, 2023
1 parent 9c88303 commit 4f51fe8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions pkg/db/seeds.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,22 @@ var DefaultQueries = []Query{
var renderedQueries = []RenderedQuery{
{
Query: Query{
Name: "appcat_postgresql_vshn_standalone",
Description: "Number of VSHN managed standalone postgres instances",
Name: "appcat_postgresql_managed_by_vshn",
Description: "Number of VSHN managed postgres instances",
Unit: "Instances",
},
ProductName: "postgres",
ServiceName: "postgresql-standalone",
ServiceName: "appcat-postgresql",
Template: appcatVSHNTemplate,
},
{
Query: Query{
Name: "appcat_redis_vshn_standalone",
Description: "Number of VSHN managed standalone redis instances",
Description: "Number of VSHN managed redis instances",
Unit: "Instances",
},
ProductName: "redis",
ServiceName: "redis-standalone",
ServiceName: "appcat-redis",
Template: appcatVSHNTemplate,
},
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/db/seeds/appcat_vshn.promql.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ sum_over_time(
label_replace(
# Copy label appuio.io/organization to label tenant_id
label_replace(
# Fetch all namespaces with label appcat.vshn.io/servicename="{{.ServiceName}}"
kube_namespace_labels{label_appuio_io_organization=~".+", label_appcat_vshn_io_servicename="{{.ServiceName}}"},
# Fetch all namespaces with label appcat.vshn.io/billing-name="{{.ServiceName}}"
kube_namespace_labels{label_appuio_io_organization=~".+", label_appcat_vshn_io_billing_name="{{.ServiceName}}"},
"tenant_id",
"$1",
"label_appuio_io_organization",
Expand Down

0 comments on commit 4f51fe8

Please sign in to comment.