All of us are aware of DataStream feature of NetScaler. It offers great optimization and monitoring features for MYSQL, MSSQL databases. With NetScaler 10.1 we extended these capabilities for Oracle Database monitoring.

These monitors enable ‘intelligent monitoring’ of your application than doing basic health check. I will walk you through with steps required to configure a monitor and then we will discuss some creative use cases for them

1.       First you need to create a ‘db user’ in NetScaler. This user must have credentials to log in to database
add db user <user> -password <password>

2.       Creating Monitor
Now on NS GUI go to configuration -> Traffic Management -> Load Balancing -> Monitors and click add

Choose Oracle-ECV as monitor type

Interval is the frequency in which NS will query database.
Response time-out suggest how long NS should wait to get a reply.
Destination IP and Port are of oracle DB server to which this monitor should connect

3.       Giving intelligence to Monitor
This is the most beautiful part of these ‘intelligent monitors’. As these monitors are SQL aware you can specify a query which needs to be executed on DB and process response to decide state of monitor

Now our monitor is ready to function. You can bind it to any service configured in NetScaler.

These monitors can be used to achieve some creative use cases, like

1.       Making load balancing vServer aware of DB health

2.       Blocking requests from reaching application server if a condition is met at database. e.g. if there are already ‘N’ active users in database redirect new connections to a different server ( a typical case of session management )

I will discuss detailed configuration to achieve these use cases in my next blog. Meanwhile experiment with this long awaited monitor for oracle database and do not forget to share your experience.