El Martes, 12 de Septiembre de 2006 18:06, Malte Geierhos escribió:
> hi
>
> > by today I have though a little bit on that...
> > but my idea was having weigthed checks... so
> > -1 = NOK
> > 0 = OK default weight
> > 1 = OK weight 1
> > 2 = OK weight 2
> >
> > 100 = weight 100
> > so, you can make checks returning a value depending on the load ( you
> > will see if it's a delay, the cpu usage or whatever ).. and then, the
> > ldirectord should assign it
>
> sounds interesting since jeremy seems to have lost some thing while he
> was house moving. :)
> *G* so where's the patch ? ;)
well, my perl is inexistent... so I was thinking on the "nagios" approach...
> and what about the scripts to deliver data about load etc ?
> I thought about this, too a while ago.
> My conclusion was to get several factors like cpu - cycles, Wait/IO,
> memfree etc and give the user
> the ability to give i.e. Wait/IO 60% what means - if wa is up to 100
> percent the server should've only a
> weight of maybe 40 if 100 was normal. If cpu is busy, too with 60% and
> cpucycles was weighted with 25%
> then we've got load 75% so only 25 points ... and so on
> what do you mean ?
Well. .each check could return the weight in function of what it wants... for
an Apache server, it could be something like (MAX_THREADS - CURRENT_THREADS)
* 100 / MAX_THREADS ... as simple as that...
the output of the plugin could be as simple as:
OK: weight <weight>
and the return code for example...
just a simple thing... indeed, what we need is a kind of check for custom
checks...
in the ldirectord.cf you configure something like:
virtual blahblabhalbah
real=IP1:port
real=IP2:port
checktype=custom
checkparam=mycheck %IP other-fixed-params
so, ldirectord will launch mycheck and get the result,and set the availability
and/or weigth...
Ok.. that's just an idea, I'll see the code this week.
BR,
Francisco Gimeno
|