Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixin tests failing #2899

Closed
juliusv opened this issue Apr 29, 2022 · 0 comments · Fixed by #2904
Closed

Mixin tests failing #2899

juliusv opened this issue Apr 29, 2022 · 0 comments · Fixed by #2904
Assignees

Comments

@juliusv
Copy link
Member

juliusv commented Apr 29, 2022

On recent PRs, the mixin tests are failing with:

#!/bin/bash -eo pipefail
cd doc/alertmanager-mixin; make lint
jb install
GET https://github.com/grafana/grafonnet-lib/archive/55cf4ee53ced2b6d3ce96ecce9fb813b4465be98.tar.gz 200
mixtool generate alerts mixin.libsonnet > alertmanager_alerts.yaml
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
	while read f; do \
		jsonnetfmt -n 2 --max-blank-lines 1 --string-style s --comment-style s "$f" | diff -u "$f" -; \
	done
mixtool lint mixin.libsonnet
[target-instance-rule] 'Alertmanager / Overview': Dashboard 'Alertmanager / Overview', panel 'Alerts', target idx '0' invalid PromQL query 'sum(alertmanager_alerts{job=~"$job"}) by (job,instance)': instance selector not found
[target-instance-rule] 'Alertmanager / Overview': Dashboard 'Alertmanager / Overview', panel 'Alerts receive rate', target idx '0' invalid PromQL query 'sum(rate(alertmanager_alerts_received_total{job=~"$job"}[$__rate_interval])) by (job,instance)': instance selector not found
[target-instance-rule] 'Alertmanager / Overview': Dashboard 'Alertmanager / Overview', panel 'Alerts receive rate', target idx '1' invalid PromQL query 'sum(rate(alertmanager_alerts_invalid_total{job=~"$job"}[$__rate_interval])) by (job,instance)': instance selector not found
[target-instance-rule] 'Alertmanager / Overview': Dashboard 'Alertmanager / Overview', panel '$integration: Notifications Send Rate', target idx '0' invalid PromQL query 'sum(rate(alertmanager_notifications_total{job=~"$job", integration="$integration"}[$__rate_interval])) by (integration,job,instance)': instance selector not found
[target-instance-rule] 'Alertmanager / Overview': Dashboard 'Alertmanager / Overview', panel '$integration: Notifications Send Rate', target idx '1' invalid PromQL query 'sum(rate(alertmanager_notifications_failed_total{job=~"$job", integration="$integration"}[$__rate_interval])) by (integration,job,instance)': instance selector not found
[target-instance-rule] 'Alertmanager / Overview': Dashboard 'Alertmanager / Overview', panel '$integration: Notification Duration', target idx '0' invalid PromQL query 'histogram_quantile(0.99,
  sum(rate(alertmanager_notification_latency_seconds_bucket{job=~"$job", integration="$integration"}[$__rate_interval])) by (le,job,instance)
) 
': instance selector not found
[target-instance-rule] 'Alertmanager / Overview': Dashboard 'Alertmanager / Overview', panel '$integration: Notification Duration', target idx '1' invalid PromQL query 'histogram_quantile(0.50,
  sum(rate(alertmanager_notification_latency_seconds_bucket{job=~"$job", integration="$integration"}[$__rate_interval])) by (le,job,instance)
) 
': instance selector not found
[target-instance-rule] 'Alertmanager / Overview': Dashboard 'Alertmanager / Overview', panel '$integration: Notification Duration', target idx '2' invalid PromQL query 'sum(rate(alertmanager_notification_latency_seconds_sum{job=~"$job", integration="$integration"}[$__rate_interval])) by (job,instance)
/
sum(rate(alertmanager_notification_latency_seconds_count{job=~"$job", integration="$integration"}[$__rate_interval])) by (job,instance)
': instance selector not found
2022/04/29 21:25:06 failed to lint the file mixin.libsonnet: 8 lint errors found
make: *** [Makefile:17: lint] Error 1

Exited with code exit status 2

simonpasquier pushed a commit to simonpasquier/alertmanager that referenced this issue May 5, 2022
…t-instance-rule`

Within grafana/dashboard-linter@9a32e58, the rules have been split into two different rules:

`target-job-rule`
`target-instance-rule`

All of our queries do contain the `job` label but as per the reason, we don't need both in this particular case.

Fixes prometheus#2899

Signed-off-by: gotjosh <[email protected]>

Signed-off-by: Simon Pasquier <[email protected]>
qinxx108 pushed a commit to qinxx108/alertmanager that referenced this issue Dec 13, 2022
…t-instance-rule`

Within grafana/dashboard-linter@9a32e58, the rules have been split into two different rules:

`target-job-rule`
`target-instance-rule`

All of our queries do contain the `job` label but as per the reason, we don't need both in this particular case.

Fixes prometheus#2899

Signed-off-by: gotjosh <[email protected]>
Signed-off-by: Yijie Qin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants