Let’s continue our series about the improvements that are coming in Zabbix 2.2. We already examined one web monitoring improvement – ability to template it. But there’s more – in 2.2 you will be able to specify how many times a web scenario should be retried.
Articles in 2.2 feature series:
- Part 1 – Automatic database upgrading
- Part 2 – Templated web monitoring
- Part 3 – Web scenario retries
- Part 4 – HTTP proxy for web monitoring
- Part 5 – Better value mapping
- Part 6 – Returning values from webpages
- Part 7 – Value extracting from logfiles and more
- Part 8 – Reusing content in web monitoring
- Part 9 – No more full page reload in latest data
- Part 10 – Support of loadable modules
- Part 11 – SNMP monitoring improvements
Previously, a web scenario would be attempted once only. Webpages are strange beasts – they sometimes do fail to work for various reasons. It might be one in a thousand requests, which wouldn’t be a huge issue… but if it’s your monitoring request, that’s alerting and all that. In most cases users would want to be notified of the first failure, but quite often they will complain when that actually happens…
In this case it would be helpful to tell Zabbix “if it fails, try pressing F5“. With the new Retries parameter this is easy. By default the retry count is one, so Zabbix will act the same as before. Setting it to 3 will make it try to load the webpage a couple more times immediately, if the first attempt fails. note that retries are per step, so a scenario with 3 steps and retries set to 3 might try first step twice and second step three times (assuming first step eventually succeeded).
On the other hand if we get a 404 error, or page contents do not match the required string, refreshing the page probably won’t help – so Zabbix won’t retry in such cases, only connection errors, timeouts and similar problems will trigger further attempts. One may configure up to 10 retries.
While there isn’t that much more to this small feature, you may still want to read the specification.