Giter Site home page Giter Site logo

Comments (22)

angela-d avatar angela-d commented on August 22, 2024 1

@diiickie Auto-closure of tickets was never built into this, you could certainly extend it to do so, but it wasn't a feature I needed - so it didn't get added.

After a device is down, I still want someone to physically check it, so closing them wouldn't work, in that regard.

@TimHirs explained pretty well against, too.

If you're getting duplicate tickets, you didn't close or delete the old ones. There is a search function within the existing code base that will see if a matching ticket exists. If the content doesn't match, it'll open a new one.

If you're seeing it for multiple sensor tickets per device, you would want to set a dependency in the settings, so the child sensors get paused if the parent sensor (dependency) has a down status.

from prtg-zendesk-webhook.

angela-d avatar angela-d commented on August 22, 2024

Did you set a threshold?

On the Zendesk device in PRTG:

  • To the right of 'Unassigned' you should see the two wheels/edit icon > click to edit and set these values, if you haven't already:
    zendesk

from prtg-zendesk-webhook.

diiickie avatar diiickie commented on August 22, 2024

I don't have a Zendesk device setup as I didn't see this in any of the setup documentation.

Can you advise how I set this up or a link to somewhere I can take a look please?

from prtg-zendesk-webhook.

angela-d avatar angela-d commented on August 22, 2024

Did you follow the steps under the How to Use It section? (from the readme)

from prtg-zendesk-webhook.

diiickie avatar diiickie commented on August 22, 2024

Yes, I have:

Added ZendeskWebhook.ps1, configured with login and API token etc
Configured PRTG Execute Program notification with parameters
I have assigned the notification to a group.

PRTG and Zendesk must be talking successfully as I get ticket creations when devices are 'Up' just nothing when they first go Down.

from prtg-zendesk-webhook.

angela-d avatar angela-d commented on August 22, 2024

Oh I see, so you're getting a flurry of 'up' tickets, instead of 'Down' ones. Disregard my earlier message with the screenshot - was a different Zendesk script I was mistakenly referring to. :)

These two steps are what I'd focus on:

  • In the search field (upper right corner), search for the sensor Group you'd like to use this script with
  • Under the group list, click it > Notification Triggers > Add/edit the trigger you wish to use with this script and select the notification template you assigned the script to earlier

I'm suspecting the Notification Trigger is the problem.

Here's mine, for the "Printers" group:
printers

This opens a ticket only when a device inside the Printers group has a Down status after the specified timeframe is met.

from prtg-zendesk-webhook.

diiickie avatar diiickie commented on August 22, 2024

from prtg-zendesk-webhook.

angela-d avatar angela-d commented on August 22, 2024

Can you explain your device/sensor setup and provide screenshots?

from prtg-zendesk-webhook.

TimHirs avatar TimHirs commented on August 22, 2024

Hi,

I have exactly the same issue, I am just getting UP messages, no DOWN messages.
In the PRTG log I found following error message:

Error sending "EXE": Error1. ICMP : The term 'ICMP' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:203 + ... Points' [...] (Sensor/Source/ID: 6401/4193/2)

Many thanks for help!

from prtg-zendesk-webhook.

angela-d avatar angela-d commented on August 22, 2024

@TimHirs Where are you seeing this message? In PRTG or Zendesk?

Error sending "EXE": Error1. ICMP : The term 'ICMP' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:203 + ... Points' [...] (Sensor/Source/ID: 6401/4193/2)

Can you also explain your setup and provide screenshots?

from prtg-zendesk-webhook.

TimHirs avatar TimHirs commented on August 22, 2024

Hi angela-d,
thanks for the quick reply.
The setup is quite simple, I am running just a ping sensor on one of our devices.
If the device gets DOWN, I can see the error message I mentioned in the PRTG log:
Error
The result is that nothing was sent over to Zendesk --> no ticket created

If the device is UP again, the log file in PRTG shows:
OK
The result is a ticket that has been created in Zendesk.

It would be great ti have this ticket when the device gets DOWN.

Many many thanks for your efforts

from prtg-zendesk-webhook.

angela-d avatar angela-d commented on August 22, 2024

Please post the following:

  • What version of PRTG are you using?
  • What version of Powershell? Run: $PSVersionTable.PSVersion

Unless I am looking at your first screenshot wrong, it looks like the script was triggered on the Down sensor, but because of a conflict yet to be determined, failed.

This is my environment:

  • PRTG: 20.1.55.1775+ (though I believe I've been using this script since 18.x)
  • Powershell:
-----  -----  -----  ------
5      1      14393  3471

Am I correct in understanding the 'Ok' trigger writes to the ticket, as expected?

The error you receive during the Down sensor, from PRTG:

The term 'code:' is not recognized as the name of a cmdlet, function, script file, or operable program.

Seems like a coding error, but I can't say I've ever seen this in my PRTG instance, so that is why I'm thinking it may be related to a Powershell version difference.

code: is also not referenced anywhere within this script, as well.

from prtg-zendesk-webhook.

TimHirs avatar TimHirs commented on August 22, 2024

Hello,

Version of PowerShell:
Major Minor Build Revision


5 1 14393 206

PRTG-Version
20.1.55.1775+

the OK-trigger writes the ticket in Zendesk as expected, the DOWN trigger not.

Thanks.

from prtg-zendesk-webhook.

angela-d avatar angela-d commented on August 22, 2024

Can you turn debug on and trigger a down sensor and post anything that's seen? (open the script and set: $debug = 0 to $debug = 1)

Also, are you using the down simulation or are these actual live 'down' sensors?

from prtg-zendesk-webhook.

TimHirs avatar TimHirs commented on August 22, 2024

Turned on debug, but no output when a down sensor has been triggered.
When device is back up, then a log file is created (OK)
I am using live DOWN sensors, not the simulation.

from prtg-zendesk-webhook.

angela-d avatar angela-d commented on August 22, 2024

The script isn't executing at all, when the down sensors are hit, it sounds like.

What version of PRTG are you on?
Edit: just scrolled up and seen. That's much newer of a version than this script originally ran on (I'm also on 20+) so that is definitely not the issue.

Can you modify the triggers and set the notifications to 'Up'?
I presume you have them set to 'Down' right now, so I want to see what happens when you reverse it, since it's working when the sensors come back online.

from prtg-zendesk-webhook.

TimHirs avatar TimHirs commented on August 22, 2024

I´ve modified the triggers and set the notifications to "UP".
Procedure I have followed:

  • triggered a device to get down (just pulled out the cable ;-))
  • modified notification in PRTG as in the following screenshot:
    grafik
  • enabled the device and it came up in PRTG again

Result : The ticket has been created in Zendesk.

It seems to be an issue just with the DOWN state.

from prtg-zendesk-webhook.

angela-d avatar angela-d commented on August 22, 2024

I was able to reproduce this, finally!

It took a bit of digging - but it appears to be related to a subject that has a space in the $Message variable. Something like: Devicename and color and not Devicename

I suspect something changed in PRTG during one of the updates.

Here's what happened:

  • You copied my parameters from the How to use it section -- note: ''%message''
  • When I first updated this script, that was the only way I could 'escape' that value.

I vaguely remember doing battle with this same issue, now.

How to fix

Modify your notification template that talks to Zendesk.

  • Setup > Account Settings > go to your Zendesk template
  • Under the Execute Program section > Parameters, you'll find:
-Device '%device' -Status '%status' -Down '%down' -Group '%group' -commentssensor '%commentssensor' -CommentsProbe '%commentsprobe' -Message ''%message''

Change it to:

-Device '%device' -Status '%status' -Down '%down' -Group '%group' -commentssensor '%commentssensor' -CommentsProbe '%commentsprobe' -Message '%message'

Please test and report back if that fixes it? If so, I'll update the install instructions (unless you'd like to, of course.)

from prtg-zendesk-webhook.

TimHirs avatar TimHirs commented on August 22, 2024

Many many thanks, this has worked for me 👍
Happy to say that this has fixed the issue.

from prtg-zendesk-webhook.

diiickie avatar diiickie commented on August 22, 2024

I can also confirm this has made PRTG effectively report the down alert to Zendesk.

It did not however close the ticket after the sensor was 'Up'.

from prtg-zendesk-webhook.

TimHirs avatar TimHirs commented on August 22, 2024

@diiickie ; same for me, but I also don´t want to close the ticket automatically when the sensor is UP again. Most time there is a reason why the sensor was down, that needs to be investigated in my infrastructure, so I am happy that the script just updated the ticket.

from prtg-zendesk-webhook.

diiickie avatar diiickie commented on August 22, 2024

@TimHirs Mine didn't update the ticket though it just created another which is even worse than email alerts which I currently merge as it doesn't carry the same level of info.

from prtg-zendesk-webhook.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.