Forum Discussion

Ravi_75522's avatar
Ravi_75522
Icon for Nimbostratus rankNimbostratus
Jan 23, 2012

How to create a health monitor to monitor a port -1

We have multiple JVM instances running on different ports like 23305, 24040 etc. The requirement is to create a http monitor which montiors the port 23305 minus 1 (23304). How do i create this monitor

3 Replies

  • Hi Ravi,

    You can use the alias port on a monitor for this. Here's an example you could use on the port 23305 pool member. As the alias port is hardcoded to 23304, the monitoring daemon bigd will check port 23304 but apply the result to the pool member you've assigned the monitor to. If you have a pool of servers all defined on 23305, you can assign this monitor to the pool. Else, if the port number varies by pool member, assign a custom monitor for each pool member with a unique port.

    
    monitor http_minus_one_monitor {
       defaults from http
       dest *:23304
       recv "200 OK"
       send "GET /monitor_page.html HTTP/1.0\r\nConnection: Close\r\n\r\n"
    }
    

    Aaron
  • Thanks for the reply,

     

    cant i use the port number as a variable and decrement its value by 1 and use this as "dest *: $port -1". If yes then how do I get the details of port number
  • Currently, the alias IP and port fields only accept static values so you couldn't do something like $port -1.

     

     

    Aaron