This is what I need. I just had one of my guys submit a request for this exact thing.
I'm guessing that when FreshPlugs get released, we can do something like this, but that's a WAG with a side order of hoping.
Yes,I too would like to do this. We use SSO with Azure AD, so don't want to have these logins being used for dashboards. It would also create a requirement to change passwords on the dashboard periodicly as well.
I agree. Allocating a paid login to this task seems like an overkill. I would also like to see a free license for display/output.
I gave up waiting on this and ended up tailoring a powershell script to retrieve the details (via API) I was interested in for display on our PRTG dashboard. Not pretty, but better than a complete absence of helpdesk data on our screens.
You willing to share that script perhaps? ;)
Here you go.
You will need to add your own Helpdesk URL, API Key & 'View' values.
I created views for 'All Open Tickets' & 'All Pending Tickets'
# This script queries a 'View' from a Freshservice Helpdesk using the API and passes it to PRTG. # The Script should be stored in the custom sensors directory of the PRTG installattion # Typically c:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXE\ # View number from URL must be passed as a paramater # eg for https://SAMPLE.freshservice.com/helpdesk/tickets/view/249389 ; use 249389 # Initial code adapted from work by John Berry - https://support.freshservice.com/support/discussions/topics/312085 param($view) #$view = '999999' #Uncomment for testing $APIKey = 'XXXXXXXXXXXXXXXXX' $helpdeskURL = 'https://SAMPLE.freshservice.com' $encodedCredentials = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $APIKey,$null))) $HTTPHeaders = @{} $HTTPHeaders.Add('Authorization', ("Basic {0}" -f $encodedCredentials)) $HTTPHeaders.Add('Content-Type', 'application/json') $URL = $helpdeskURL + '/helpdesk/tickets/view/' + $view + '?format=json' #output for below line must be suppressed or it causes an error in PRTG ($Tickets = Invoke-WebRequest -Uri $URL -Headers $HTTPHeaders -UseBasicParsing | convertFrom-Json) >$null 2>&1 $result = $Tickets.Count write-host $result,":OK"
@adam I used your ps script and got the EXE sensor up in PRTG though it shows no ticket data. I stored it in the location you specified, only changed the $helpdeskURL, $view and $APIKey. I get the error below when running the ps script directly. I've attached pictures of the logs, settings and Sensor Overview. Could or anyone who has understanding give some insight please.
Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send. At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXE\prtgScriptForFreshService.ps1:18 char:13 + ($Tickets = Invoke-WebRequest -Uri $URL -Headers $HTTPHeaders -UseBas ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand 0 :OK
Hi @Daniel, I went to go check our PRTG and realised we haven't been getting a response since 2018-Mar-10, so I think something must be broken as I am getting the same error as you currently. A quick check online leads me to think that this error could be due to security settings in .Net, but I am not too sure. It could also be due to changes FreshService may have made.
A few notes (not that I think this will help as the error is with the Invoke-WebRequest command:
Further to my last comment, I had a flash of inspiration and figured it must be due to FreshService moving to TLS 1.2. So we need to force our script to use that. Simply add this line directly below the line that reads $helpdeskURL = 'https://SAMPLE.freshservice.com'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
The whole script should now be as below
# This script queries a 'View' from a Freshservice Helpdesk using the API and passes it to PRTG. # The Script should be stored in the custom sensors directory of the PRTG installattion # Typically c:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXE\ # View number from URL must be passed as a paramater # eg for https://SAMPLE.freshservice.com/helpdesk/tickets/view/249389 ; use 249389 # Initial code adapted from work by John Berry - https://support.freshservice.com/support/discussions/topics/312085 param($view) #$view = '999999' #Uncomment for testing $APIKey = 'XXXXXXXXXXXXXXXXX' $helpdeskURL = 'https://SAMPLE.freshservice.com' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $encodedCredentials = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $APIKey,$null))) $HTTPHeaders = @{} $HTTPHeaders.Add('Authorization', ("Basic {0}" -f $encodedCredentials)) $HTTPHeaders.Add('Content-Type', 'application/json') $URL = $helpdeskURL + '/helpdesk/tickets/view/' + $view + '?format=json' #output for below line must be suppressed or it causes an error in PRTG ($Tickets = Invoke-WebRequest -Uri $URL -Headers $HTTPHeaders -UseBasicParsing | convertFrom-Json) >$null 2>&1 $result = $Tickets.Count write-host $result,":OK"
Please also check my comment from earlier today as you may need to add your 'view' to the 'parameter' setting in PRTG Sensor settings.
@Adam,
That worked! Thank you so much.
Laurence Hendy
Hi,
I want to display the dashboard on a monitor in the office but dont want to use a normal Agent logon for security reasons but also don't want to use one of our paid agent licences, it would be good to have a way to display just the dashboard but with a free view only licence.
Regards
Laurence
9 people like this idea