Add vars to configure prometheus module

Add new vars prometheus_enabled and prometheus_config to be used to
configure the metricbeats prometheus module.  The module will be used to
query prometheus exporters and write the metrics pulled from prometheus
to elasticsearch.

Change-Id: I6c52e28cc982a13472aa8f6d3098a22adcb7d3c1
This commit is contained in:
Michael Vollman 2018-10-17 09:31:07 -04:00
parent 06fca4a2f6
commit 20dcf18064

View File

@ -455,13 +455,18 @@ metricbeat.modules:
# #password: pass # #password: pass
# #
##----------------------------- Prometheus Module ----------------------------- ##----------------------------- Prometheus Module -----------------------------
#- module: prometheus {% if (prometheus_enabled | default(false) | bool) and (prometheus_config is defined) %}
# metricsets: ["stats"] {% for prometheus in prometheus_config %}
# period: 30s - module: prometheus
# hosts: ["localhost:9090"] metricsets: [{% for mset in prometheus.metricsets|default(["collector"]) %}"{{ mset }}"{% if not loop.last %},{% endif %}{% endfor %}]
# metrics_path: /metrics enabled: {{ prometheus.enabled | default('true') }}
# #namespace: example period: {{ prometheus.period | default("10s") }}
hosts: [{% for phost in prometheus.hosts %}"{{ phost }}"{% if not loop.last %},{% endif %}{% endfor %}]
metrics_path: {{ prometheus.metrics_path | default("/metrics") }}
namespace: {{ prometheus.namespace }}
# #
{% endfor %}
{% endif %}
##------------------------------ RabbitMQ Module ------------------------------ ##------------------------------ RabbitMQ Module ------------------------------
{% if (rabbitmq_enabled | default(false) | bool) and (rabbitmq_monitoring_password is defined) %} {% if (rabbitmq_enabled | default(false) | bool) and (rabbitmq_monitoring_password is defined) %}
- module: rabbitmq - module: rabbitmq