Skip to content

Commit

Permalink
regenerate alloy mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
hervenicol committed Jan 21, 2025
1 parent e0bf38c commit 6e44041
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 239 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"datasource": "$loki_datasource",
"enable": true,
"expr": "{cluster=\"$cluster\", container=\"kube-diff-logger\"} | json | namespace_extracted=\"alloy\" | name_extracted=~\"alloy.*\"",
"expr": "{cluster_id=\"$cluster\", container=\"kube-diff-logger\"} | json | namespace_extracted=\"alloy\" | name_extracted=~\"alloy.*\"",
"iconColor": "rgba(0, 211, 255, 1)",
"instant": false,
"name": "Deployments",
Expand Down Expand Up @@ -59,7 +59,7 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "sum(cluster_node_lamport_time{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}) \n",
"expr": "sum(cluster_node_lamport_time{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}) \n",
"format": "table",
"instant": true,
"legendFormat": "__auto",
Expand All @@ -68,7 +68,7 @@
},
{
"datasource": "${datasource}",
"expr": "sum(cluster_node_update_observers{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"})\n",
"expr": "sum(cluster_node_update_observers{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"})\n",
"format": "table",
"instant": true,
"legendFormat": "__auto",
Expand All @@ -77,7 +77,7 @@
},
{
"datasource": "${datasource}",
"expr": "sum(cluster_node_gossip_health_score{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"})\n",
"expr": "sum(cluster_node_gossip_health_score{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"})\n",
"format": "table",
"instant": true,
"legendFormat": "__auto",
Expand All @@ -86,7 +86,7 @@
},
{
"datasource": "${datasource}",
"expr": "sum(cluster_node_gossip_proto_version{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"})\n",
"expr": "sum(cluster_node_gossip_proto_version{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"})\n",
"format": "table",
"instant": true,
"legendFormat": "__auto",
Expand Down Expand Up @@ -132,7 +132,7 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "rate(cluster_node_gossip_received_events_total{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n",
"expr": "rate(cluster_node_gossip_received_events_total{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n",
"instant": false,
"legendFormat": "{{event}}",
"range": true
Expand All @@ -158,7 +158,7 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "sum(cluster_node_peers{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"})\n",
"expr": "sum(cluster_node_peers{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"})\n",
"instant": false,
"legendFormat": "__auto",
"range": true
Expand All @@ -184,7 +184,7 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "cluster_node_peers{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}\n",
"expr": "cluster_node_peers{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}\n",
"instant": false,
"legendFormat": "{{state}}",
"range": true
Expand Down Expand Up @@ -223,14 +223,14 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "rate(cluster_transport_rx_bytes_total{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n",
"expr": "rate(cluster_transport_rx_bytes_total{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n",
"instant": false,
"legendFormat": "rx",
"range": true
},
{
"datasource": "${datasource}",
"expr": "-1 * rate(cluster_transport_tx_bytes_total{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n",
"expr": "-1 * rate(cluster_transport_tx_bytes_total{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n",
"instant": false,
"legendFormat": "tx",
"range": true
Expand All @@ -255,14 +255,14 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "1 - (\n rate(cluster_transport_tx_packets_failed_total{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) /\n rate(cluster_transport_tx_packets_total{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n)\n",
"expr": "1 - (\n rate(cluster_transport_tx_packets_failed_total{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) /\n rate(cluster_transport_tx_packets_total{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n)\n",
"instant": false,
"legendFormat": "Tx success %",
"range": true
},
{
"datasource": "${datasource}",
"expr": "1 - (\n rate(cluster_transport_rx_packets_failed_total{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) /\n rate(cluster_transport_rx_packets_total{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n)\n",
"expr": "1 - (\n rate(cluster_transport_rx_packets_failed_total{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) /\n rate(cluster_transport_rx_packets_total{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n)\n",
"instant": false,
"legendFormat": "Rx success %",
"range": true
Expand All @@ -288,14 +288,14 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "cluster_transport_tx_packet_queue_length{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}\n",
"expr": "cluster_transport_tx_packet_queue_length{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}\n",
"instant": false,
"legendFormat": "tx queue",
"range": true
},
{
"datasource": "${datasource}",
"expr": "cluster_transport_rx_packet_queue_length{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}\n",
"expr": "cluster_transport_rx_packet_queue_length{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}\n",
"instant": false,
"legendFormat": "rx queue",
"range": true
Expand Down Expand Up @@ -323,14 +323,14 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "rate(cluster_transport_stream_rx_bytes_total{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n",
"expr": "rate(cluster_transport_stream_rx_bytes_total{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n",
"instant": false,
"legendFormat": "rx",
"range": true
},
{
"datasource": "${datasource}",
"expr": "-1 * rate(cluster_transport_stream_tx_bytes_total{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n",
"expr": "-1 * rate(cluster_transport_stream_tx_bytes_total{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n",
"instant": false,
"legendFormat": "tx",
"range": true
Expand All @@ -355,14 +355,14 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "1 - (\n rate(cluster_transport_stream_tx_packets_failed_total{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) /\n rate(cluster_transport_stream_tx_packets_total{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n)\n",
"expr": "1 - (\n rate(cluster_transport_stream_tx_packets_failed_total{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) /\n rate(cluster_transport_stream_tx_packets_total{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n)\n",
"instant": false,
"legendFormat": "Tx success %",
"range": true
},
{
"datasource": "${datasource}",
"expr": "1 - (\n rate(cluster_transport_stream_rx_packets_failed_total{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) /\n rate(cluster_transport_stream_rx_packets_total{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n)\n",
"expr": "1 - (\n rate(cluster_transport_stream_rx_packets_failed_total{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) /\n rate(cluster_transport_stream_rx_packets_total{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n)\n",
"instant": false,
"legendFormat": "Rx success %",
"range": true
Expand All @@ -383,7 +383,7 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "cluster_transport_streams{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}\n",
"expr": "cluster_transport_streams{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", instance=~\"$instance\"}\n",
"instant": false,
"legendFormat": "Open streams",
"range": true
Expand Down Expand Up @@ -424,7 +424,7 @@
"label": "cluster",
"name": "cluster",
"query": {
"query": "label_values(alloy_component_controller_running_components, cluster)\n",
"query": "label_values(alloy_component_controller_running_components, cluster_id)\n",
"refId": "cluster"
},
"refresh": 2,
Expand All @@ -436,7 +436,7 @@
"label": "namespace",
"name": "namespace",
"query": {
"query": "label_values(alloy_component_controller_running_components{cluster=~\"$cluster\"}, namespace)\n",
"query": "label_values(alloy_component_controller_running_components{cluster_id=~\"$cluster\"}, namespace)\n",
"refId": "namespace"
},
"refresh": 2,
Expand All @@ -448,7 +448,7 @@
"label": "job",
"name": "job",
"query": {
"query": "label_values(alloy_component_controller_running_components{cluster=~\"$cluster\", namespace=~\"$namespace\"}, job)\n",
"query": "label_values(alloy_component_controller_running_components{cluster_id=~\"$cluster\", namespace=~\"$namespace\"}, job)\n",
"refId": "job"
},
"refresh": 2,
Expand All @@ -463,7 +463,7 @@
"multi": true,
"name": "instance",
"query": {
"query": "label_values(alloy_component_controller_running_components{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}, instance)\n",
"query": "label_values(alloy_component_controller_running_components{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}, instance)\n",
"refId": "instance"
},
"refresh": 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"datasource": "$loki_datasource",
"enable": true,
"expr": "{cluster=\"$cluster\", container=\"kube-diff-logger\"} | json | namespace_extracted=\"alloy\" | name_extracted=~\"alloy.*\"",
"expr": "{cluster_id=\"$cluster\", container=\"kube-diff-logger\"} | json | namespace_extracted=\"alloy\" | name_extracted=~\"alloy.*\"",
"iconColor": "rgba(0, 211, 255, 1)",
"instant": false,
"name": "Deployments",
Expand Down Expand Up @@ -47,7 +47,7 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "count(cluster_node_info{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"})\n",
"expr": "count(cluster_node_info{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"})\n",
"instant": true,
"legendFormat": "__auto",
"range": false
Expand Down Expand Up @@ -87,7 +87,7 @@
{
"targetBlank": false,
"title": "Detail dashboard for node",
"url": "/d/4047e755d822da63c8158cde32ae4dce/alloy-cluster-node?var-instance=${__data.fields.instance}&var-datasource=${datasource}&var-loki_datasource=${loki_datasource}&var-job=${job}&var-cluster=${cluster}&var-namespace=${namespace}"
"url": "/d/4047e755d822da63c8158cde32ae4dce/alloy-cluster-node?var-instance=${__data.fields.instance}&var-datasource=${datasource}&var-loki_datasource=${loki_datasource}&var-job=${job}&var-cluster_id=${cluster}&var-namespace=${namespace}"
}
]
}
Expand All @@ -104,7 +104,7 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "cluster_node_info{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}\n",
"expr": "cluster_node_info{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}\n",
"format": "table",
"instant": true,
"legendFormat": "__auto",
Expand Down Expand Up @@ -189,7 +189,7 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "clamp((\n sum(stddev by (state) (cluster_node_peers{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}) != 0) or\n (sum(abs(sum without (state) (cluster_node_peers{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"})) - scalar(count(cluster_node_info{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"})) != 0))\n ),\n 1, 1\n)\n",
"expr": "clamp((\n sum(stddev by (state) (cluster_node_peers{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}) != 0) or\n (sum(abs(sum without (state) (cluster_node_peers{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"})) - scalar(count(cluster_node_info{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"})) != 0))\n ),\n 1, 1\n)\n",
"format": "time_series",
"instant": true,
"legendFormat": "__auto",
Expand Down Expand Up @@ -243,7 +243,7 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "ceil(clamp((\n sum(stddev by (state) (cluster_node_peers{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"})) or\n (sum(abs(sum without (state) (cluster_node_peers{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"})) - scalar(count(cluster_node_info{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}))))\n ),\n 0, 1\n))\n",
"expr": "ceil(clamp((\n sum(stddev by (state) (cluster_node_peers{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"})) or\n (sum(abs(sum without (state) (cluster_node_peers{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"})) - scalar(count(cluster_node_info{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}))))\n ),\n 0, 1\n))\n",
"instant": false,
"legendFormat": "Converged",
"range": true
Expand All @@ -269,7 +269,7 @@
"targets": [
{
"datasource": "${datasource}",
"expr": "sum by(instance) (cluster_node_peers{cluster=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"})\n",
"expr": "sum by(instance) (cluster_node_peers{cluster_id=~\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"})\n",
"instant": false,
"legendFormat": "{{instance}}",
"range": true
Expand Down Expand Up @@ -310,7 +310,7 @@
"label": "cluster",
"name": "cluster",
"query": {
"query": "label_values(alloy_component_controller_running_components, cluster)\n",
"query": "label_values(alloy_component_controller_running_components, cluster_id)\n",
"refId": "cluster"
},
"refresh": 2,
Expand All @@ -322,7 +322,7 @@
"label": "namespace",
"name": "namespace",
"query": {
"query": "label_values(alloy_component_controller_running_components{cluster=~\"$cluster\"}, namespace)\n",
"query": "label_values(alloy_component_controller_running_components{cluster_id=~\"$cluster\"}, namespace)\n",
"refId": "namespace"
},
"refresh": 2,
Expand All @@ -334,7 +334,7 @@
"label": "job",
"name": "job",
"query": {
"query": "label_values(alloy_component_controller_running_components{cluster=~\"$cluster\", namespace=~\"$namespace\"}, job)\n",
"query": "label_values(alloy_component_controller_running_components{cluster_id=~\"$cluster\", namespace=~\"$namespace\"}, job)\n",
"refId": "job"
},
"refresh": 2,
Expand Down
Loading

0 comments on commit 6e44041

Please sign in to comment.