Forum Discussion

Jim_Couch_16225's avatar
Jim_Couch_16225
Icon for Nimbostratus rankNimbostratus
Feb 13, 2015

iRule - Down node using Response Header

My dev team and I would like to create an iRule that would look at a value in the response header in order to mark a node (in a pool) up or down. They'll use this for maintenance. Basically they'l be setting a value of "out" in a header named "x-node". I'll probably work to write that to the log as well so that during troubleshooting, I'll know why a node was marked down.

 

I'm very new to iRules but trying to learn. I have googled and searched for basic iRules, the use of curl, and I cant seem to get pointed in the right direction.

 

Thanks in advance.

 

Jim

 

2 Replies

  • Have you considered doing this in an HTTP monitor?

    ltm monitor http HTTP-Down_on_responce_header {
        defaults-from http
        destination *:http
        interval 5
        ip-dscp 0
        recv "x-node: up"
        recv-disable "x-node: down"
        send "GET /\r\n"
        time-until-up 0
        timeout 16
    }
    
    • Jim_Couch_16225's avatar
      Jim_Couch_16225
      Icon for Nimbostratus rankNimbostratus
      I first tried that, but it doesnt seem to work. My "get" is in a different path. Wondering if that is why its failing. On my get string I have "/logging/loggingservice.asmx \r\n"