1

I use Zabbix 3.4 and I am trying to configure Zabbix to send an alarm only after 4 attemps. This alarm checks if the HTTP server returns 200 code. I have tried to set up a Web Scenario, but in the Zabbix Docs they say this:

The number of attempts for executing web scenario steps. In case of network problems (timeout, no connectivity, etc) Zabbix can repeat executing a step several times. The figure set will equally affect each step of the scenario. Up to 10 attempts can be specified, default value is 1. Note: Zabbix will not repeat a step because of a wrong response code or the mismatch of a required string. This parameter is supported starting with Zabbix 2.2.

Richlv
  • 2,354
  • 1
  • 13
  • 18
ras212
  • 113
  • 6

1 Answers1

1

The quoted section is about retrying inside the web scenario. You will have to use trigger functions.

Checking the return code item, you can use in the expression count(#4,200)=0.

While this question is a bit different, the ultimate solution is the same as in https://stackoverflow.com/questions/43605281/how-to-teach-zabbix-to-be-smart-about-short-spikes-in-events .

Richlv
  • 2,354
  • 1
  • 13
  • 18
  • In the zabbix docummentation, says that #4 is for **number of seconds**, not for number of attempts – ras212 Jan 16 '19 at 12:43
  • It most likely does not state that - can you please quote the section which you interpret like that? – Richlv Jan 16 '19 at 15:30
  • count (sec|#num,,,) Number of values within the defined evaluation period. sec or #num - evaluation period in seconds or in latest collected values (preceded by a hash mark) pattern (optional) - required pattern – ras212 Jan 18 '19 at 10:38
  • Right, so it is the "period in seconds" normally (if it is just a number), or the number of the values (if "preceded by a hash mark") - that should match your requirement. – Richlv Jan 18 '19 at 19:23