[omd-users] writing a time series check

Mathias Kettner mk at mathias-kettner.de
Tue Jun 7 10:52:41 CEST 2011


Hi James,

accessing RRDs from checks is really a bad idea. The RRD might not be on 
the same host. When using RRD cache the RRD might not been written
to disk. And so on.

But Check_MK already has a solution for this: get_counter(). Check_MK 
has its own store of previous value. Please note, that *many* of 
Check_MK's checks are based on counters. For an example please have
a look at the "kernel" checks.

We even have a documentation!!

http://mathias-kettner.de/checkmk_devel_counters.html

Mathias


Am 07.06.2011 09:51, schrieb James Todd:
> Hey Mathias -
>
>    Based on a bit of searching, I believe what I am looking for is to execute an rrdtool.fetch(...) operation from within a check, passing along the correct rrd path.
>
>    In searching through the default checks (as deployed via omd) i don't see any uses of rrd* from within the check scripts.
>
>    Am I on the right path here? wrong path? regardless, I could use a pointer on how best retrieve historic data from within a check in order to perform a time-series
>    calculation.
>
>    thx in advance,
>
> - james
>
> On Jun 6, 2011, at 12:26 AM, Mathias Kettner wrote:
>
>> Hi James,
>>
>> please have a look at this:
>>
>> http://mathias-kettner.de/checkmk_writing_checks.html
>>
>> Am 05.06.2011 21:01, schrieb James Todd:
>>>
>>> hi -
>>>
>>>    i am new to omd/check_mk/nagios/python. i have the basics up and running and am collecting data from our application nodes. what i would like to now do is perform a time-series check and as such could use a pointer.
>>>
>>>    i am not sure "time series" check is the correct terminology so let me describe what i would like to achieve at a bit of a higher level, specifically:
>>>
>>>      for a given check "a"
>>>      when this check is performed, i would like to retrieve previously captured values and perform a calculation against the set
>>>
>>>      eg: check if we counter-x has not increased more then y% over the last 30 minutes then return critical
>>>
>>>    i assume this is done via accessing the rrd data. i will continue to dig in and research but at the same token i very much appreciate more directed help those on this list can offer.
>>>
>>>    thx in advance,
>>>
>>> - james
>>> _______________________________________________
>>> omd-users mailing list
>>> omd-users at lists.mathias-kettner.de
>>> http://lists.mathias-kettner.de/mailman/listinfo/omd-users
>>
>>
>> --
>> Mathias Kettner GmbH
>> Registergericht: Amtsgericht München,  HRB 165902
>> Firmensitz:      Preysingstraße 74, 81667 München
>> Geschäftsführer: Mathias Kettner
>>
>> Tel. 089 / 1890 4210
>> Fax  089 / 1890 4211
>> http://mathias-kettner.de
>> _______________________________________________
>> omd-users mailing list
>> omd-users at lists.mathias-kettner.de
>> http://lists.mathias-kettner.de/mailman/listinfo/omd-users
>
> _______________________________________________
> omd-users mailing list
> omd-users at lists.mathias-kettner.de
> http://lists.mathias-kettner.de/mailman/listinfo/omd-users


-- 
Mathias Kettner GmbH
Registergericht: Amtsgericht München,  HRB 165902
Firmensitz:      Preysingstraße 74, 81667 München
Geschäftsführer: Mathias Kettner

Tel. 089 / 1890 4210
Fax  089 / 1890 4211
http://mathias-kettner.de


More information about the omd-users mailing list