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

Create rule that catches instances of non-templated datasources in Annotations #197

Open
diurnalist opened this issue Sep 19, 2024 · 0 comments

Comments

@diurnalist
Copy link
Contributor

It's possible to declare annotations that are fetched from data sources, e.g.:

  "annotations": {
    "list": [
      {
        "datasource": {
          "type": "prometheus",
          "uid": "0c52be2e-c5dd-48b3-b134-99d970fd5bc3"
        },
        "enable": true,
        "expr": "changes(kube_deployment_status_replicas{k8s_namespace_name=\"$kube_namespace\", deployment_environment=\"$env\", deployment_stack=\"$stack\"}[$__interval]) > 0",
        "iconColor": "red",
        "name": "Deployment annotations",
        "titleFormat": "Deployment"
      },
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },

Similar to the panel-template-datasource rule, we could have an annotations-template-datasource rule, or perhaps the rule should be expanded to handle ALL instances of this issue, whether it be in templating, annotations, or panels.

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

No branches or pull requests

1 participant