diff --git a/roles/ceems_api_server/defaults/main.yml b/roles/ceems_api_server/defaults/main.yml index eec3d41..50876b2 100644 --- a/roles/ceems_api_server/defaults/main.yml +++ b/roles/ceems_api_server/defaults/main.yml @@ -1,5 +1,5 @@ --- -ceems_api_server_version: "0.1.0" +ceems_api_server_version: 0.1.0 ceems_api_server_binary_local_dir: "" ceems_api_server_binary_url: "https://github.com/{{ _ceems_api_server_repo }}/releases/download/\ v{{ ceems_api_server_version }}/ceems-{{ ceems_api_server_version }}.linux-{{ go_arch }}.tar.gz" diff --git a/roles/ceems_api_server/molecule/alternative/molecule.yml b/roles/ceems_api_server/molecule/alternative/molecule.yml index 1aeeb8d..793630c 100644 --- a/roles/ceems_api_server/molecule/alternative/molecule.yml +++ b/roles/ceems_api_server/molecule/alternative/molecule.yml @@ -27,6 +27,29 @@ provisioner: ceems_api_server_updaters_config: - id: tsdb-0 updater: tsdb + extra_config: + cutoff_duration: 5m + queries: + # Avgerage CPU utilisation + avg_cpu_usage: + global: | + {% raw %} + avg_over_time( + avg by (uuid) ( + ( + rate(ceems_compute_unit_cpu_user_seconds_total{uuid=~"{{.UUIDs}}"}[{{.RateInterval}}]) + + + rate(ceems_compute_unit_cpu_system_seconds_total{uuid=~"{{.UUIDs}}"}[{{.RateInterval}}]) + ) + / + ( + ceems_compute_unit_cpus{uuid=~"{{.UUIDs}}"} + / on (instance) group_left () + ceems_cpu_per_core_count + ) + )[{{.Range}}:] + ) * 100 + {% endraw %} ceems_api_server_cli_args: - --log.level=debug ceems_api_server_env_vars: diff --git a/roles/ceems_api_server/templates/config.yaml.j2 b/roles/ceems_api_server/templates/config.yaml.j2 index 7749923..665300a 100644 --- a/roles/ceems_api_server/templates/config.yaml.j2 +++ b/roles/ceems_api_server/templates/config.yaml.j2 @@ -2,15 +2,15 @@ {{ ansible_managed | comment }} {% if ceems_api_server_config | length > 0 %} ceems_api_server: -{{ ceems_api_server_config | to_nice_yaml | indent(2, true) }} +{{ ceems_api_server_config | to_nice_yaml(sort_keys=False) | indent(2, true) }} {% endif %} {% if ceems_api_server_clusters_config | length > 0 %} clusters: -{{ ceems_api_server_clusters_config | to_nice_yaml | indent(2, true) }} +{{ ceems_api_server_clusters_config | to_nice_yaml(sort_keys=False) | indent(2, true) }} {% endif %} {% if ceems_api_server_updaters_config | length > 0 %} updaters: -{{ ceems_api_server_updaters_config | to_nice_yaml | indent(2, true) }} +{{ ceems_api_server_updaters_config | to_nice_yaml(sort_keys=False,default_style='|') | indent(2, true) }} {% endif %} diff --git a/roles/ceems_exporter/defaults/main.yml b/roles/ceems_exporter/defaults/main.yml index 735e43a..8c7d10f 100644 --- a/roles/ceems_exporter/defaults/main.yml +++ b/roles/ceems_exporter/defaults/main.yml @@ -1,5 +1,5 @@ --- -ceems_exporter_version: "0.1.0" +ceems_exporter_version: 0.1.0 ceems_exporter_binary_local_dir: "" ceems_exporter_binary_url: "https://github.com/{{ _ceems_exporter_repo }}/releases/download/v{{ ceems_exporter_version }}/\ ceems-{{ ceems_exporter_version }}.linux-{{ go_arch }}.tar.gz" diff --git a/roles/ceems_lb/templates/config.yaml.j2 b/roles/ceems_lb/templates/config.yaml.j2 index f866871..4927073 100644 --- a/roles/ceems_lb/templates/config.yaml.j2 +++ b/roles/ceems_lb/templates/config.yaml.j2 @@ -2,15 +2,15 @@ {{ ansible_managed | comment }} {% if ceems_lb_config | length > 0 %} ceems_lb: -{{ ceems_lb_config | to_nice_yaml | indent(2, true) }} +{{ ceems_lb_config | to_nice_yaml(sort_keys=False) | indent(2, true) }} {% endif %} {% if ceems_api_server_config | length > 0 %} ceems_api_server: -{{ ceems_api_server_config | to_nice_yaml | indent(2, true) }} +{{ ceems_api_server_config | to_nice_yaml(sort_keys=False) | indent(2, true) }} {% endif %} {% if ceems_api_server_clusters_config | length > 0 %} clusters: -{{ ceems_api_server_clusters_config }} +{{ ceems_api_server_clusters_config | to_nice_yaml(sort_keys=False) | indent(2, true) }} {% endif %}