[Icinga-devel] Icinga PHP library

Andreas Ericsson exon at op5.com
Fri May 8 08:18:57 CEST 2009


Hendrik Baecker wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> 
> Taylor Dondich schrieb:
>> It's important to note I think the Icinga team plans to use the PHP
>> library to interface with the NDOutils database model.  I believe it
>> only makes sense to use that as the data store, instead of referring
>> to the flat text status files.
>>
> I don't share your opinion. Yes, it's easier to ask a database for some
> data than parsing a flat file, but live isn't easy.
> If we would force the users to install a database, database drivers for
> the idotuils it were a huge overhead for small up to middle environments.
> The API we are just working on, should solve the headache between
> visualisation (what the user want's to see) and the complex datasource.
> 
> Joining the different idoutils tables is some kind of p.i.t.a.

Which is why you shouldn't have used the NDOUtils database layout :-/

> - but the
> work should be only done once. Resulting in s.th. like:
> 
> $this->IcingaApi(get_host_status("critical));
> 
> and result always in the same kind of values without thinking of where
> the data comes from.
> 

This kind of oversimplification will lead to headaches, I think. I'd
do:
find_host_info(array $params, $match_any = false)

instead, resulting in a query which returns all hosts where all the
criteria match by default, or where any criteria match if $match_any
is set to true.

Note that status selection and such should almost certainly be done
by bitmask fields, or you'll make it impossible to get the status of
all hosts that are non-ok without making several queries.

>> So, if you've got some PHP or Python database experience, why wait?
>> First get your hands wet using ndoutils.  Then you'll see all your
>> status/config data in there.
>>
> Don't get it too wet at the moment. There are two competent guys on it
> to write some code in that way that we imagine how it might be usefull.
> After that first design implementations we would be happy to stand our
> man for public criticism.
> 

Please, pretty please, release it asap. The "just you wait and see!"
didn't work too well for Ethan, so what makes you think it should work
for you?

/Andreas




More information about the icinga-devel mailing list