Forum Discussion

smp_86112's avatar
smp_86112
Icon for Cirrostratus rankCirrostratus
Aug 31, 2009

changing the monitor "defaults from" value

I have a legacy config mess where monitor inheritance is all over the map, and for no good reason. For example I have the following:

        
 monitor techcouncil-DateServlet {        
 defaults from appdeploy-DateServlet        
 send         
 }

        
 monitor appdeploy-DateServlet {        
 defaults from http        
 send         
 }        
 

To make things worse, the appdeploy-DateServlet monitor is not applied anywhere but the techcouncil-DateServlet is.

Instead of relying on this cascading inheritance, I would simply like to change the techcouncil-DateServlet monitor defaults from value to http. Yet the bigpipe command fails:

b monitor techcouncil-DateServlet '{ defaults from http }'

So does:

b monitor techcouncil-DateServlet '{ defaults from http interval 10 timeout 31 recv "T 20" }'

Both fail with this:

BIGpipe: monitor template modification error:

01070685:3: Cannot modify the monitor type (defaults from) for monitor techcouncil-DateServlet.

Do I simply have the bigpipe syntax wrong?

Also, where the heck are the values for the default http monitor defined?
  • Why can't you recreate the monitor and re-apply it with the defaults?

     

     

    CB
  • Yeah, I guess I can re-create.

     

     

    I have quite a number of these, and it would just be much more efficient if I could do this from the command line. So I would still like to understand what is preventing me from doing it. It seems like it should be a pretty straightforward explanation, but I am just not smart enough to to figure it out.

     

     

  • I don't think you can change the defaults from the command line - I could never do it in the past. I usually script so that I removed the monitor from the node or pool and then delete the monitor....then recreate it and re-associate with the pool or node. I have done this to hundreds of nodes and pools in seconds.

     

     

    Hope this helps

     

    CB

     

     

  • I can't envision how you would do this with so may nodes and pools without having to hard-code the entire script. How do you determine what pool to remove a monitor from without checking the definition of each pool? And what scripting language did you write this in?
  • If each node and pool is very unique then yes it would be a daunting task and the only benefit for the script is really on apply it while running in production to minimize the downtime. You would write this in a bash script and simply run bigpipe commands in a specific order.