Nagios checks fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Squid Reverse Proxy Charm |
New
|
Undecided
|
Unassigned |
Bug Description
Using cs:squid-
# check squidpeers
command[
Running this commands gives:
ubuntu@
Traceback (most recent call last):
File "/usr/lib/
sys.
File "/usr/lib/
retcode, message = get_status(peers, args.weight)
File "/usr/lib/
perc = calculate_
File "/usr/lib/
return ((reduce(iadd, [1. for i in peers if i['status'] == STATUS_UP]))
TypeError: reduce() of empty sequence with no initial value
Related branches
- Stuart Bishop (community): Approve
-
Diff: 13 lines (+3/-0)1 file modifiedfiles/check_squidpeers (+3/-0)
The linked branch fixes the crash but still makes the check fail when there are no peers. This is problematic in some use cases, e.g. where mojo is deploying base infrastructure like squid first, verifying it's all working, then relating app services, meaning that during the first verify there are legitimately no peers.