# ${host} in alarm-notify.sh is using 'registry hostname' parameter

**URL:** <https://community.netdata.cloud/t/host-in-alarm-notify-sh-is-using-registry-hostname-parameter/1238>\
**Category:** Help\
**Tags:** agent\
**Created:** [April 29, 2021, 8:13pm UTC](https://community.netdata.cloud/t/host-in-alarm-notify-sh-is-using-registry-hostname-parameter/1238 "2021-04-29T20:13:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjtice](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/mjtice/32/510_2.png) [@mjtice](https://community.netdata.cloud/u/mjtice)\
**Post date:** [April 29, 2021, 8:13pm UTC](https://community.netdata.cloud/t/host-in-alarm-notify-sh-is-using-registry-hostname-parameter/1238/1 "2021-04-29T20:13:04Z")

</div>

I noticed that in the alarm-notify.sh (specifically the Alerta section but I’m sure in general) the `${host}` is being set to the value of `${args_host}` which appears to be the same value of the `registry hostname` parameter. Is there a way to override this?

---

<div class="post-metadata">

**Author:** ![Manolis\_Vasilakis](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/manolis_vasilakis/32/820_2.png) [@Manolis\_Vasilakis](https://community.netdata.cloud/u/Manolis_Vasilakis)\
**Post date:** [May 5, 2021, 8:20am UTC](https://community.netdata.cloud/t/host-in-alarm-notify-sh-is-using-registry-hostname-parameter/1238/2 "2021-05-05T08:20:16Z")

</div>

Hi! Yes, indeed the parameter is passed from the agent to the script and it’s always the registry hostname.

Could you describe the use case that needs to override it?

Thanks!

---

<div class="post-metadata">

**Author:** ![mjtice](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/mjtice/32/510_2.png) [@mjtice](https://community.netdata.cloud/u/mjtice)\
**Post date:** [May 15, 2021, 12:49am UTC](https://community.netdata.cloud/t/host-in-alarm-notify-sh-is-using-registry-hostname-parameter/1238/3 "2021-05-15T00:49:46Z")

</div>

Hi @Manolis_Vasilakis,

When we configure the `registry hostname` we prefix a cluster-type to the host name. This is so that when we look up a host in the registry all the cluster types are together. For example, a postgres database node with a hostname of `db01` would be `registry hostname = postgres db01`, etc.

We can modify the `registry hostname` to be just the FQDN but then we lose the ability to group like machines together.

---

<div class="post-metadata">

**Author:** ![Manolis\_Vasilakis](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/manolis_vasilakis/32/820_2.png) [@Manolis\_Vasilakis](https://community.netdata.cloud/u/Manolis_Vasilakis)\
**Post date:** [May 17, 2021, 4:22pm UTC](https://community.netdata.cloud/t/host-in-alarm-notify-sh-is-using-registry-hostname-parameter/1238/4 "2021-05-17T16:22:08Z")

</div>

Hi!

Ok, so you have a host, named for example `db01`, `registry hostname` is set to `postgres db01`, and you would like notifications sent to appear from `db01` instead of `postgres db01` ?

You could override the `$host` variable… It’s not particularly good advice 🙂 but here goes: you can set the $host variable in whatever you want inside `/etc/health_alarm_notify.conf`. This file will be executed from `alarm-notify.sh` so, it will override what the script gets from `${args_host}`. But: it will only work for parent nodes (i.e. the nodes that actually send the notifications), because it will also override the `$host` variable value for any children that connect to this parent and send notifications through it…

I will let you know if a proper solution can be achieved.

---

<div class="post-metadata">

**Author:** ![Manolis\_Vasilakis](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/manolis_vasilakis/32/820_2.png) [@Manolis\_Vasilakis](https://community.netdata.cloud/u/Manolis_Vasilakis)\
**Post date:** [May 18, 2021, 1:50pm UTC](https://community.netdata.cloud/t/host-in-alarm-notify-sh-is-using-registry-hostname-parameter/1238/5 "2021-05-18T13:50:59Z")

</div>

Perhaps also host labels: [Use host labels to organize systems, metrics, and alarms | Learn Netdata](https://learn.netdata.cloud/guides/using-host-labels) could be something you could use.
