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

Check Set-Cookie after POST Request

Votes:

0

Hi,

We have a webap where we would like to use PRTG to monitor if login is still possible.

Is it possible to send a POST request and then check for the presence of "Set-Cookie: LtpaToken2" in the returning headers? Like with the curl command below.

$ curl -d "user=login&password=example" -D- https://<url to webseite with POST data handler> HTTP/1.1 302 Found Date: Mon, 28 Nov 2016 08:23:13 GMT X-Powered-By: Servlet/3.0 Location: https://<url to webseite with POST data handler> Content-Length: 0 Set-Cookie: JSESSIONID=<sessionid>:-1; Path=/; HttpOnly Set-Cookie: LtpaToken2=<TokenID>; Path=/; HttpOnly Expires: Thu, 01 Dec 1994 16:00:00 GMT Cache-Control: no-cache="set-cookie, set-cookie2" Content-Language: de-DE

We can send a POST request with the HTTP Advanced Sensor but we don't seem to be able to parse the returning headers or check for the presence of the Set-Cookie: LtpaToken2. Is there another sensor for this kind of task?

Thanks for any help.

http http-header postdata prtg

Created on Nov 28, 2016 8:39:07 AM



3 Replies

Votes:

0

Unable to use GET at all? If not, check this:
https://kb.paessler.com/en/topic/64415

Created on Nov 28, 2016 8:47:30 PM by  Stephan Linke [Paessler Support]

Last change on Nov 28, 2016 8:47:39 PM by  Stephan Linke [Paessler Support]



Votes:

0

GET is not possible.

As I said we need to send the login data using POST and check in the returning headers/cookies for the presence of Set-Cookie: LtpaToken2. The HTTP Advanced Sensor, as far as I can tell, does not include the headers in the Required Keyword section

Created on Nov 29, 2016 7:35:16 AM



Votes:

0

No way around a custom script sensor, unfortunately :/ Maybe you can use this as a start and modify it according to your needs?

Created on Nov 29, 2016 7:46:08 AM 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.