Forum Discussion

boneyard's avatar
Jun 27, 2012

hostname / ip of bigip in irule

might be an easy one or just not possible.

 

 

it there a way to read the hostname from the bigip box (or ip, i.e. management) from within an iRule?

 

 

 

  • tcl_platform wiki

     

    https://devcentral.f5.com/wiki/iRules.tcl_platform.ashx
  • thank you nitass, so a v11 addition, bad luck we are using v10 at the moment.

     

     

    no other way known?

     

     

    hardcoding is not an option, the irule would live on different boxes and i don't like creating one per box.
  • i do not see any other command. not sure if other guys have any idea.

     

     

    by the way, is it possible to use virtual server name instead?

     

     

    virtual wiki

     

    https://devcentral.f5.com/wiki/iRules.virtual.ashx
  • Try [info hostname]

     

     

    milkman@aji-lemon:~$ tclsh

     

    % info hostname

     

    aji-lemon

     

  • Try [info hostname] cool! it works on my unit.

    Jun 28 02:32:57 local/tmm info tmm[4861]: Rule myrule : ve1024.abc.com
  • perfect indeed, thank you very much MiLK_MaN.

     

     

    works on v10 and v11 btw.