Forum Discussion

Allan_Carhart_2's avatar
Allan_Carhart_2
Icon for Nimbostratus rankNimbostratus
Feb 26, 2009

Using iRules to access/change monitor stanza

Hi Folks,

 

The question is specific to 6800 model BigIPs running 9.x code.

 

I have an iRule that we have been using for a few years which reads certain class values for storing certain static information.

 

I want to see if the iRule can also access other information stored in /config/bigip.conf. Specifically, I would like to be able to read the send and recv lines in a monitor definition like this:

 

monitor default {

 

defaults from https

 

recv "200 OK"

 

send "GET /test.htm HTTP/1.0\r\n”

 

}

 

 

 

Being able to access this sort of configuration within the iRule would be very helpful.

 

 

I have been searching all around DevCentral for information that would help answer this question, and just haven't figured it out yet.

 

 

Thanks in advance.

2 Replies

  • You may be able to modify the contents of a class in memory, but there is no way to trigger that change to be saved from memory to file. And I don't believe there is a way to modify other configuration (including monitors) from an iRule.

     

     

    What are you trying to do? An iControl script would potentially allow you to programmatically modify the LTM configuration.

     

     

    Aaron
  • Aaron,

     

     

    I'm sorry, I misspoke -- The iRule doesn't need to change these values, just read them.

     

    Currently it reads classes, and I want to read 'monitor' configuration as well. The subject of this post incorrectly says "access/change" where all I need to do is access (read) the values.

     

     

    Truth be told, the reason to do this is a significant hack. My team is being given very limited access to our BigIPs, so we will no longer be permitted to set Class values ourselves. We will, however, be allowed to establish a new 'Monitor' and set values in the "recv" and "send" fields. So the current working idea is to create a Monitor which never actually gets used, but contains "recv" and "send" fields that contain information -- basically using the recv and send fields the way classes are intended to be used.

     

     

    So a standalone LTM-based request would set/modify values in the monitor stanza.

     

    Then we need to see if the iRule can read these values.

     

     

    Hope that makes sense...Then the next question is whether that can be done -- the iRule reading these values.