# JIRA module in distributed environment

**URL:** <https://community.icinga.com/t/jira-module-in-distributed-environment/3739>\
**Category:** Icinga Web Modules\
**Tags:** distributed, jira, icingaweb2\
**Created:** [March 9, 2020, 8:14pm UTC](https://community.icinga.com/t/jira-module-in-distributed-environment/3739 "2020-03-09T20:14:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gomesar](https://community.icinga.com/user_avatar/community.icinga.com/gomesar/32/2153_2.png) [@gomesar](https://community.icinga.com/u/gomesar)\
**Post date:** [March 9, 2020, 8:14pm UTC](https://community.icinga.com/t/jira-module-in-distributed-environment/3739/1 "2020-03-09T20:14:30Z")

</div>

Hi,

I have installed and configured JIRA module as documentation found in official sites but it does not wok because in our case IcingaWeb is installed in a different host than masters.  
When a notification comes from Icinga, it tried to be resolved in ours “masters” hosts: core1 (192.168.15.3) and core2 (192.168.15.4) but the module is installed in icingaweb host (192.168.15.5), so we got “command not found”.

How can I tell Icinga to execute this notification in my IcingaWeb host?

* * *

`Command` is default.

Jira Notification Template:

```auto
template Notification "JIRA ServiceCrit Homolog" {
    command = "JIRA Service Notification"
}

```

Jira Notification:

```auto
apply Notification "JIRA Service Crit" to Service {
    import "JIRA ServiceCrit Homolog"

    times = {
        begin = 5s
    }
    interval = 0s
    assign where match("check*", service.name) && match("*homolog*", host.name)
    states = [Critical]
    types = [Custom, Problem]
    users = ["tester"]
    vars.jira_ack_author = "JIRAUSER"
    vars.jira_description = "Teste de chamado automatico"
    vars.jira_issuetype = "Incident"
    vars.jira_project = "CH"
    vars.notification_useremail = "$user.email$"
}

```

Thanks.

---

<div class="post-metadata">

**Author:** ![twidhalm](https://community.icinga.com/user_avatar/community.icinga.com/twidhalm/32/18_2.png) [@twidhalm](https://community.icinga.com/u/twidhalm)\
**Post date:** [March 10, 2020, 8:40am UTC](https://community.icinga.com/t/jira-module-in-distributed-environment/3739/2 "2020-03-10T08:40:06Z")

</div>

Hi and welcome to the show, @gomesar

You can install Icinga on the Icinga Web host and use it as an agent. You will want to monitor this host anyway so it’s always a good idea to have Icinga running there. Then you can execute the checks on the Icinga Web host.

---

<div class="post-metadata">

**Author:** ![gomesar](https://community.icinga.com/user_avatar/community.icinga.com/gomesar/32/2153_2.png) [@gomesar](https://community.icinga.com/u/gomesar)\
**Post date:** [March 10, 2020, 4:21pm UTC](https://community.icinga.com/t/jira-module-in-distributed-environment/3739/3 "2020-03-10T16:21:50Z")

</div>

Hi @twidhalm, thanks for the reply.

I want to control in which hosts each check runs, so we have a zone called “core” (hosts: core1, core2) and another called “sats” (hosts: sat1, sat2). Icingaweb host actually do not runs checks. Based on your response, is that ok to create a new zone, put icingaweb into this and specify JIRA Notification to run in this zone, right?

---

<div class="post-metadata">

**Author:** ![twidhalm](https://community.icinga.com/user_avatar/community.icinga.com/twidhalm/32/18_2.png) [@twidhalm](https://community.icinga.com/u/twidhalm)\
**Post date:** [March 10, 2020, 4:35pm UTC](https://community.icinga.com/t/jira-module-in-distributed-environment/3739/4 "2020-03-10T16:35:57Z")

</div>

It’s easier. You can add the Icinga Web host as an agent (basically `endpoint`, `zone` and `host` object with the same name) in your `core` zone. Then you can just add the checks you want to be run there with `command_endpoint` set to `host.name`.

You can find more documentation about this in the official documentation about distributed monitoring/agents.

[https://icinga.com/docs/icinga2/latest/doc/06-distributed-monitoring/#master-with-agents](https://icinga.com/docs/icinga2/latest/doc/06-distributed-monitoring/#master-with-agents)

---

<div class="post-metadata">

**Author:** ![gomesar](https://community.icinga.com/user_avatar/community.icinga.com/gomesar/32/2153_2.png) [@gomesar](https://community.icinga.com/u/gomesar)\
**Post date:** [March 13, 2020, 5:22pm UTC](https://community.icinga.com/t/jira-module-in-distributed-environment/3739/5 "2020-03-13T17:22:01Z")

</div>

I’m sorry @twidhalm, I would mean to control where **notifications** are fired.

Icinga Director does not allow to set `command_endpoint` for Services and Notifications, actually, I cannot insert IcingaWeb into `core` zone because the host resources are very different: IcingaWeb runs with 2 cores and 4GB RAM, core1 and core2 runs with 12 cores and 16GB RAM. So I can not allow IcingaWeb to receive distributed work charge, and we prefer to maintain IcingaWeb in a separate host (is it conceptually wrong?)

Is there any way to maintain this setup and trigger notifications from icigaweb host?  
If it is not possible, how can I grant High Availability to icingaweb?

Thank you

---

<div class="post-metadata">

**Author:** ![twidhalm](https://community.icinga.com/user_avatar/community.icinga.com/twidhalm/32/18_2.png) [@twidhalm](https://community.icinga.com/u/twidhalm)\
**Post date:** [March 17, 2020, 3:04pm UTC](https://community.icinga.com/t/jira-module-in-distributed-environment/3739/6 "2020-03-17T15:04:29Z")

</div>

Hi.

Notifications always fired on every node where the `notification` feature is active that gets to know the `Notification` object and knows about the event that triggers the Notification.

That is normally only masters. If you want, you can activate the feature on Satellites on the way between the Agent and the Masters or on the Agent itself. You can’t “delegate” it to another host.
