Merge pull request #362 from msterhuj/feat/memcached_exporter

patch: added the ability to choose which ip to connect
This commit is contained in:
gardar 2024-05-24 23:09:41 +00:00 committed by GitHub
commit d3cf5bfd1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 0 deletions

View file

@ -8,6 +8,8 @@ memcached_exporter_skip_install: false
memcached_exporter_memcached_pid_file: ""
memcached_exporter_memcached_address: ""
memcached_exporter_web_listen_address: "0.0.0.0:9150"
memcached_exporter_web_telemetry_path: "/metrics"

View file

@ -55,6 +55,10 @@ argument_specs:
description:
- "The path to the memcached PID file for process monitoring"
default: ""
memcached_exporter_memcached_address:
description:
- "The ip to the memcached server to monitor"
default: ""
memcached_exporter_binary_install_dir:
description:
- "I(Advanced)"

View file

@ -11,6 +11,9 @@ Group={{ memcached_exporter_system_group }}
ExecStart={{ memcached_exporter_binary_install_dir }}/memcached_exporter \
{% if memcached_exporter_memcached_pid_file != "" %}
'--memcached.pid-file={{ memcached_exporter_memcached_pid_file }}' \
{% endif %}
{% if memcached_exporter_memcached_address != "" %}
'--memcached.address={{ memcached_exporter_memcached_address }}' \
{% endif %}
'--web.listen-address={{ memcached_exporter_web_listen_address }}' \
'--web.telemetry-path={{ memcached_exporter_web_telemetry_path }}' \