# Can I tune the Icinga API eventstream? - it is "bursty"

**URL:** <https://community.icinga.com/t/can-i-tune-the-icinga-api-eventstream-it-is-bursty/12511>\
**Category:** Visualization, Metrics & Reporting\
**Created:** [August 25, 2023, 7:08am UTC](https://community.icinga.com/t/can-i-tune-the-icinga-api-eventstream-it-is-bursty/12511 "2023-08-25T07:08:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![s2156945](https://community.icinga.com/user_avatar/community.icinga.com/s2156945/32/7041_2.png) [@s2156945](https://community.icinga.com/u/s2156945)\
**Post date:** [August 25, 2023, 7:08am UTC](https://community.icinga.com/t/can-i-tune-the-icinga-api-eventstream-it-is-bursty/12511/1 "2023-08-25T07:08:40Z")

</div>

Hi,

we are successfully using the icinga2 API eventstream for dashboarding. In testing we made a “clock” check which ran every second. When we put it on the dashboard it only updated every 5 seconds or so.  
Looking into the mechanics we found that the eventstream only woke up every 5 seconds or so, can we change this to something quicker, e.g. every half second?

cheers,  
Woody

---

<div class="post-metadata">

**Author:** ![Al2Klimov](https://community.icinga.com/user_avatar/community.icinga.com/al2klimov/32/959_2.png) [@Al2Klimov](https://community.icinga.com/u/Al2Klimov)\
**Post date:** [August 29, 2023, 3:16pm UTC](https://community.icinga.com/t/can-i-tune-the-icinga-api-eventstream-it-is-bursty/12511/2 "2023-08-29T15:16:13Z")

</div>

Hello Woody!

You mean: The stream actually yielded mathematically speaking 1 event/s, but only every 5s, so 5/5s?

Best,  
A/K

---

<div class="post-metadata">

**Author:** ![s2156945](https://community.icinga.com/user_avatar/community.icinga.com/s2156945/32/7041_2.png) [@s2156945](https://community.icinga.com/u/s2156945)\
**Post date:** [August 30, 2023, 6:46am UTC](https://community.icinga.com/t/can-i-tune-the-icinga-api-eventstream-it-is-bursty/12511/3 "2023-08-30T06:46:55Z")

</div>

Thanks AK,

This was a busy server, I didn’t confirm that events were dropped or not, I suspect not, I think the “clock” just updated like:

10:00  
…… (no change for a few seconds)  
10:01,2,3,4,5

Similarly if you just curl the event stream and eyeball it, you see a repeated gaps of 5 seconds

(below perl code is just timestamping each line and printing it, uniq -c is counting the number of messages stamped with that timestamp)

You can see a gap of 5 seconds between times - I have just typed in “5 second gap” below to highlight where.

cheers,  
Woody

```auto
woody@willie:~$ curl -ksu $AUTH -H accept:application/json -X POST https://localhost:5665/v1/events -d '{ "queue": "woody", "types": ["CheckResult"] }' | perl -MTime::HiRes -nle'$t = Time::HiRes::time; print sprintf "%0.1f : %s", $t, $_' | cut -d : -f 1 | uniq -c 
     10 1693377562.7 
      3 1693377562.8 
      4 1693377562.9 
      4 1693377563.0 
      8 1693377563.1 
      8 1693377563.2 
     12 1693377563.4
--- 5 second gap ---
    314 1693377568.4 
      4 1693377568.5 
     10 1693377568.6 
      9 1693377568.7 
      4 1693377568.8 
      5 1693377568.9 
     15 1693377569.0 
--- 5 second gap ---
    148 1693377574.0 
    182 1693377574.1 
      2 1693377574.2 
      3 1693377574.3 
      8 1693377574.4 
      8 1693377574.6 
      3 1693377574.7 
      7 1693377575.0 
--- 5 second gap ---
    387 1693377580.0 
      5 1693377580.1 
      9 1693377580.3 
      6 1693377580.4 
      6 1693377580.5 
      9 1693377580.6 
      2 1693377580.7 
      3 1693377580.8 
      8 1693377580.9 
      6 1693377581.0 
     13 1693377581.1 
      8 1693377581.2 
      7 1693377581.3 
      3 1693377581.4 
      3 1693377581.5 
      3 1693377581.6 
      5 1693377581.7 
      8 1693377581.8 
      4 1693377581.9 
--- 5 second gap ---
     65 1693377586.9 
^C
woody@willie:~$

```

---

<div class="post-metadata">

**Author:** ![Al2Klimov](https://community.icinga.com/user_avatar/community.icinga.com/al2klimov/32/959_2.png) [@Al2Klimov](https://community.icinga.com/u/Al2Klimov)\
**Post date:** [August 30, 2023, 8:47am UTC](https://community.icinga.com/t/can-i-tune-the-icinga-api-eventstream-it-is-bursty/12511/4 "2023-08-30T08:47:46Z")

</div>

What’s your Icinga version?

---

<div class="post-metadata">

**Author:** ![matthew.smith](https://community.icinga.com/letter_avatar_proxy/v4/letter/m/7cd45c/32.png) [@matthew.smith](https://community.icinga.com/u/matthew.smith)\
**Post date:** [September 1, 2023, 4:43am UTC](https://community.icinga.com/t/can-i-tune-the-icinga-api-eventstream-it-is-bursty/12511/5 "2023-09-01T04:43:21Z")

</div>

Hi AK,

That instance is currently running r2.14.0-1, it currently has around 2000 hosts and 6000 services with check frequency typically between 2-5 minutes.

> :~# icinga2 --version  
> icinga2 - The Icinga 2 network monitoring daemon (version: r2.14.0-1)
> 
> Copyright (c) 2012-2023 Icinga GmbH ([https://icinga.com/](https://icinga.com/))  
> License GPLv2+: GNU GPL version 2 or later [https://gnu.org/licenses/gpl2.html](https://gnu.org/licenses/gpl2.html)  
> This is free software: you are free to change and redistribute it.  
> There is NO WARRANTY, to the extent permitted by law.
> 
> System information:  
> Platform: Debian GNU/Linux  
> Platform version: 11 (bullseye)  
> Kernel: Linux  
> Kernel version: 5.10.0-23-amd64  
> Architecture: x86\_64
> 
> Build information:  
> Compiler: GNU 10.2.1  
> Build host: runner-hh8q3bz2-project-575-concurrent-0  
> OpenSSL version: OpenSSL 1.1.1n 15 Mar 2022

Thanks,  
Matt

---

<div class="post-metadata">

**Author:** ![s2156945](https://community.icinga.com/user_avatar/community.icinga.com/s2156945/32/7041_2.png) [@s2156945](https://community.icinga.com/u/s2156945)\
**Post date:** [October 3, 2023, 12:13am UTC](https://community.icinga.com/t/can-i-tune-the-icinga-api-eventstream-it-is-bursty/12511/6 "2023-10-03T00:13:10Z")

</div>

r2.14.0-1 as Matt said
