Skip to content

Latest commit

 

History

History
101 lines (55 loc) · 5.38 KB

File metadata and controls

101 lines (55 loc) · 5.38 KB
graph LR
    grafanalib_core_Dashboard["grafanalib.core.Dashboard"]
    grafanalib_core_Panel["grafanalib.core.Panel"]
    grafanalib_core_Target["grafanalib.core.Target"]
    grafanalib_prometheus["grafanalib.prometheus"]
    grafanalib_elasticsearch["grafanalib.elasticsearch"]
    grafanalib_core_YAxis_YAxes["grafanalib.core.YAxis/YAxes"]
    grafanalib_core_Evaluator["grafanalib.core.Evaluator"]
    grafanalib_core_StatMapping["grafanalib.core.StatMapping"]
    grafanalib_core_Dashboard -- "composes" --> grafanalib_core_Panel
    grafanalib_core_Panel -- "incorporates" --> grafanalib_core_Target
    grafanalib_core_Panel -- "incorporates" --> grafanalib_core_YAxis_YAxes
    grafanalib_core_Panel -- "incorporates" --> grafanalib_core_Evaluator
    grafanalib_core_Panel -- "incorporates" --> grafanalib_core_StatMapping
    grafanalib_prometheus -- "extends" --> grafanalib_core_Target
    grafanalib_elasticsearch -- "extends" --> grafanalib_core_Target
Loading

CodeBoardingDemoContact

Details

The Dashboard Definition DSL subsystem encompasses the Python modules responsible for defining Grafana dashboard structures programmatically. Its primary boundaries are defined by: grafanalib.core, grafanalib.prometheus, and grafanalib.elasticsearch. These modules collectively form the Pythonic DSL that allows users to define complex Grafana dashboards as code, adhering to the "Dashboard as Code" architectural pattern.

grafanalib.core.Dashboard

Serves as the top-level container for a Grafana dashboard. It orchestrates and manages a collection of Panel objects and defines dashboard-wide settings such as title, description, and time range.

Related Classes/Methods:

grafanalib.core.Panel

Encapsulates the configuration for a single visualization panel within a dashboard. This includes defining data sources, queries (Targets), display options, Y-axis configurations (YAxis/YAxes), and potentially alert conditions (Evaluators) and data mappings (StatMapping).

Related Classes/Methods:

grafanalib.core.Target

Acts as an abstract base class defining the common interface for data queries. It specifies the fundamental properties required for any data source query within a panel, serving as the extensible point for various data sources.

Related Classes/Methods:

grafanalib.prometheus

Provides specialized implementations of grafanalib.core.Target for defining queries against Prometheus data sources. This includes Prometheus-specific query language and parameters, allowing the DSL to interact with Prometheus.

Related Classes/Methods:

grafanalib.elasticsearch

Provides specialized implementations of grafanalib.core.Target for defining queries and aggregations against Elasticsearch data sources. This extends the DSL's capability to integrate with Elasticsearch.

Related Classes/Methods:

grafanalib.core.YAxis/YAxes

Configures the properties of the Y-axis for panels, such as units, labels, and value ranges, enabling detailed control over panel visualization.

Related Classes/Methods:

grafanalib.core.Evaluator

Defines the logic and conditions for evaluating alerts associated with a panel, allowing users to embed alerting rules directly within the dashboard definition.

Related Classes/Methods:

grafanalib.core.StatMapping

Defines rules for mapping statistical data within panels, such as value-to-text transformations or color coding based on thresholds, enhancing data presentation.

Related Classes/Methods: