Is there a something lilke an inverted flapping detection?

Hi there,

First of all, I have a cre-1.6.0p13 on a debian 10 system.

I’m using a self written local check that fires a CURL command, that returns the number of HL7-files waiting in the send queue. I am using a numeric threshold to define warns and crits.

For example:
grafik (32 Files waiting)

grafik (19 Files waiting)

Now I want to determine, if the queue is working or stuck. I would like to achieve this with something like an inverted flapping detection, that notifies me, if one of the service is stuck at a specific queue file count (e.g. the number does not increase or decrease) for a prolonged period of time (i .e. 15 minutes).

Is there a built-in tool that can check, if the local check output remains the same or varies over time?

Thanks in advance for your ideas! :v:

Christian

Hi @kaiserchrss,

i dont think there is any kind of option for that.
You need to check this in your local script. You could use a “cache”-file for checking, if the value is the same like last time.

Sincerely Kruzgoth

Hi again,

So I expanded my local check.
I created a 2 files for each channel to be monitored:

  • [CHANNELNAME.cache]
  • [CHANNELNAME.refresh]

I then set the script to write out the current filecount (variable “x”) in the channel queue to the corresponding .cache file
When the script runs again, it will read the .cache file’s content and imports it as variable “y”
These to variables are then compared and if they do not match or are both “0” then nothing the .refresh file gets overwritten. It they match (meaning: file count in queue stays the same) nothing happens.

Here I made an entry in the fileinfo.cfg /[…]/*.refresh and set the maximum file age in the WATO to 15 minutes.

Heres a part of my script:

And the file age checks look like this:

Now it’s working as intended.