Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the Alloy dashboards instead of the Agent ones #109

Merged
merged 2 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,082 changes: 0 additions & 1,082 deletions charts/meta-monitoring/src/dashboards/agent-logs-pipeline.json

This file was deleted.

1,189 changes: 0 additions & 1,189 deletions charts/meta-monitoring/src/dashboards/agent-operational.json

This file was deleted.

1,512 changes: 0 additions & 1,512 deletions charts/meta-monitoring/src/dashboards/agent-remote-write.json

This file was deleted.

1,065 changes: 0 additions & 1,065 deletions charts/meta-monitoring/src/dashboards/agent-tracing-pipeline.json

This file was deleted.

786 changes: 0 additions & 786 deletions charts/meta-monitoring/src/dashboards/agent.json

This file was deleted.

1,171 changes: 1,171 additions & 0 deletions charts/meta-monitoring/src/dashboards/alloy-cluster-node.json

Large diffs are not rendered by default.

540 changes: 540 additions & 0 deletions charts/meta-monitoring/src/dashboards/alloy-cluster-overview.json

Large diffs are not rendered by default.

970 changes: 970 additions & 0 deletions charts/meta-monitoring/src/dashboards/alloy-controller.json

Large diffs are not rendered by default.

923 changes: 923 additions & 0 deletions charts/meta-monitoring/src/dashboards/alloy-opentelemetry.json

Large diffs are not rendered by default.

1,337 changes: 1,337 additions & 0 deletions charts/meta-monitoring/src/dashboards/alloy-prometheus.json

Large diffs are not rendered by default.

840 changes: 840 additions & 0 deletions charts/meta-monitoring/src/dashboards/alloy-resources.json

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions charts/meta-monitoring/templates/agent/_helpers-agent.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
{{- define "agent.all_namespaces" -}}
{{- $list := list }}
{{- range .Values.namespacesToMonitor }}
{{- $list = append $list (printf "\"%s\"" .) }}
{{- end }}
{{- $list = append $list (printf "\"%s\"" .Release.Namespace) }}
{{- join ", " $list }}
{{- end }}

{{- define "agent.all_namespaces_bar" -}}
{{- $list := list }}
{{- range .Values.namespacesToMonitor }}
{{- $list = append $list (printf "%s" .) }}
{{- end }}
{{- $list = append $list .Release.Namespace }}
Expand Down
4 changes: 2 additions & 2 deletions charts/meta-monitoring/templates/agent/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ data:
role = "pod"
namespaces {
own_namespace = true
names = [ {{ include "agent.namespaces" . }} ]
names = [ {{ include "agent.all_namespaces" . }} ]
}
}

Expand Down Expand Up @@ -143,7 +143,7 @@ data:

rule {
source_labels = ["namespace"]
regex = "{{ include "agent.all_namespaces" . }}"
regex = "{{ include "agent.all_namespaces_bar" . }}"

action = "keep"
}
Expand Down
19 changes: 0 additions & 19 deletions charts/meta-monitoring/templates/grafana/agent-dashboards-1.yaml

This file was deleted.

21 changes: 21 additions & 0 deletions charts/meta-monitoring/templates/grafana/alloy-dashboards-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if and .Values.local.grafana.enabled .Values.dashboards.logs.enabled }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: alloy-dashboards-1
namespace: {{ $.Release.Namespace }}
data:
"alloy-cluster-node.json": |
{{ $.Files.Get "src/dashboards/alloy-cluster-node.json" | fromJson | toJson }}
"alloy-cluster-overview.json": |
{{ $.Files.Get "src/dashboards/alloy-cluster-overview.json" | fromJson | toJson }}
"alloy-controller.json": |
{{ $.Files.Get "src/dashboards/alloy-controller.json" | fromJson | toJson }}
"alloy-opentelemetry.json": |
{{ $.Files.Get "src/dashboards/alloy-opentelemetry.json" | fromJson | toJson }}
"alloy-prometheus.json": |
{{ $.Files.Get "src/dashboards/alloy-prometheus.json" | fromJson | toJson }}
"alloy-resources.json": |
{{ $.Files.Get "src/dashboards/alloy-resources.json" | fromJson | toJson }}
{{- end }}
6 changes: 3 additions & 3 deletions charts/meta-monitoring/templates/grafana/dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ data:
{{- end }}
- disableDeletion: true
editable: false
folder: Agent
name: agent-1
folder: Alloy
name: alloy-1
options:
path: /var/lib/grafana/dashboards/agent-1
path: /var/lib/grafana/dashboards/alloy-1
orgId: 1
type: file
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ spec:
- mountPath: /var/lib/grafana/dashboards/loki-2
name: loki-dashboards-2
{{- end }}
- mountPath: /var/lib/grafana/dashboards/agent-1
name: agent-dashboards-1
- mountPath: /var/lib/grafana/dashboards/alloy-1
name: alloy-dashboards-1
volumes:
- name: grafana-pv
persistentVolumeClaim:
Expand All @@ -83,7 +83,7 @@ spec:
configMap:
name: loki-dashboards-2
{{- end }}
- name: agent-dashboards-1
- name: alloy-dashboards-1
configMap:
name: agent-dashboards-1
name: alloy-dashboards-1
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ data:
{{ $.Files.Get "src/dashboards/loki-deletion.json" | fromJson | toJson }}
"loki-logs.json": |
{{ $.Files.Get "src/dashboards/loki-logs.json" | fromJson | toJson }}
"loki-mixin-recording-rules.json": |
{{ $.Files.Get "src/dashboards/loki-mixin-recording-rules.json" | fromJson | toJson }}
"loki-operational.json": |
{{ $.Files.Get "src/dashboards/loki-operational.json" | fromJson | toJson }}
{{- end }}
98 changes: 95 additions & 3 deletions charts/meta-monitoring/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,46 @@ logs:
metrics:
# The list of metrics to retain for logging dashboards
retain:
- agent_config_last_load_success_timestamp_seconds
- agent_config_last_load_successful
- agent_config_load_failures_total
- alloy_build_info
- alloy_config_last_load_success_timestamp_seconds
- alloy_config_last_load_successful
- alloy_config_load_failures_total
- alloy_component_controller_evaluating
- alloy_component_dependencies_wait_seconds
- alloy_component_dependencies_wait_seconds_bucket
- alloy_component_evaluation_seconds
- alloy_component_evaluation_seconds_bucket
- alloy_component_evaluation_seconds_count
- alloy_component_evaluation_seconds_sum
- alloy_component_evaluation_slow_seconds
- alloy_component_controller_running_components
- alloy_resources_machine_rx_bytes_total
- alloy_resources_machine_tx_bytes_total
- alloy_resources_process_cpu_seconds_total
- alloy_resources_process_resident_memory_bytes
- prometheus_remote_write_wal_samples_appended_total
- prometheus_remote_write_wal_storage_active_series
- cluster_node_info
- cluster_node_lamport_time
- cluster_node_update_observers
- cluster_node_gossip_health_score
- cluster_node_gossip_proto_version
- cluster_node_gossip_received_events_total
- cluster_node_peers
- cluster_transport_rx_bytes_total
- cluster_transport_rx_packets_total
- cluster_transport_rx_packets_failed_total
- cluster_transport_stream_rx_bytes_total
- cluster_transport_stream_rx_packets_failed_total
- cluster_transport_stream_rx_packets_total
- cluster_transport_stream_tx_bytes_total
- cluster_transport_stream_tx_packets_total
- cluster_transport_stream_tx_packets_failed_total
- cluster_transport_streams
- cluster_transport_tx_packets_total
- cluster_transport_tx_packets_failed_total
- cluster_transport_rx_packet_queue_length
- cluster_transport_tx_packet_queue_length
- container_cpu_usage_seconds_total
- container_fs_writes_bytes_total
- container_memory_working_set_bytes
Expand All @@ -93,7 +130,10 @@ metrics:
- cortex_prometheus_rule_group_last_duration_seconds
- cortex_prometheus_rule_group_last_evaluation_timestamp_seconds
- cortex_prometheus_rule_group_iterations_missed_total
- exporter_send_failed_spans_ratio_total
- exporter_sent_spans_ratio_total
- go_gc_duration_seconds
- go_gc_duration_seconds_count
- go_goroutines
- go_memstats_heap_inuse_bytes
- kubelet_volume_stats_used_bytes
Expand Down Expand Up @@ -130,6 +170,7 @@ metrics:
- loki_compactor_oldest_pending_delete_request_age_seconds
- loki_compactor_pending_delete_requests_count
- loki_discarded_samples_total
- loki_discarded_bytes_total
- loki_distributor_bytes_received_total
- loki_distributor_lines_received_total
- loki_distributor_structured_metadata_bytes_received_total
Expand Down Expand Up @@ -169,7 +210,58 @@ metrics:
- loki_write_sent_entries_total
- node_disk_read_bytes_total
- node_disk_written_bytes_total
- process_start_time_seconds
- processor_batch_batch_send_size_ratio_bucket
- processor_batch_metadata_cardinality_ratio
- processor_batch_timeout_trigger_send_ratio_total
- prometheus_remote_storage_bytes_total
- prometheus_remote_storage_enqueue_retries_total
- prometheus_remote_storage_highest_timestamp_in_seconds
- prometheus_remote_storage_metadata_bytes_total
- prometheus_remote_storage_queue_highest_sent_timestamp_seconds
- prometheus_remote_storage_samples_dropped_total
- prometheus_remote_storage_samples_failed_total
- prometheus_remote_storage_samples_pending
- prometheus_remote_storage_samples_retried_total
- prometheus_remote_storage_samples_total
- prometheus_remote_storage_sent_batch_duration_seconds_bucket
- prometheus_remote_storage_sent_batch_duration_seconds_count
- prometheus_remote_storage_sent_batch_duration_seconds_sum
- prometheus_remote_storage_shard_capacity
- prometheus_remote_storage_shards
- prometheus_remote_storage_shards_desired
- prometheus_remote_storage_shards_max
- prometheus_remote_storage_shards_min
- prometheus_remote_storage_succeeded_samples_total
- prometheus_remote_write_wal_samples_appended_total
- prometheus_remote_write_wal_storage_active_series
- prometheus_sd_discovered_targets
- prometheus_target_interval_length_seconds_count
- prometheus_target_interval_length_seconds_sum
- prometheus_target_scrapes_exceeded_sample_limit_total
- prometheus_target_scrapes_sample_duplicate_timestamp_total
- prometheus_target_scrapes_sample_out_of_bounds_total
- prometheus_target_scrapes_sample_out_of_order_total
- prometheus_target_sync_length_seconds_sum
- prometheus_wal_watcher_current_segment
- promtail_custom_bad_words_total
- promtail_dropped_bytes_total
- promtail_files_active_total
- promtail_read_bytes_total
- promtail_read_lines_total
- promtail_request_duration_seconds_bucket
- promtail_sent_entries_total
- rpc_server_duration_milliseconds_bucket
- receiver_accepted_spans_ratio_total
- receiver_refused_spans_ratio_total
- scrape_duration_seconds
- traces_exporter_sent_spans
- traces_exporter_send_failed_spans
- traces_loadbalancer_backend_outcome
- traces_loadbalancer_num_backends
- traces_receiver_accepted_spans
- traces_receiver_refused_spans
- up
# Additional metrics to retain
extraMetrics: []
# Set enabled = true to add the default logs dashboards to the local Grafana
Expand Down
Loading