diff --git a/charts/tsuru-monitoring/Chart.yaml b/charts/tsuru-monitoring/Chart.yaml index e57c339..815a686 100644 --- a/charts/tsuru-monitoring/Chart.yaml +++ b/charts/tsuru-monitoring/Chart.yaml @@ -15,10 +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.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "0.1.0" +version: 0.1.2 diff --git a/charts/tsuru-monitoring/templates/tsuru-apps-rules.yaml b/charts/tsuru-monitoring/templates/tsuru-apps-rules.yaml index 7a76915..26b7189 100644 --- a/charts/tsuru-monitoring/templates/tsuru-apps-rules.yaml +++ b/charts/tsuru-monitoring/templates/tsuru-apps-rules.yaml @@ -18,9 +18,9 @@ spec: rules: - record: tsuru:apps_cpu_usage_seconds_total expr: | - container_cpu_usage_seconds_total{container="", pod_name!=""} * - on (pod_name) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process) label_replace(kube_pod_labels{label_tsuru_io_is_tsuru="true"}, "pod_name", "$1", "pod", "(.*)") + 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"} - record: tsuru:apps_memory_working_set_bytes expr: | - container_memory_working_set_bytes{pod_name!="", container=""} * - on (pod_name) group_left(label_tsuru_io_app_name, label_version, label_tsuru_io_app_process) label_replace(kube_pod_labels{label_tsuru_io_is_tsuru="true"}, "pod_name", "$1", "pod", "(.*)") + 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"} diff --git a/charts/tsuru-monitoring/templates/tsuru-rpaas-rules.yaml b/charts/tsuru-monitoring/templates/tsuru-rpaas-rules.yaml index 77ce806..7944561 100644 --- a/charts/tsuru-monitoring/templates/tsuru-rpaas-rules.yaml +++ b/charts/tsuru-monitoring/templates/tsuru-rpaas-rules.yaml @@ -18,27 +18,27 @@ spec: name: tsuru-rpaas.rules rules: - expr: | - container_memory_working_set_bytes{} * on(pod_name) group_left(label_rpaas_service, label_rpaas_instance) label_replace(kube_pod_labels{label_nginx_tsuru_io_app="nginx"}, "pod_name", "$1", "pod", "(.*)") + container_memory_working_set_bytes{} * on(pod) group_left(label_rpaas_service, label_rpaas_instance) kube_pod_labels{label_nginx_tsuru_io_app="nginx"} record: "rpaas:container_memory_working_set_bytes" - expr: | - container_cpu_usage_seconds_total{} * on(pod_name) group_left(label_rpaas_service, label_rpaas_instance) label_replace(kube_pod_labels{label_nginx_tsuru_io_app="nginx"}, "pod_name", "$1", "pod", "(.*)") + container_cpu_usage_seconds_total{} * on(pod) group_left(label_rpaas_service, label_rpaas_instance) kube_pod_labels{label_nginx_tsuru_io_app="nginx"} record: "rpaas:container_cpu_usage_seconds_total" - expr: | - container_network_receive_bytes_total{} * on(pod_name) group_left(label_rpaas_service, label_rpaas_instance) label_replace(kube_pod_labels{label_nginx_tsuru_io_app="nginx"}, "pod_name", "$1", "pod", "(.*)") + container_network_receive_bytes_total{} * on(pod) group_left(label_rpaas_service, label_rpaas_instance) kube_pod_labels{label_nginx_tsuru_io_app="nginx"} record: "rpaas:container_network_receive_bytes_total" - expr: | - container_network_transmit_bytes_total{} * on(pod_name) group_left(label_rpaas_service, label_rpaas_instance) label_replace(kube_pod_labels{label_nginx_tsuru_io_app="nginx"}, "pod_name", "$1", "pod", "(.*)") + container_network_transmit_bytes_total{} * on(pod) group_left(label_rpaas_service, label_rpaas_instance) kube_pod_labels{label_nginx_tsuru_io_app="nginx"} record: "rpaas:container_network_transmit_bytes_total" - expr: | - container_cpu_load_average_10s{} * on(pod_name) group_left(label_rpaas_service, label_rpaas_instance) label_replace(kube_pod_labels{label_nginx_tsuru_io_app="nginx"}, "pod_name", "$1", "pod", "(.*)") + container_cpu_load_average_10s{} * on(pod) group_left(label_rpaas_service, label_rpaas_instance) kube_pod_labels{label_nginx_tsuru_io_app="nginx"} record: "rpaas:container_cpu_load_average_10s" - expr: | - container_spec_memory_limit_bytes{} * on(pod_name) group_left(label_rpaas_service, label_rpaas_instance) label_replace(kube_pod_labels{label_nginx_tsuru_io_app="nginx"}, "pod_name", "$1", "pod", "(.*)") + container_spec_memory_limit_bytes{} * on(pod) group_left(label_rpaas_service, label_rpaas_instance) kube_pod_labels{label_nginx_tsuru_io_app="nginx"} record: "rpaas:container_spec_memory_limit_bytes" - expr: |