File tree Expand file tree Collapse file tree 5 files changed +24
-19
lines changed
roles/edpm_telemetry_power_monitoring
files/healthchecks/exporter Expand file tree Collapse file tree 5 files changed +24
-19
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ edpm_telemetry_image_download_retries: "{{ edpm_download_retries | default(5) }}
3838edpm_telemetry_old_tripleo_compute_sevices :
3939 - tripleo_ceilometer_agent_ipmi.service
4040# Image to use for kepler
41- edpm_telemetry_kepler_image : " quay.io/sustainable_computing_io/kepler:release-0.7.12 "
41+ edpm_telemetry_kepler_image : " quay.io/sustainable_computing_io/kepler:v0.10.2 "
4242# Instruction for distribution of container health check scripts
4343edpm_telemetry_power_monitoring_healthcheck_sources :
4444 ceilometer_agent_ipmi : ceilometer_agent
Original file line number Diff line number Diff line change 1515# License for the specific language governing permissions and limitations
1616# under the License.
1717
18- URL=" http://0.0.0.0:8888/healthz "
18+ URL=" http://0.0.0.0:8888/metrics "
1919TIMEOUT=5 # Timeout in seconds
2020
2121# Get the HTTP status code and response body using curl
22- RESPONSE=$( curl -s -w " %{http_code}" $URL --max-time $TIMEOUT )
22+ RESPONSE=$( curl -I - s -w " %{http_code}" $URL --max-time $TIMEOUT )
2323BODY=${RESPONSE: 0:- 3} # Extract the body (all but the last 3 characters)
2424HTTP_CODE=${RESPONSE: -3} # Extract the last 3 characters as the HTTP status code
2525
@@ -29,11 +29,5 @@ if [ "$HTTP_CODE" -ne 200 ]; then
2929 exit 1
3030fi
3131
32- # Check if the response body contains "ok"
33- if [[ " $BODY " != * " ok" * ]]; then
34- echo " $1 Health check failed: Response body does not contain 'ok'"
35- exit 1
36- fi
37-
38- echo " $1 Health check passed: HTTP status code $HTTP_CODE , Health response 'ok'"
32+ echo " $1 Health check passed: HTTP status code $HTTP_CODE "
3933exit 0
Original file line number Diff line number Diff line change 9898 path : " {{ edpm_telemetry_certs }}/tls.key"
9999 register : tls_key_stat
100100
101+ - name : Gather virtualization fact
102+ ansible.builtin.setup :
103+ gather_subset :
104+ - " !all"
105+ - " !min"
106+ - " virtual"
107+
101108- name : Render container config templates
102109 ansible.builtin.template :
103110 src : " {{ item }}"
108115 vars :
109116 ca_bundle_exists : " {{ ca_bundle_stat_res.stat.exists }}"
110117 tls_cert_exists : " {{ tls_crt_stat.stat.exists and tls_key_stat.stat.exists }}"
118+ running_in_vm : " {{ ansible_facts['virtualization_role'] == 'guest' }}"
111119
112120- name : Configure tls if present
113121 when :
Original file line number Diff line number Diff line change 1+ web:
2+ listenAddresses:
3+ - :8888
4+ {% if running_in_vm |bool %}
5+ # WARN DO NOT ENABLE THIS IN PRODUCTION - for CI testing only
6+ dev:
7+ fake-cpu-meter:
8+ enabled: true
9+ zones: ["package", "core", "dram"]
10+ {% endif %}
Original file line number Diff line number Diff line change 44 "restart": "always",
55 "ports": ["8888:8888"],
66 "net": "host",
7- "command": "-v=2 ",
7+ "command": "--config.file=/etc/kepler/kepler-config.yaml ",
88 "recreate": true,
9- "environment": {
10- "ENABLE_GPU": "true",
11- "EXPOSE_CONTAINER_METRICS": "true",
12- "ENABLE_PROCESS_METRICS": "true",
13- "EXPOSE_VM_METRICS": "true",
14- "EXPOSE_ESTIMATED_IDLE_POWER_METRICS": "false",
15- "LIBVIRT_METADATA_URI": "http://openstack.org/xmlns/libvirt/nova/1.1"
16- },
179{% if edpm_telemetry_power_monitoring_healthcheck %}
1810 "healthcheck": {
1911 "test": "/openstack/healthcheck kepler",
2012 "mount": "/var/lib/openstack/healthchecks/kepler"
2113 },
2214{% endif %}
2315 "volumes": [
16+ "/var/lib/openstack/config/telemetry-power-monitoring/kepler-config.yaml:/etc/kepler/kepler-config.yaml:z",
2417 "/lib/modules:/lib/modules:ro",
2518 "/run/libvirt:/run/libvirt:shared,ro",
2619 "/sys:/sys",
You can’t perform that action at this time.
0 commit comments