summaryrefslogtreecommitdiffstats
path: root/plugins.d
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-05-13 23:47:04 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-05-13 23:47:04 +0300
commit793dcded1f97a5493375bb241c8903587426ce39 (patch)
treef5304693e39e39f1bc31789a3c528c9011e6f2f3 /plugins.d
parent3ed012abe719349db479956a9afbdb12ab032e81 (diff)
slaves propagate registry_hostname to master, which is now used for alarm notifications, so that clicking an alarm generated by the master can properly show the slave dashboard
Diffstat (limited to 'plugins.d')
-rwxr-xr-xplugins.d/alarm-notify.sh6
1 files changed, 1 insertions, 5 deletions
diff --git a/plugins.d/alarm-notify.sh b/plugins.d/alarm-notify.sh
index b8d65c9b2b..25c0ed6881 100755
--- a/plugins.d/alarm-notify.sh
+++ b/plugins.d/alarm-notify.sh
@@ -115,8 +115,6 @@ debug() {
NETDATA_CONFIG_DIR="${NETDATA_CONFIG_DIR-/etc/netdata}"
NETDATA_CACHE_DIR="${NETDATA_CACHE_DIR-/var/cache/netdata}"
[ -z "${NETDATA_REGISTRY_URL}" ] && NETDATA_REGISTRY_URL="https://registry.my-netdata.io"
-[ -z "${NETDATA_HOSTNAME}" ] && NETDATA_HOSTNAME="$(hostname)"
-[ -z "${NETDATA_REGISTRY_HOSTNAME}" ] && NETDATA_REGISTRY_HOSTNAME="${NETDATA_HOSTNAME}"
# -----------------------------------------------------------------------------
# parse command line parameters
@@ -145,8 +143,6 @@ old_value_string="${20}" # friendly old value (with units)
# -----------------------------------------------------------------------------
# find a suitable hostname to use, if netdata did not supply a hostname
-[ -z "${host}" ] && host="${NETDATA_HOSTNAME}"
-[ -z "${host}" ] && host="${NETDATA_REGISTRY_HOSTNAME}"
[ -z "${host}" ] && host="$(hostname 2>/dev/null)"
# -----------------------------------------------------------------------------
@@ -1108,7 +1104,7 @@ EOF
# prepare the content of the notification
# the url to send the user on click
-urlencode "${NETDATA_REGISTRY_HOSTNAME}" >/dev/null; url_host="${REPLY}"
+urlencode "${host}" >/dev/null; url_host="${REPLY}"
urlencode "${chart}" >/dev/null; url_chart="${REPLY}"
urlencode "${family}" >/dev/null; url_family="${REPLY}"
urlencode "${name}" >/dev/null; url_name="${REPLY}"