Upgrade prometheus-ssh-exporter (v1.5.0-1 -> v1.5.0-2) and integrate with mash_playbook_metrics_exposure_*

This commit is contained in:
Slavi Pantaleev 2024-01-23 18:10:22 +02:00
parent d7c841bc3a
commit 18df3cdc9a
3 changed files with 14 additions and 11 deletions

View file

@ -15,12 +15,14 @@ To enable this service, add the following configuration to your `vars.yml` file
prometheus_ssh_exporter_enabled: true prometheus_ssh_exporter_enabled: true
# if you want to export ssh's probe endpoint, uncomment and adjust the following vars # To expose the metrics publicly, enable and configure the lines below:
# prometheus_ssh_exporter_hostname: mash.example.com # prometheus_ssh_exporter_hostname: mash.example.com
# prometheus_ssh_exporter_path_prefix: /metrics/ssh-exporter # prometheus_ssh_exporter_path_prefix: /metrics/mash-prometheus-ssh-exporter
# prometheus_ssh_exporter_basicauth_user: your_username
# prometheus_ssh_exporter_basicauth_password: your password # To protect the metrics with HTTP Basic Auth, enable and configure the lines below.
# See: https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
# prometheus_ssh_exporter_container_labels_metrics_middleware_basic_auth_enabled: true
# prometheus_ssh_exporter_container_labels_metrics_middleware_basic_auth_users: ''
######################################################################## ########################################################################
# # # #
@ -31,4 +33,4 @@ prometheus_ssh_exporter_enabled: true
## Usage ## Usage
After you've installed the ssh exporter, your ssh prober will be available on `mash.example.com/metrics/ssh-exporter` with the basic auth credentials you've configured if hostname and path prefix where provided After you've installed the ssh exporter, your ssh prober will be available on `mash.example.com/metrics/mash-prometheus-ssh-exporter` with the basic auth credentials you've configured if hostname and path prefix were provided.

View file

@ -3866,15 +3866,13 @@ prometheus_ssh_exporter_enabled: false
prometheus_ssh_exporter_identifier: "{{ mash_playbook_service_identifier_prefix }}prometheus-ssh-exporter" prometheus_ssh_exporter_identifier: "{{ mash_playbook_service_identifier_prefix }}prometheus-ssh-exporter"
prometheus_ssh_exporter_path_prefix: "{{ mash_playbook_metrics_exposure_path_prefix }}/{{ prometheus_ssh_exporter_identifier }}"
prometheus_ssh_exporter_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_base_directory_name_prefix }}prometheus-ssh-exporter" prometheus_ssh_exporter_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_base_directory_name_prefix }}prometheus-ssh-exporter"
prometheus_ssh_exporter_uid: "{{ mash_playbook_uid }}" prometheus_ssh_exporter_uid: "{{ mash_playbook_uid }}"
prometheus_ssh_exporter_gid: "{{ mash_playbook_gid }}" prometheus_ssh_exporter_gid: "{{ mash_playbook_gid }}"
prometheus_ssh_exporter_basicauth_enabled: "{{ prometheus_ssh_exporter_container_labels_traefik_enabled }}"
prometheus_ssh_exporter_basicauth_user: "{{ '%s' | format(mash_playbook_generic_secret_key) | password_hash('sha512', 'ssh.user', rounds=655555) | to_uuid }}"
prometheus_ssh_exporter_basicauth_password: "{{ '%s' | format(mash_playbook_generic_secret_key) | password_hash('sha512', 'ssh.password', rounds=655555) | to_uuid }}"
prometheus_ssh_exporter_container_additional_networks: | prometheus_ssh_exporter_container_additional_networks: |
{{ {{
([mash_playbook_reverse_proxyable_services_additional_network] if mash_playbook_reverse_proxyable_services_additional_network else []) ([mash_playbook_reverse_proxyable_services_additional_network] if mash_playbook_reverse_proxyable_services_additional_network else [])
@ -3886,6 +3884,9 @@ prometheus_ssh_exporter_container_labels_traefik_docker_network: "{{ mash_playbo
prometheus_ssh_exporter_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}" prometheus_ssh_exporter_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
prometheus_ssh_exporter_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}" prometheus_ssh_exporter_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
prometheus_ssh_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ mash_playbook_metrics_exposure_http_basic_auth_enabled }}"
prometheus_ssh_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ mash_playbook_metrics_exposure_http_basic_auth_users }}"
######################################################################## ########################################################################
# # # #
# /prometheus_ssh_exporter # # /prometheus_ssh_exporter #

View file

@ -253,7 +253,7 @@
name: prometheus_postgres_exporter name: prometheus_postgres_exporter
activation_prefix: prometheus_postgres_exporter_ activation_prefix: prometheus_postgres_exporter_
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus-ssh-exporter.git - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus-ssh-exporter.git
version: v1.5.0-1 version: v1.5.0-2
name: prometheus_ssh_exporter name: prometheus_ssh_exporter
activation_prefix: prometheus_ssh_exporter_ activation_prefix: prometheus_ssh_exporter_
- src: git+https://gitlab.com/etke.cc/roles/radicale.git - src: git+https://gitlab.com/etke.cc/roles/radicale.git