So I am wanting to send a health check request to each interface. In each of our domains we have an MPG that listens for traffic on a URL, then passes that request to the appropriate WSP that is subscribed to a WSDL(normally through WSRR). I would like to create a rule inside the WSP that says "if it's from this address, respond successful with out checking anything on the backend". I've been googling and messing with this for a couple days. Anyone have any tips?
Chris.Z 270005TU1770 Posts
Re: How to respond to a health check2013-05-06T14:06:03ZThis is the accepted answer. This is the accepted answer.
For anyone who sees this in the future. We are using this code, and it seems to work for what we want to do. Create this as .xsl, and make a transformation in your request rule. <xsl:template match="/"> <xsl:variable name="X-clientIP" select="dp:request-header('X-Client-IP')"/> <xsl:variable name="clientIP" select="substring-before($X-clientIP,',')"/> <xsl:if test="$clientIP='*EnterIP Here*' or $clientIP=' *EnterIP Here* '"> <dp:reject override="true">Successful health check</dp:reject> </xsl:if> <xsl:copy-of select="."/> </xsl:template>
HisNibs 2700018A2U87 Posts
Re: How to respond to a health check2013-05-09T14:28:37ZThis is the accepted answer. This is the accepted answer.
- Chris.Z 270005TU17
Simpler way would be to add a set variable action on a ruleset and set it to service/skip-backside = 1, making sure the match rule is set to the address you want the HC to respond against
Then run a simple XFORM to send back a formatted message of your choiceUpdated on 2013-05-09T14:29:28Z at 2013-05-09T14:29:28Z by HisNibs