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

HTTP XML/REST - Multiple Errors on different Tools

Votes:

0

Hi Everyone,

I am working with the HTTP XML/REST sensor to get the number of tickets from our ticketing system.

I have tested it with two different tools and attempted to get the sensor working in PRTG

On one tool (SOAPui) it works fine - returns the JSON { "@count": 12, "@start": 1, "@totalcount": 12, "Messages": [], "ResourceName": "Incident", "ReturnCode": 0, "content": [ {"Incident": {"IncidentID": "IM10214"}}, {"Incident": {"IncidentID": "IM10215"}}, {"Incident": {"IncidentID": "IM10217"}}, {"Incident": {"IncidentID": "IM10218"}}, {"Incident": {"IncidentID": "IM10220"}}, {"Incident": {"IncidentID": "IM10223"}}, {"Incident": {"IncidentID": "IM10224"}}, {"Incident": {"IncidentID": "IM10227"}}, {"Incident": {"IncidentID": "IM10229"}}, {"Incident": {"IncidentID": "IM10230"}}, {"Incident": {"IncidentID": "IM10231"}}, {"Incident": {"IncidentID": "IM10234"}} ] } On XML/REST Sensor Query Builder - returns a 401 error for authentication

On PRTG it returns Warning: "server/path -n=nodename"

All three of these have been configure with the exact same settings.

Any suggestions on what to do next?

http-xml-rest-value-sensor json rest sensor xml-rest

Created on Dec 7, 2016 6:49:29 PM



Best Answer

Accepted Answer

Votes:

1

Using
//IncidentID
in combination with Use the number of occurrences of the selected XML node or its children/siblings is probably the easier approach here. As bonus, use this as custom message:

There are %1 incidents in the ticket system.

Created on Dec 7, 2016 8:27:15 PM by  Stephan Linke [Paessler Support]

Last change on Dec 8, 2016 7:23:58 AM by  Stephan Linke [Paessler Support]



12 Replies

Votes:

0

What actual values do you want to retrieve here? All incident IDs?

Created on Dec 7, 2016 8:13:16 PM by  Stephan Linke [Paessler Support]



Votes:

0

Hi @Stephan

All I am trying to do, for now, is get the "@totalcount" of incidents which represents all open incidents in the system.

Cheers

Created on Dec 7, 2016 8:15:25 PM



Accepted Answer

Votes:

1

Using
//IncidentID
in combination with Use the number of occurrences of the selected XML node or its children/siblings is probably the easier approach here. As bonus, use this as custom message:

There are %1 incidents in the ticket system.

Created on Dec 7, 2016 8:27:15 PM by  Stephan Linke [Paessler Support]

Last change on Dec 8, 2016 7:23:58 AM by  Stephan Linke [Paessler Support]



Votes:

0

Thanks @Stephan,

I gave that a try over using the @totalcount - replaced it with IncidentID and selected the Use the number of occurrences of the selected XML node or its children/siblings.

However; I am still encountering the same error of: server/path -n=nodename when I start up the sensor.

Created on Dec 7, 2016 8:39:55 PM



Votes:

0

Argh, my string got messed up. Please try //IncidentID

...for the XML Node. Does that one work? :)

Created on Dec 8, 2016 7:22:47 AM by  Stephan Linke [Paessler Support]

Last change on Dec 8, 2016 7:22:54 AM by  Stephan Linke [Paessler Support]



Votes:

0

Hi @Stephan,

Gave the change a shot with IncidentID, still no success, same error as before: server/path -n=nodename

Created on Dec 8, 2016 2:59:07 PM

Last change on Dec 8, 2016 2:59:07 PM



Votes:

0

Evan, could you post a screenshot with your complete sensor settings, please?

Created on Dec 9, 2016 6:49:23 AM by  Stephan Linke [Paessler Support]



Votes:

0

Hi Evan,

I have placed the json content on our website for testing.

Using URL http://prtgtoolsfamily.com/KB72351.json
and XML Node @totalcount

Gives me 12:Node @totalcount holds value 12.

Created on Dec 9, 2016 2:15:13 PM



Votes:

0

Hi @Stephan,

Here is a screenshot of my Sensor up to now: XML/Rest Sensor

Created on Dec 9, 2016 2:38:18 PM



Votes:

0

I think the URL is kind of messed up - what URL do you enter within the browser when you access this page? Especially the angled brackets make me wonder if this works in the first place... :)

Created on Dec 12, 2016 5:23:50 AM by  Stephan Linke [Paessler Support]

Last change on Dec 12, 2016 5:24:08 AM by  Stephan Linke [Paessler Support]



Votes:

0

@Stephan,

Thanks for pointing that out. I tried it without the two "<" and ">" and it is now working!

Side note: the original URL I was using worked in the SOAPui tool, so I assumed it must be part of the RestAPI for the Web Service.

Thanks!

Created on Dec 12, 2016 1:12:46 PM



Votes:

1

Glad it has been solved :)

Created on Dec 12, 2016 9:45:49 PM by  Stephan Linke [Paessler Support]




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.