[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: any way to issue a statfs() in Lua ?
- From: Laurent Faillie <l_faillie@...>
- Date: Sat, 16 Mar 2013 01:04:00 +0100
Le 16/03/2013 00:00, petah a écrit :
>> In order to be "as light as possible", I would like to launch only 1
>> process to monitor everything
> The rational process is to develop your app first, keeping it modular so you can re-arch it without too much pain, and only then profile its performance -- for specific use-cases/configurations because you can't profile a wildcard.
It's exactly how it's working (at client side) : I mean each and every
probe is a separated lua module and they are all loaded dynamically when
the main script is started using "require". Consequently, if you don't
want anymore a probe, you have only to move it outside "Probes" directory.
At coding level, the only thing shared b/w probes and the main process
is a public function in modules (probes) that exposes the result of checks.
> It is, but won't prevent a user from putting a foot in the mouth :)
It will be user responsibility ;D
> Take a look at Conky for a Lua-extensible system monitor, putting
> aside display functionality. cheers, -- p
I'm already using conky, but my need is elsewhere : I'm running several
machines at home (mines, my wife one and soon kids ones) and some of
them are headless (basement server, Gentoo binhost, Distcc participants
...).
I discovered recently one of them has a dying disk ... and I discovered
it only because it drives the machine to crash. So my goal is to have a
central point to provide visibility on problems that can happen on any
machine on my network.
I already implemented Nagios for another project, but it is too heavy
and missing some functionalities, so I started my own project :
* on each machine, I'll have this Lua monitor that will send "reports"
to a central point (probably in PHP), using Soap/webservices
* this central point will be used also to monitor figures (cpu usage,
disk and memory trend, whatever ...)
* this central point will also expose problems thru another webservice :
I already build a Lua application that can read such webservice and
raise an alert is something changed using libnotify. I will have only
start it at my laptop bootup.
Anyone interested to join this project is welcome : it will be an
opensource.
Bye