January 2019
Intermediate to advanced
798 pages
20h 33m
English
With the service items and triggers we wrote, the triggers would fire right away, as soon as the service was detected as being down. This can be undesirable if we know that a service will be down for a moment during an upgrade because of log rotation or backup requirements. We can use a different function to achieve a delayed reaction in such cases. Replacing the last() function with max() allows us to specify a parameter, and thus react only when the item values have indicated a problem for some time. For the trigger to fire only when a service has not responded for 5 minutes, we could use an expression such as this:
{A test host:net.tcp.service[ssh].max(300)}=0
Read now
Unlock full access