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

Restrict the self-reporting metrics #826

Merged
merged 4 commits into from
Oct 30, 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 change: 1 addition & 0 deletions .github/workflows/platform-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
run: |
if [ "${{ github.event_name }}" == "pull_request" ] && [ "${{contains(github.event.pull_request.labels.*.name, 'run-platform-tests')}}" != "true" ]; then
echo "Skipping platform tests"
echo "tests=[]" >> "${GITHUB_OUTPUT}"
exit 0
fi

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,15 @@ jobs:
helm install alloy grafana/alloy -f "${GRAFANA_ALLOY_VALUES}" -n alloy --create-namespace --wait

# This prometheus instance is used pod annotation testing with https
helm install prometheus-workload prometheus-community/prometheus -f "${PROMETHEUS_WORKLOAD_VALUES}" -n prometheus --create-namespace --wait
helm install prometheus-workload prometheus-community/prometheus -f "${PROMETHEUS_WORKLOAD_VALUES}" -n prometheus --create-namespace --timeout 10m --wait

# Deploy the Prometheus Operator CRDs, since we want to deploy Loki with a ServiceMonitor later
helm install prom-crds prometheus-community/prometheus-operator-crds --wait

- name: Deploy Prometheus
if: (steps.list-changed.outputs.changed == 'true') || (contains(github.event.pull_request.labels.*.name, 'full_test_required'))
run: |
helm install prometheus prometheus-community/prometheus -f "${PROMETHEUS_VALUES}" -n prometheus --create-namespace --wait
helm install prometheus prometheus-community/prometheus -f "${PROMETHEUS_VALUES}" -n prometheus --create-namespace --timeout 10m --wait

- name: Deploy Loki
if: (steps.list-changed.outputs.changed == 'true') || (contains(github.event.pull_request.labels.*.name, 'full_test_required'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,15 @@ prometheus.scrape "kubernetes_monitoring_telemetry" {
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,15 @@ data:
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down Expand Up @@ -68075,6 +68084,15 @@ data:
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,15 @@ prometheus.scrape "kubernetes_monitoring_telemetry" {
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,15 @@ data:
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down Expand Up @@ -69324,6 +69333,15 @@ data:
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,15 @@ prometheus.scrape "kubernetes_monitoring_telemetry" {
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
18 changes: 18 additions & 0 deletions charts/k8s-monitoring-v1/docs/examples/azure-aks/output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,15 @@ data:
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down Expand Up @@ -68019,6 +68028,15 @@ data:
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,15 @@ prometheus.scrape "kubernetes_monitoring_telemetry" {
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,15 @@ data:
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down Expand Up @@ -68007,6 +68016,15 @@ data:
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
9 changes: 9 additions & 0 deletions charts/k8s-monitoring-v1/docs/examples/beyla/metrics.alloy
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,15 @@ prometheus.scrape "kubernetes_monitoring_telemetry" {
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
18 changes: 18 additions & 0 deletions charts/k8s-monitoring-v1/docs/examples/beyla/output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,15 @@ data:
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down Expand Up @@ -68335,6 +68344,15 @@ data:
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,15 @@ prometheus.scrape "kubernetes_monitoring_telemetry" {
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,15 @@ data:
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down Expand Up @@ -68168,6 +68177,15 @@ data:
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,15 @@ prometheus.scrape "kubernetes_monitoring_telemetry" {
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,15 @@ data:
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down Expand Up @@ -69311,6 +69320,15 @@ data:
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,15 @@ prometheus.scrape "kubernetes_monitoring_telemetry" {
clustering {
enabled = true
}
forward_to = [prometheus.relabel.kubernetes_monitoring_telemetry.receiver]
}

prometheus.relabel "kubernetes_monitoring_telemetry" {
rule {
source_labels = ["__name__"]
regex = "grafana_kubernetes_monitoring_build_info"
action = "keep"
}
forward_to = [prometheus.relabel.metrics_service.receiver]
}

Expand Down
Loading