Infos:
- Used Zammad version: 6.2.0-1709189301.4a2dd7d0.jammy
- Used Zammad installation type: package
- Operating system: ubuntu 22.04
- Browser + version: Firefox 123.0 (64-bit)
Expected behavior:
Goal is to generate tickets based on CheckMK notifications in dedicated group(s) for specific organization(s), for both services and hosts.
The notification calls the Zammad API according to the CheckMK integration settings and adds attributes like group_id
and organization_id
, by doing this the ticket is created in the appropriate group for the defined organization and the overviews can be filtered by
group
is
Monitoring group(s)
organization
is
current user organization
- When the API using
curl
is called to test the API and ticket object attributes likegroup_id
andorganization_id
are added, that alsoorganization_id
attribute is set in the newly created ticket
Actual behavior:
- The group is set correctly, the organization is not
organization_id
is not set (nil
)
Steps to reproduce the behavior:
Set up Organization(s)
Set up Group(s)
Set up CheckMK integration
Get group_id
and organization_id
using rails console commands
Test curl
API call with defined group_id
and organization_id
The group is set correctly, the organization is not
export NOTIFY_HOSTPROBLEMID=123
export NOTIFY_HOSTNAME=SC-154518-01-01
export NOTIFY_HOSTSTATE="DOWN"
export NOTIFY_HOSTOUTPUT="CRITICAL - Host unreachable @ rta nan, lost 100%"
curl -k -X POST \
-F "event_id=$NOTIFY_HOSTPROBLEMID" \
-F "host=$NOTIFY_HOSTNAME" \
-F "state=$NOTIFY_HOSTSTATE" \
-F "text=$NOTIFY_HOSTOUTPUT" \
-F "group_id=13" \
-F "organization_id=8" \
https://zammad.example.com/api/v1/integration/check_mk/<token>
Additional notes
Is adding the organization(s) to the customer_id: 1
(System), the correct solution for this issue?
I also tried to set a customer_id
=3 which is member of the organization_id
=8 but that did not work either.
export NOTIFY_HOSTPROBLEMID=123
export NOTIFY_HOSTNAME=SC-154542-01-01
export NOTIFY_HOSTSTATE="DOWN"
export NOTIFY_HOSTOUTPUT="CRITICAL - Host unreachable @ rta nan, lost 100%"
curl -k -X POST \
-F "event_id=$NOTIFY_HOSTPROBLEMID" \
-F "host=$NOTIFY_HOSTNAME" \
-F "state=$NOTIFY_HOSTSTATE" \
-F "text=$NOTIFY_HOSTOUTPUT" \
-F "group_id=13" \
-F "organization_id=8" \
-F "customer_id=3" \
https://zammad.example.com/api/v1/integration/check_mk/<token>
Is it required to add support for organization_id
in check_mk_controller.rb or something different?
Any pointer/idea/workaround would be greatly appreciated.
Thanks