diff --git a/charts/conntrack-exporter/Chart.yaml b/charts/conntrack-exporter/Chart.yaml index 83e61c7..ffb2f17 100644 --- a/charts/conntrack-exporter/Chart.yaml +++ b/charts/conntrack-exporter/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -appVersion: 0.6.0 +appVersion: 0.6.1 description: Prometheus Conntrack Exporter name: conntrack-exporter version: 0.2.0 diff --git a/charts/tsuru-monitoring/Chart.yaml b/charts/tsuru-monitoring/Chart.yaml index 68d74dd..9097179 100644 --- a/charts/tsuru-monitoring/Chart.yaml +++ b/charts/tsuru-monitoring/Chart.yaml @@ -15,4 +15,4 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.30 +version: 0.3.31 diff --git a/charts/tsuru-monitoring/templates/tsuru-apps-rules.yaml b/charts/tsuru-monitoring/templates/tsuru-apps-rules.yaml index 0a68ca8..4265bb4 100644 --- a/charts/tsuru-monitoring/templates/tsuru-apps-rules.yaml +++ b/charts/tsuru-monitoring/templates/tsuru-apps-rules.yaml @@ -43,73 +43,73 @@ spec: - record: tsuru:apps_cpu_usage_seconds_total expr: | container_cpu_usage_seconds_total{container!="POD", container!="", pod!=""} * - on (pod) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"} + on (pod) group_left(label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"} - record: tsuru:apps_memory_working_set_bytes expr: | container_memory_working_set_bytes{container!="POD", container!="", pod!=""} * - on (pod) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"} + on (pod) group_left(label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"} - interval: 2m name: tsuru-apps.long-term rules: - record: long_term:tsuru:app_cpu_usage:max:3m expr: | - max by (label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (sum by (pod) (rate(container_cpu_usage_seconds_total{container!="POD", container!="", pod!=""}[3m])) * - on (pod) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) + max by (label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (sum by (pod) (rate(container_cpu_usage_seconds_total{container!="POD", container!="", pod!=""}[3m])) * + on (pod) group_left(label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) - record: long_term:tsuru:app_cpu_usage:avg:3m expr: | - avg by (label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (sum by (pod) (rate(container_cpu_usage_seconds_total{container!="POD", container!="", pod!=""}[3m])) * - on (pod) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) + avg by (label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (sum by (pod) (rate(container_cpu_usage_seconds_total{container!="POD", container!="", pod!=""}[3m])) * + on (pod) group_left(label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) - record: long_term:tsuru:app_cpu_usage:min:3m expr: | - min by (label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (sum by (pod) (rate(container_cpu_usage_seconds_total{container!="POD", container!="", pod!=""}[3m])) * - on (pod) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) + min by (label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (sum by (pod) (rate(container_cpu_usage_seconds_total{container!="POD", container!="", pod!=""}[3m])) * + on (pod) group_left(label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) - record: long_term:tsuru:app_cpu_usage:sum:3m expr: | - sum by (label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (rate(container_cpu_usage_seconds_total{container!="POD", container!="", pod!=""}[3m]) * - on (pod) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) + sum by (label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (rate(container_cpu_usage_seconds_total{container!="POD", container!="", pod!=""}[3m]) * + on (pod) group_left(label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) - record: long_term:tsuru:app_cpu_throttled:sum:3m expr: | - sum by (label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (( + sum by (label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (( sum by (namespace, pod) (rate(container_cpu_cfs_throttled_periods_total[3m])) / sum by (namespace, pod) (rate(container_cpu_cfs_periods_total[3m])) - ) * on (namespace, pod) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) + ) * on (namespace, pod) group_left(label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) ## memory - record: long_term:tsuru:app_memory_usage:max expr: | - max by (label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (container_memory_working_set_bytes{container!="POD", container!="", pod!=""} * - on (pod) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) + max by (label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (container_memory_working_set_bytes{container!="POD", container!="", pod!=""} * + on (pod) group_left(label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) - record: long_term:tsuru:app_memory_usage:avg expr: | - avg by (label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (container_memory_working_set_bytes{container!="POD", container!="", pod!=""} * - on (pod) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) + avg by (label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (container_memory_working_set_bytes{container!="POD", container!="", pod!=""} * + on (pod) group_left(label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) - record: long_term:tsuru:app_memory_usage:min expr: | - min by (label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (container_memory_working_set_bytes{container!="POD", container!="", pod!=""} * - on (pod) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) + min by (label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (container_memory_working_set_bytes{container!="POD", container!="", pod!=""} * + on (pod) group_left(label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) - record: long_term:tsuru:app_memory_usage:sum expr: | - sum by (label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (container_memory_working_set_bytes{container!="POD", container!="", pod!=""} * - on (pod) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) + sum by (label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (container_memory_working_set_bytes{container!="POD", container!="", pod!=""} * + on (pod) group_left(label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) ## network - record: long_term:tsuru:app_network_transmit_bytes:sum:3m expr: | - sum by (label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (rate(container_network_transmit_bytes_total{pod!=""}[3m]) * - on (pod) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) + sum by (label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (rate(container_network_transmit_bytes_total{pod!=""}[3m]) * + on (pod) group_left(label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) - record: long_term:tsuru:app_network_receive_bytes:sum:3m expr: | - sum by (label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (rate(container_network_receive_bytes_total{pod!=""}[3m]) * - on (pod) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) + sum by (label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (rate(container_network_receive_bytes_total{pod!=""}[3m]) * + on (pod) group_left(label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) ## units ready - record: long_term:tsuru:app_replicas:sum expr: | - sum by (label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (kube_pod_status_phase{phase="Running"} * - on (pod) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"}) + sum by (label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) (kube_pod_status_phase{phase="Running"} * + on (pod) group_left(label_tsuru_io_app_name, label_tsuru_io_app_version, label_tsuru_io_app_process, label_tsuru_io_app_pool) kube_pod_labels{label_tsuru_io_is_tsuru="true"})