Hello,
Zabbix v6.0.21 on Ubuntu 22.04
I have a template (linked to 30 hosts) with an "HTTP Agent" item daily requesting an URL from a public website. I need all that 30 checks to be spread on several hours, because the website have a quota of 10 requests per hour max.
If I set the "Update interval" to "1d", all 30 checks are done almost at the same time (only a few minutes apart), and the website will therefore allow 10 firsts, and drop 20 others!
I tried to set "Update interval" to a macro defined in the template, `{$RANDOM_DELAY}`. I tried all these values: `{24*3600 + rand(0, 6*3600)}` (hoping it would limit the random range from 0 to 6*3600), `{24*3600 + rand()}` and even `{rand()}`, but all got "Invalid update interval".
I also hoped to use Preprocessing JavaScript, but preprocessing is executed *after* data gathering, so it cannot help me.
So I have two questions:
1. Is there a way to delay data gathering at the item definition?
2. Optionally, is there no way to limit rand() returned range? (like PHP's rand())
Thanks for any idea!
Zabbix v6.0.21 on Ubuntu 22.04
I have a template (linked to 30 hosts) with an "HTTP Agent" item daily requesting an URL from a public website. I need all that 30 checks to be spread on several hours, because the website have a quota of 10 requests per hour max.
If I set the "Update interval" to "1d", all 30 checks are done almost at the same time (only a few minutes apart), and the website will therefore allow 10 firsts, and drop 20 others!
I tried to set "Update interval" to a macro defined in the template, `{$RANDOM_DELAY}`. I tried all these values: `{24*3600 + rand(0, 6*3600)}` (hoping it would limit the random range from 0 to 6*3600), `{24*3600 + rand()}` and even `{rand()}`, but all got "Invalid update interval".
I also hoped to use Preprocessing JavaScript, but preprocessing is executed *after* data gathering, so it cannot help me.
So I have two questions:
1. Is there a way to delay data gathering at the item definition?
2. Optionally, is there no way to limit rand() returned range? (like PHP's rand())
Thanks for any idea!