Author Topic: Load monitors  (Read 1485 times)

Offline AdamMaxwell

  • VIP Member
  • ***
  • Posts: 30
  • Karma: 2
Load monitors
« on: June 08, 2009, 06:03:53 AM »
Hello,

I want to configure load monitors so I can monitor the CPU load on a web server. I've configured a metric table and using a SNMP browser found the correct OID for each of the processors on my server. If I generate some load on the server and then do an nstrace I can see the values from the GET request increase (as I would expect), however the monitor never goes down. I've set the threshold on the monitor to 10 so anything above that should generate a failure??

Any suggestions would be great.

Kind regards

Adam

Offline Marco Schirrmeister

  • Hero Member
  • *****
  • Posts: 101
  • Karma: 14
Re: Load monitors
« Reply #1 on: June 08, 2009, 06:43:08 AM »
I have never tried to create a load monitor before. You wrote you searched the OID for each processor but then you looked for the values of the http requests.

If you want to configure a load monitor which is based on the http requests should you not look for the OID for http requests?


Marco


Offline evildani

  • Administrator
  • Hero Member
  • *****
  • Posts: 389
  • Karma: 22
Re: Load monitors
« Reply #2 on: June 08, 2009, 06:47:48 AM »
I have done this in the past. It all comes down to what application container you are running.
For example, if you are using apache+php then you can do your own processor.php page, same thing with .NET.
Yet if you are running Oracle Application Container, you would have to make your own monitor, I once did, what I did was a query to the applet that would monitor the container, then parse the result and look for the appropriate answer, not easy but doable.

Personally I have found that unless the application uses heavy CPU, it is not a good metric to measure the health of the machine. Most web servers and application container will behave well under CPU constrain, they will not handle well if the CPU is very high for a very long time.

If you need some help, I will gladly help.

Dani

Offline AdamMaxwell

  • VIP Member
  • ***
  • Posts: 30
  • Karma: 2
Re: Load monitors
« Reply #3 on: June 08, 2009, 07:28:12 AM »
Sorry the GET requests I were referring to are SNMP Get's which are used to retrieve the values. The only reason I need to use a CPU load monitor is because one of our web applications has a tendancy to create CPU spikes up to 100% across all it's processors and the application team can't fix it.

If you need anymore information please let me know and I will upload what is required.

Adam

Offline evildani

  • Administrator
  • Hero Member
  • *****
  • Posts: 389
  • Karma: 22
Re: Load monitors
« Reply #4 on: June 08, 2009, 07:52:14 AM »
You want to create a SNMP query and use it to monitor the CPU....

What I would do, is take the SNMP monitor, and modify it so that the desired OID is queried and result is evaluated correctly.
In the NS, go to the shell, and look in nsconfig a folder called Monitor, there should be a bunch of perl scripts there, each for each monitor the NS has. Copy the snmp and the custom. Everything you modify should be on the custom, but take the snmp as a template.

I will take a look at the snmp (which I haven't modified) and see how easy it can be done.

Dani

Offline evildani

  • Administrator
  • Hero Member
  • *****
  • Posts: 389
  • Karma: 22
Re: Load monitors
« Reply #5 on: June 08, 2009, 07:55:32 AM »
I read the snmp.pl documentation, and I think this is what you are looking for:

## This script is used to do SNMP monitoring using KAS feature.
## The mandatory arguments are:
##      1. Community string, that is equivalent to password.
##      2. OID , object identifier of the object to be retrieved
## The optional arguments are:
##      1. Threshold, when given the retrieved value is compared
##         against the threshold.

If you do a direct query to the community/OID usiong the threshold you desire, would you get the result you need?

Daniel

Offline AdamMaxwell

  • VIP Member
  • ***
  • Posts: 30
  • Karma: 2
Re: Load monitors
« Reply #6 on: June 08, 2009, 07:58:10 AM »
OK cheers Daniel, I will give that a go and let you know the results.

Offline Paul B

  • Hero Member
  • *****
  • Posts: 193
  • Karma: 20
Re: Load monitors
« Reply #7 on: June 08, 2009, 08:02:10 AM »
I'm sure someone will tell me if I'm talking rubbish, but...

Load Monitors are things that are used to LOAD BALANCE. They are a way of deciding how busy a server is, so that the incoming traffic can be routed to the least busy server. If the load is over the "threshold value", then (from the TMG doc) "The load monitors do not mark the state of a service; however, they take the service out of the load balancing decision". Elsewhere it says "The NetScaler considers the service for load balancing only if the metric is less than the threshold value. The service with the lowest load value is considered for handling client requests."

So the STATE of the service (UP or DOWN) is still set by the standard monitors that you bind to the LB.

And whilst the Load Monitor may decide not to use a specific server to load balance, because it is deemed to be too busy, the state still remains "UP".


Offline evildani

  • Administrator
  • Hero Member
  • *****
  • Posts: 389
  • Karma: 22
Re: Load monitors
« Reply #8 on: June 08, 2009, 01:36:00 PM »
As I see it:

Load Monitors or just monitors are a way to know the state of the service, to consider each service as part of the balancing pool. Also depending on the configuration of the monitor, to determine the best choice for a incoming request.
But remember that the query time and frequency, and if it uses statistics to take that decision depends on the configuration.