What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

<> are translated to {} in http request

Votes:

0

I'm connecting PRTG to our TOPdesk call management system. An alarm triggers a HTTP request to TOPdesk to generate a new supportticket. I've got that working now.

Now it's time for some formattting. I want to send HTML tags in the request. So things like <b> and <i>. PRTG keeps changing the URL that I use when I use < and >. They become { and }.

Why and how to adress this? Can't find it in the documentation or on the forum.

formatting http request

Created on Jan 20, 2017 9:36:27 AM



12 Replies

Votes:

0

Hi,

So I took a look at the API documentation of the TOPdesk software (well documented by the way) and found a solution. So I assume that you are using the default API of the software, so you push the data to TOPdesk via Post. To get HTML tags within the post data, encode it (example website). So my example looked like:

{
	"request" : "%3Ci%3EUser123%3C%2Fi%3E%20%3Cb%3Erequested%20a%20new%20computer%3C%2Fb%3E",
	"action" : "some action",
	"caller" : {
	 	"id" : "e127ddc1-0df3-5ee4-9144-95f751bc13ee"
	},
	"operator" : {
	 	"id" : "751E0A70-5B2B-572D-8CAE-99F52651B6D0"
	},
	"operatorGroup" :  {
	 	"id" : "997F35AE-4490-5FDE-BA1C-72044499EA41"
	}
}

The "request" field will then look like: User123 requested a new computer

Best regards.

Created on Jan 20, 2017 10:02:53 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

That's not the problem. PRTG replaces the character within the GUI. I'm not using Post btw, just the complete string in the URL.

TOPdesk reads the string litteraly so it does not really matter what I post. It's not the code, but PRTG itself.

If I use this (part of the URL): 'PRTG signaleert op %datetime dat %shortname het volgende meldt: %message. Laatste waarde is %lastvalue' it's exactly what TOPdesk will process and I get the new ticket in TOPdesk nicely with the variables filled with the actuala values.

But if I try to save this in the URL:

'PRTG signaleert op <i>%datetime</i> dat <b>%shortname</b> het volgende meldt: <i>%message</i>. Laatste waarde is <i>%lastvalue</i>'

It becomes:

'PRTG signaleert op {i}%datetime{/i} dat {b}%shortname{/b} het volgende meldt: {i}%message{/i}. Laatste waarde is {i}%lastvalue{/i)'.

And that's within in the GUI. And it's also what PRTG sends to TOPdesk, which doesn't work naturally.

Created on Jan 20, 2017 11:03:39 AM

Last change on Aug 8, 2018 7:10:56 AM by  Luciano Lingnau [Paessler]



Votes:

0

Hi,

Unfortunately you are only able to use the brackets within the post data field. Otherwise PRTG encodes the string twice and your system can't read it most likely. So please consider to use the post data instead, you have much more options. :)

Created on Jan 20, 2017 11:47:44 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

As it happens we are working on a API based connection. I'm no real developer but you gave me nice case to excercise. Will look in to it!

Created on Jan 20, 2017 12:38:30 PM



Votes:

0

Reopen this old one. How did you manage to send the authorization to Topdesk?

Created on Mar 23, 2018 2:50:25 PM



Votes:

0

@ToHe: I ended up creating a PowerShell script to invoke a request using the TOPdesk API. A notification in PRTG fires the script to create an incident in TOPdesk.

For this to work you have to create a user in TOPdesk with rights to: a) log on tot TOPdesk b) use the API c) use the items you want to edit (e.g. Incidents, Changes etc) After that you need to log in as that user in TOPdesk and create an API application password. That password can then be used in your API call to TOPdesk.

Created on Mar 26, 2018 7:07:36 AM



Votes:

0

@CoDesk: Thank you very much! I also used this method last Friday but thought there must be a way to directly use the HTTP Action.

Created on Mar 26, 2018 8:13:56 AM



Votes:

0

Thanks for jumping in, @CoDesk! :)


Kind regards,
Stephan Linke, Tech Support Team

Created on Mar 26, 2018 8:23:07 AM by  Stephan Linke [Paessler Support]



Votes:

0

@Stephan Linke: So you can confirm that the "HTTP Action" cannot be used with Authentication (Basic)?

Created on Mar 26, 2018 8:32:14 AM



Votes:

0

An (plain old) HTTP request works as well as long as you use plain text. The formattting of text (HTML tags) and the contents of PRTG messages (with '%' in it for instance) kept bugging me. The API way (in combination with PowerShell) has resolved that now.

Created on Mar 26, 2018 8:38:54 AM



Votes:

0

I thought the initial problem was using pointy brackets within the request? Anyways, there are no authentication methods to be configured for the HTTP notification. So yes, you're better off with PowerShell in this case :)

[edit] dang, too slow ;)


Kind regards,
Stephan Linke, Tech Support Team

Created on Mar 26, 2018 8:40:20 AM by  Stephan Linke [Paessler Support]

Last change on Mar 26, 2018 8:41:11 AM by  Stephan Linke [Paessler Support]



Votes:

0

Correct Stephan. Only TOPdesk requires a simple authentication string in the HTTP request, it's not a requirement for PRTG to use HTTP requests.

TOPdesk API requires Basis Auth.

Created on Mar 26, 2018 8:47:26 AM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.