It would increase the value of the sensor quite a bit in our environment, if it could

a) allow for username and password in the URL (e.g. http://user:pass@www.paessler.com). At the moment it seems to ignore it and returns "Unauthorized"

b) Instead of just nodename, allow for xpath type of syntax (e.g. NodeName[contains(name,"test")]/SessionsTotal). In my case I have XML output with many nodes with the same name and no properties, that are distinguished from each other by they child node values only.

Thank you for a fantastic product! Alex


Article Comments

Hi Alex,

a) You can put anything in the URL that you like, including username and password, but the server that you query has to support the POST message that you are sending. So simply putting a username and password in a URL will not work. Also keep in mind that any POST message has to be URL-encoded

b) Actually, the node name is parsed as XPath query. The sensor sub fixes the node name with '//' and uses the resulting string as XPath query.

So using:

-n=book/Title[contains(.,'PRTG')]

will result in a XPath query:

//book/Title[contains(.,'PRTG')]

that returns all book titles that contain the word PRTG

Gerard


Feb, 2011 - Permalink