Skip to content

Commit

Permalink
fix: Alloy / Logs Overview
Browse files Browse the repository at this point in the history
Signed-off-by: Weifeng Wang <[email protected]>
  • Loading branch information
qclaogui committed Jul 3, 2024
1 parent a03e810 commit e19678a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
6 changes: 5 additions & 1 deletion monitoring-mixins/alloy-mixin/deploy.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
(import 'mixin.libsonnet') + {
// Config overrides
prometheusRules: {},

// Config overrides
_config+:: {
logsFilterSelector: 'app="alloy"',
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
"type": "loki",
"uid": "${loki_datasource}"
},
"expr": "sum by (level) (count_over_time({,cluster=~\"$cluster\",namespace=~\"$namespace\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\"}\n|~ \"$regex_search\"\n\n[$__interval]))\n",
"expr": "sum by (level) (count_over_time({app=\"alloy\",cluster=~\"$cluster\",namespace=~\"$namespace\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\"}\n|~ \"$regex_search\"\n\n[$__interval]))\n",
"legendFormat": "{{ level }}"
}
],
Expand Down Expand Up @@ -198,7 +198,7 @@
"type": "loki",
"uid": "${loki_datasource}"
},
"expr": "{,cluster=~\"$cluster\",namespace=~\"$namespace\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\"} \n|~ \"$regex_search\"\n\n\n"
"expr": "{app=\"alloy\",cluster=~\"$cluster\",namespace=~\"$namespace\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\"} \n|~ \"$regex_search\"\n\n\n"
}
],
"title": "Logs",
Expand Down Expand Up @@ -229,7 +229,7 @@
"label": "Cluster",
"multi": true,
"name": "cluster",
"query": "label_values({}, cluster)",
"query": "label_values({app=\"alloy\"}, cluster)",
"refresh": 2,
"sort": 1,
"type": "query"
Expand All @@ -244,7 +244,7 @@
"label": "Namespace",
"multi": true,
"name": "namespace",
"query": "label_values({,cluster=~\"$cluster\"}, namespace)",
"query": "label_values({app=\"alloy\",cluster=~\"$cluster\"}, namespace)",
"refresh": 2,
"sort": 1,
"type": "query"
Expand All @@ -259,7 +259,7 @@
"label": "Job",
"multi": true,
"name": "job",
"query": "label_values({,cluster=~\"$cluster\",namespace=~\"$namespace\"}, job)",
"query": "label_values({app=\"alloy\",cluster=~\"$cluster\",namespace=~\"$namespace\"}, job)",
"refresh": 2,
"sort": 1,
"type": "query"
Expand All @@ -274,7 +274,7 @@
"label": "Instance",
"multi": true,
"name": "instance",
"query": "label_values({,cluster=~\"$cluster\",namespace=~\"$namespace\",job=~\"$job\"}, instance)",
"query": "label_values({app=\"alloy\",cluster=~\"$cluster\",namespace=~\"$namespace\",job=~\"$job\"}, instance)",
"refresh": 2,
"sort": 1,
"type": "query"
Expand All @@ -289,7 +289,7 @@
"label": "Level",
"multi": true,
"name": "level",
"query": "label_values({,cluster=~\"$cluster\",namespace=~\"$namespace\",job=~\"$job\",instance=~\"$instance\"}, level)",
"query": "label_values({app=\"alloy\",cluster=~\"$cluster\",namespace=~\"$namespace\",job=~\"$job\",instance=~\"$instance\"}, level)",
"refresh": 2,
"sort": 1,
"type": "query"
Expand Down

0 comments on commit e19678a

Please sign in to comment.