Ad Widget

Collapse

Zabbix + Zendesk

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • He-ba
    Junior Member
    • Mar 2021
    • 15

    #1

    Zabbix + Zendesk

    Hello Everyone!

    Would you please explain it to me. I have the Zabbix server and Zendesk tickets system. I have configured Zendesk Media. I see, tickets was created on the Zendesk but not closed if trigger was change severity from Problem to OK. I don't have any ideas what need put in Recovery operations, or Zabbix + Zendesk works one way create a new tickets only or need make a script. If I try to set up Zendesk user to recovery,

    Zendesk config

    I receive messages:


    Error

    If anyone has experience configure the Zabbix and Zendesk + closing or change of status (tickets), I will be grateful if you share...

    Best regards,

    Dmitrij
  • He-ba
    Junior Member
    • Mar 2021
    • 15

    #2
    Hello,

    I found the problem in the script:

    Status
    In my case 0 - Trigger and vuala

    Example

    Maybe someone will need it.

    Comment

    • cthompson@baylor
      Junior Member
      • Oct 2022
      • 6

      #3
      Thanks That fixed one of the two issues I'm having. I changed the value from 1 to 0 and it now updates the ticket. How do you close or mark the ticket solved? That's where I'm stuck now.

      Comment

      • He-ba
        Junior Member
        • Mar 2021
        • 15

        #4
        Hi,

        Can you check in your Configuration -> Actions tab -> Trigger actions. You need some like this (open and recovery Actions add Zendesk):

        Click image for larger version  Name:	image.png Views:	0 Size:	26.9 KB ID:	453035
        Last edited by He-ba; 21-10-2022, 15:35.

        Comment

        • cthompson@baylor
          Junior Member
          • Oct 2022
          • 6

          #5
          Click image for larger version

Name:	Zendesk3.png
Views:	557
Size:	51.7 KB
ID:	453042 I do have the settings. It will update the ticket but not close. Do I need to create a Parameters field or edit the script?
          Last ticket update says
          Problem has been resolved in 1m 56s at 11:17:31 on 2022.10.21
          Problem name: HTTP service is down on Test-
          Host: Test-
          Severity: Average
          Operational data: Up (1)
          Original problem ID: 27079​
          ​ ​
          ​ ​





          Click image for larger version  Name:	Zendesk1.png Views:	0 Size:	35.8 KB ID:	453041

          ​​
          Last edited by cthompson@baylor; 21-10-2022, 17:23.

          Comment

          • He-ba
            Junior Member
            • Mar 2021
            • 15

            #6
            Sorry, missed your message. I just compared my setup and you, I have this:

            Click image for larger version

Name:	image.png
Views:	569
Size:	52.6 KB
ID:	453061
            If needed, I can send you my script. You can compare them.​​
            Attached Files

            Comment

            • cthompson@baylor
              Junior Member
              • Oct 2022
              • 6

              #7
              I updated my setting to match yours. same think ticket stays open in zendesk. I was hoping there was a setting or trigger that I have not configured.



              Attached Files

              Comment

              • He-ba
                Junior Member
                • Mar 2021
                • 15

                #8
                Hm, can you please for test remove in Actions - "Update operations" and check what happens

                Comment

                • cthompson@baylor
                  Junior Member
                  • Oct 2022
                  • 6

                  #9
                  I removed "Update operations". Under operations. And I still have the same results. Here is Action tab if that helps.
                  Click image for larger version

Name:	image1.jpg
Views:	539
Size:	46.3 KB
ID:	453083

                  Comment

                  • He-ba
                    Junior Member
                    • Mar 2021
                    • 15

                    #10
                    Ok, thanks, looks like from the Zabbix side all is good. Can you check, your user in Zendesk has access to close the ticket? I don't have now access to the Zendesk admin panel and check. I try today recheck my Zabbix zendesk script, maybe I some miss.

                    Comment

                    • He-ba
                      Junior Member
                      • Mar 2021
                      • 15

                      #11
                      Hello,

                      Ok, can you please check in Zendesk -> Admin Dashboard -> username this:

                      Click image for larger version

Name:	image.png
Views:	600
Size:	17.7 KB
ID:	453186

                      In the script, I see only what we need to change in the configuration. I don't have any customization in the script:


                      [QUOTE]


                      // Possible values: 0 - Trigger, 1 - Discovery, 2 - Autoregistration, 3 - Internal.
                      if ([0, 1, 2, 3].indexOf(parseInt(params.event_source)) === -1) {
                      throw 'Incorrect "event_source" parameter given: ' + params.event_source + '\nMust be 0-3.';
                      }

                      // Check {EVENT.VALUE} for trigger-based and internal events.
                      // Possible values: 1 for problem, 0 for recovering
                      if (params.event_value !== '0' && params.event_value !== '1'
                      && (params.event_source === '0' || params.event_source === '3')) {
                      throw 'Incorrect "event_value" parameter given: ' + params.event_value + '\nMust be 0 or 1.';
                      }

                      // Check {EVENT.UPDATE.STATUS} only for trigger-based events.
                      // Possible values: 0 - Webhook was called because of problem/recovery event, 1 - Update operation.
                      if (params.event_source === '0' && params.event_update_status !== '0' && params.event_update_status !== '1') {
                      throw 'Incorrect "event_update_status" parameter given: ' + params.event_update_status + '\nMust be 0 or 1.';
                      }

                      if (params.event_source !== '0' && params.event_value === '0') {
                      throw 'Recovery operations are supported only for trigger-based actions.';
                      }

                      I mark in the script position what may be interesting for you. You can try to change these options. I will try to find more.

                      Comment

                      • cthompson@baylor
                        Junior Member
                        • Oct 2022
                        • 6

                        #12
                        You have been a great help on this. I checked in Zendesk and I'm using an admin account vs Contributor for now. What I was able to do to get it to close the ticket was create a rule in Zendesk.


                        . Click image for larger version  Name:	Zr2.jpg Views:	0 Size:	20.8 KB ID:	453362
                        Attached Files
                        Last edited by cthompson@baylor; 26-10-2022, 15:36.

                        Comment

                        • He-ba
                          Junior Member
                          • Mar 2021
                          • 15

                          #13
                          Hi, thanks for the info about Zendesk. I'm glad I was able to help!

                          Comment

                          • RobinH
                            Member
                            • Jul 2023
                            • 55

                            #14
                            Hey!

                            Saw your thread about Zendesk

                            Im sitting with a problem when it come to updating the tickets.
                            But when I try the settings you show in here, it does not work. I get warnings and only way to make it work and send events is to use "1" as event_value and "0" as event_update_status which deactivate the update possibility.

                            So right now I only get new tickets, both new events and updates or recoverys.

                            Click image for larger version

Name:	image.png
Views:	263
Size:	48.3 KB
ID:	484704

                            Is thera anything that needs to be changed in the script or do I need more settings and Macros than they say in the instruction?

                            Comment

                            • He-ba
                              Junior Member
                              • Mar 2021
                              • 15

                              #15
                              Hi,

                              Sorry I didn't see your message. From the Zendesk side, do your user privileges have to open and close the ticket? It's my last work config from zabbix side, sorry right now i cannot show you from Zendesk side.

                              Click image for larger version

Name:	zendesk.png
Views:	246
Size:	46.3 KB
ID:	486022

                              Comment

                              Working...