Skip to content

Feature: add datasource input and job/instance variables for Grafana dashboard #902

@Illine

Description

@Illine

Is your feature request related to a problem? Please describe.
The current Grafana dashboard for File.d has hard-coded datasource UIDs and no templating for job or instance.
As a result, importing the dashboard into another environment requires manual edits, and all jobs/instances are mixed together in queries, producing noisy or confusing metrics.

Describe the solution you'd like
Make the dashboard portable and configurable by:

  • adding a Prometheus datasource input (DS_PROMETHEUS) and __inputs section;
  • replacing hard-coded datasource UIDs with ${DS_PROMETHEUS} references;
  • introducing templating variables for job, instance, and pipeline with proper dependencies;
  • updating PromQL filters to use these variables (job="$job", instance=~"$instance").

Describe alternatives you've considered
The only alternative is to manually edit the JSON after import, which is error-prone and makes it difficult to reuse the dashboard across different environments or clusters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions