Skip to content

Commit

Permalink
jsonnet/telemeter: Use host_type in recording rule join
Browse files Browse the repository at this point in the history
Joining on `primary_host_type` was incorrect and did not add the label.
  • Loading branch information
smarterclayton committed Sep 15, 2020
1 parent 062de3b commit cca96b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsonnet/telemeter/rules.libsonnet
Expand Up @@ -33,7 +33,7 @@
{
record: 'id_version_ebs_account_internal:cluster_subscribed',
expr: |||
topk by (_id) (1, max by (_id, managed, ebs_account, internal) (label_replace(label_replace((subscription_labels{support=~"Standard|Premium|Layered"} * 0 + 1) or subscription_labels * 0, "internal", "true", "email_domain", "redhat.com|(.*\\.|^)ibm.com"), "managed", "", "managed", "false")) + on(_id) group_left(version) (topk by (_id) (1, id_version*0)) + on(_id) group_left(install_type) (topk by (_id) (1, id_install_type*0)) + on(_id) group_left(primary_host_type) (topk by (_id) (1, id_primary_host_type*0)) + on(_id) group_left(provider) (topk by (_id) (1, id_provider*0)))
topk by (_id) (1, max by (_id, managed, ebs_account, internal) (label_replace(label_replace((subscription_labels{support=~"Standard|Premium|Layered"} * 0 + 1) or subscription_labels * 0, "internal", "true", "email_domain", "redhat.com|(.*\\.|^)ibm.com"), "managed", "", "managed", "false")) + on(_id) group_left(version) (topk by (_id) (1, id_version*0)) + on(_id) group_left(install_type) (topk by (_id) (1, id_install_type*0)) + on(_id) group_left(host_type) (topk by (_id) (1, id_primary_host_type*0)) + on(_id) group_left(provider) (topk by (_id) (1, id_provider*0)))
|||,
},
{
Expand Down

0 comments on commit cca96b5

Please sign in to comment.