Skip to content

Commit

Permalink
Add 2nd panel to the gauge demo dac
Browse files Browse the repository at this point in the history
Signed-off-by: AntoineThebaud <[email protected]>
  • Loading branch information
AntoineThebaud committed Dec 19, 2024
1 parent ecda3fe commit ec6b37e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dac/SingleGauge/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ func main() {
query.PromQL("100 - ((node_memory_MemAvailable_bytes{env=\"demo\", instance=\"demo.do.prometheus.io:9100\"} * 100) / node_memory_MemTotal_bytes{env=\"demo\", instance=\"demo.do.prometheus.io:9100\"})"),
),
),
panelgroup.AddPanel("Second Gauge",
gauge.Chart(
gauge.Calculation(common.LastCalculation),
gauge.Format(common.Format{
Unit: common.BytesUnit,
}),
gauge.Max(20),
),
panel.AddQuery(
query.PromQL("100 - ((node_memory_MemAvailable_bytes{env=\"demo\", instance=\"demo.do.prometheus.io:9100\"} * 100) / node_memory_MemTotal_bytes{env=\"demo\", instance=\"demo.do.prometheus.io:9100\"})"),
),
),
),
)

Expand Down

0 comments on commit ec6b37e

Please sign in to comment.