New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


HTTP XML/REST - Multiple Errors on different Tools

Votes:

0

Your Vote:

Up

Down

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 by  Evan Lane (110) 2 1



Best Answer

Accepted Answer

Votes:

1

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  Evan Lane (110) 2 1



Accepted Answer

Votes:

1

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  Evan Lane (110) 2 1



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  Evan Lane (110) 2 1

Last change on Dec 13, 2016 5:44:10 PM by  Evan Lane (110) 2 1



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  PRTG Tools Family [prtgtoolsfamily.com] (12,925) 3 4



Votes:

0

Your Vote:

Up

Down

Hi @Stephan,

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

Created on Dec 9, 2016 2:38:18 PM by  Evan Lane (110) 2 1



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

@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 by  Evan Lane (110) 2 1



Votes:

1

Your Vote:

Up

Down

Glad it has been solved :)

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



Please log in or register to enter your reply.


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.