From 34657913524449a321afd9482456e21f0ae545f5 Mon Sep 17 00:00:00 2001 From: Nikolaos Kakouros Date: Thu, 10 Sep 2020 22:05:48 +0200 Subject: [PATCH] Adds location to heartbeat monitor --- templates/beats/heartbeat.openvpn.monitors.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/templates/beats/heartbeat.openvpn.monitors.yml b/templates/beats/heartbeat.openvpn.monitors.yml index 504e857..eca6f57 100644 --- a/templates/beats/heartbeat.openvpn.monitors.yml +++ b/templates/beats/heartbeat.openvpn.monitors.yml @@ -9,18 +9,26 @@ schedule: '@every 5s' hosts: - "{{ openvpn_host | d(inventory_hostname) }}" + processors: + - add_observer_metadata: + geo: + name: "{{ openvpn_monitor_location }}" # The next two monitors require the management server to be enabled in OpenVPN # config. - name: OpenVPN service running id: "{{ openvpn_monitor_mgmt_with_pass_id | d('openvpn_mgmt_with_pass') }}" type: tcp - enabled: {{ openvpn_monitor_tcp_with_pass_enabled | d(false) }} + enabled: {{ openvpn_monitor_mgmt_with_pass_enabled | d(false) }} schedule: '@every 5s' hosts: - "tcp://{{ openvpn_monitor_mgmt_host }}:{{ openvpn_monitor_mgmt_port }}" check: receive: 'ENTER PASSWORD:' + processors: + - add_observer_metadata: + geo: + name: "{{ openvpn_monitor_location }}" - name: OpenVPN service running id: "{{ openvpn_monitor_mgmt_id | d('openvpn_mgmt') }}" @@ -31,3 +39,7 @@ - "tcp://{{ openvpn_monitor_mgmt_host }}:{{ openvpn_monitor_mgmt_port }}" check: receive: '>INFO:OpenVPN Management Interface' + processors: + - add_observer_metadata: + geo: + name: "{{ openvpn_monitor_location }}"