From aa167c33036427865814b529b64ffcdb53fcfc84 Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Wed, 8 May 2019 18:16:36 +0200 Subject: [PATCH] Add Drupal and Nextcloud site to netdata http check --- templates/httpcheck.conf | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/templates/httpcheck.conf b/templates/httpcheck.conf index 46ad412..c011fb6 100644 --- a/templates/httpcheck.conf +++ b/templates/httpcheck.conf @@ -98,7 +98,7 @@ redirect: no # This plugin is intended for simple cases. Currently, the accuracy of the response time is low and should be used as reference only. {% for item in netdata_httpcheck|default([]) %} -{% if not item.disabled|default(false) %} +{% if not item.disabled|default(false) and item.username is not defined %} {{ item.name|to_uuid }}: name: '{{ item.name }}' @@ -114,3 +114,33 @@ redirect: no {% endif %} {% endif %} {% endfor %} +{% for drupal in drupal_settings|default([]) %} +{% for site in drupal.domains|default([]) %} +{% if site.uptime is defined and not site.uptime.disabled|default(false) and site.apache_auth is not defined %} + +{{ site.uptime.name|to_uuid }}: + name: '{{ site.uptime.name }}' + url: '{{ site.protocol|default('https') }}://{% if site.apache_auth is defined %}{{ site.apache_auth.user }}:{{ site.apache_auth.password }}@{% endif %}{{ site.domain }}{% if site.uptime.path is defined %}/{{ site.uptime.path }}{% endif %}' +{% if site.uptime.pollerParams|default(false) and site.uptime.pollerParams.body|default(false) %} + regex: {{ site.uptime.pollerParams.body|regex_escape() }} +{% endif %} +{% if site.uptime.timeout|default(false) %} + timeout: {{ site.uptime.timeout }} +{% endif %} +{% endif %} +{% endfor %} +{% endfor %} +{% for site in nextcloud_settings|default([]) %} +{% if site.uptime is defined and not site.uptime.disabled|default(false) and site.apache_auth is not defined %} + +{{ site.uptime.name|to_uuid }}: + name: '{{ site.uptime.name }}' + url: '{{ site.protocol|default('https') }}://{% if site.apache_auth is defined %}{{ site.apache_auth.user }}:{{ site.apache_auth.password }}@{% endif %}{{ site.domain }}{% if site.uptime.path is defined %}/{{ site.uptime.path }}{% endif %}' +{% if site.uptime.pollerParams|default(false) and site.uptime.pollerParams.body|default(false) %} + regex: {{ site.uptime.pollerParams.body|regex_escape() }} +{% endif %} +{% if site.uptime.timeout|default(false) %} + timeout: {{ site.uptime.timeout }} +{% endif %} +{% endif %} +{% endfor %} -- GitLab