Background
As we have to proxy egress traffic from the internal networks to the Internet - a tinyproxy is used. It may be overloaded with requests is some cases and start degrading.
Administrators shall be aware of this and get a notification, similar to the node/filesystem/etc problems.
Approach
Extend vm-monitor to monitor tinyproxy stats
These statistics can be retrieved by requesting tinyproxy.stats URL with a cp-tinyproxy.default.svc.cluster.local proxy, e.g.:
Thresholds for each of the stats JSON attributes (none of them are mandatory, so we can monitor only open or open and refused)
Resend delay (in minutes). As this parameter may be monitored each minute - we don't want to spam admins so often. Let's backoff from resending notifications for the same parameter for a defined period of time. This information shall be kept in-memory, no need to use a DB or other persistent storage.
If any of the thresholds is reached - email shall be sent. The following information shall be included:
Background As we have to proxy egress traffic from the internal networks to the Internet - a
tinyproxy
is used. It may be overloaded with requests is some cases and start degrading. Administrators shall be aware of this and get a notification, similar to the node/filesystem/etc problems.Approach
vm-monitor
to monitortinyproxy
statstinyproxy.stats
URL with acp-tinyproxy.default.svc.cluster.local
proxy, e.g.:vm-monitor
run such a query every N minutes, with the following configuration options:tinyproxy.stats
)http://cp-tinyproxy.default.svc.cluster.local
)* * * * *
)open
oropen
andrefused
)open
)100
)50
)