For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Mazen2006_14317's avatar
Mazen2006_14317
Icon for Nimbostratus rankNimbostratus
Mar 05, 2014

Could i use a json page as an iFile to show when pool members are in maintenance?

Hello,

 

I have an LTM v 11.2.1. I need to show to clients a maintenance page in json format when nodes are in maintenance. Couls i use iFile for this? does it support json format? I will call the iFile in an iRule when active pool members is < 1.

 

please help!

 

Yours, Mazen

 

3 Replies

  • Hello, I don't know about limitation of using json, you can try to use simple iRule:

    when HTTP_REQUEST { 
    if {[active_members [LB::server pool]] < 1} {  
        HTTP::respond 200 content [ifile get ifile_name] 
    }
    }
    
  • There should be no limitation on data types in an iFile. To further clarify your intentions, add a Content-Type header to the response:

    HTTP::respond 200 content [ifile get ifile_name] "Content-Type" "application/json"