Zabbix 3.4 Integration

Infos:

  • Used Zammad version: 2.3.x
  • Used Zammad installation source: (source, package, …) unknown
  • Operating system: Ubuntu 16.4 lts
  • Browser + version: Mozilla latest

Mail interface between zabbix and zammad is set up and runs.

Expected behavior:

  • I want to parse for an event id for a “customer” zabbix monitoring in the mail. Then I want to add this mail to a existing ticket.

Actual behavior:

  • Zammad creates new tickets for acknowledge mails.

Steps to reproduce the behavior:

  • set up mail notification in zabbix. Integrate mail into zammad. Create event in zabbix, wait some time and check the ticket in zammad. Acknowledge the event in zabbix. Check zammad. New ticket is created instead of adding the mail to the existing ticket.

I guess the zammad version now is 2.4.x - if so and you used apt-get, then you’re using package as installation source. :slight_smile:

To be sure:
Your Monitoring creates a new ticket as a issue for a machine comes up (e.g. not responding) with a unique ID somewhere in the E-Mail. When you acknowledge the problem or it resolves it self, your monitoring sends a new E-Mail with the same unique ID that you then want to merge / append to the existing ticket?

Did I catch that right?

Edit: Could you please post a truncated E-Mail (with headers) that shows how such a E-Mail can look like? I don’t have the monitoring - you can forward it by E-Mail to if you want to, just drop me a PM.

Now i am using zammad 2.4.x. problems with the upgrade process are documented here

Problem Mail looks like this

Von: noreply@domain.de noreply@domain.de
Gesendet: Freitag, 4. Mai 2018 12:27
An: Ticket
Betreff: Event 2546 Problem: Test CPU <5asdasdas
Problem started at 12:27:19 on 2018.05.04
Problem name: Test CPU <5test
Host: HOSTNAME
Severity: High
Original problem ID: 2546

ACK Mail looks like this

Von: noreply@domain.de noreply@domain.de
Gesendet: Freitag, 4. Mai 2018 12:30
An: Ticket
Betreff: 2546 Acknowledged: Test CPU <5asdasdas
Zabbix Administrator (Admin) acknowledged problem at 2018.05.04 12:30:15 with the following message:
Testnachricht ACK
Current problem status is PROBLEM

Resolved mail looks similar.

The zabbix Event ID is the first number in the subject. I can edit this if needed.

Thanks for those information. I took a look and currentely the problem is, that you cannot merge tickets with filters, macros, triggers or schedulers.

So in this case we have to options:

  • Doing some API-magic
  • finding another way to achieve what you want

As this is a little bit more complexx, I’ll take a further look when I have more time - but I cannot promise anything. Maybe API integration would be a better idea overall - as the monitoring system could get the ticket ID for that case and then append it automatically.

you can try:

Well this setting is only for the zammad Ticket ID if it’s not in the subject of the mail. But there is no field “foreign id”. Would be great to have such a extra field, but i don’t know how to implement this.

What you’re searching for is:

Settings -> Object -> New Attribute

You can add attributes for the ticket there. But you’ll still to have the problem of merging those two tickets :frowning:

Well nice. But I don’t want to have two tickets to merge. I want the first one updated. Is this attribute readable by the API?

Yes, this should be available. You could also fetch for the ticket number so you don’t need to create another object (as long as you don’t care about the Zabbix-ID)

You can refer to the API-Documentation there:
https://docs.zammad.org/en/latest/api-intro.html

Output looks like this as example - please note that ID and number is not the same. ID is the internal ID and number the ticket number.

curl -H “Authorization: Token token=XXXXX” https://some.domain.tld/api/v1/tickets/3378
{“id”:3378,“group_id”:18,“priority_id”:2,“state_id”:2,“organization_id”:null,“number”:“20180509260012”,“title”:“Test”,“owner_id”:3,“customer_id”:10,“note”:null,“first_response_at”:“2018-05-09T09:52:59.781Z”,“first_response_escalation_at”:null,“first_response_in_min”:null,“first_response_diff_in_min”:null,“close_at”:null,“close_escalation_at”:null,“close_in_min”:null,“close_diff_in_min”:null,“update_escalation_at”:null,“update_in_min”:null,“update_diff_in_min”:null,“last_contact_at”:“2018-05-09T09:52:59.781Z”,“last_contact_agent_at”:“2018-05-09T09:52:59.781Z”,“last_contact_customer_at”:null,“last_owner_update_at”:“2018-05-09T09:52:59.928Z”,“create_article_type_id”:1,“create_article_sender_id”:1,“article_count”:1,“escalation_at”:null,“pending_time”:null,“type”:null,“time_unit”:null,“preferences”:{},“updated_by_id”:3,“created_by_id”:3,“created_at”:“2018-05-09T09:52:59.539Z”,“updated_at”:“2018-05-09T09:52:59.904Z”

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.