Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#12803 closed enhancement (implemented)

BridgeDB needs Nagios checks for the HTTPS Distributor

Reported by: isis Owned by: isis
Priority: High Milestone:
Component: Circumvention/BridgeDB Version:
Severity: Keywords: bridgedb-https, nagios
Cc: isis, sysrqb, dawuud, Lunar, weasel Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

BridgeDB needs to check that the distributor at https://bridges.torproject.org is reachable, i.e. that it responds HTTP 200 and the page actually renders, as opposed to the 503/504 errors it gives out when it is parsing descriptors for long periods of time.

Child Tickets

Change History (3)

comment:1 Changed 5 years ago by dawuud

We can easily use check_http to do this:

amnesia@amnesia:~$ sudo apt-get install nagios-plugins
...
amnesia@amnesia:~$ usewithtor /usr/lib/nagios/plugins/check_http -H bridges.torproject.org --ssl=3
HTTP OK: HTTP/1.1 200 OK - 4098 bytes in 2.560 second response time |time=2.559883s;;;0.000000 size=4098B;;;0
amnesia@amnesia:~$ usewithtor /usr/lib/nagios/plugins/check_http -H bridges.torproject.org --ssl=3 --string=yoyo
HTTP CRITICAL: HTTP/1.1 200 OK - string 'yoyo' not found on 'https://bridges.torproject.org:443/' - 4098 bytes in 4.560 second response time |time=4.559573s;;;0.000000 size=4098B;;;0
amnesia@amnesia:~$ usewithtor /usr/lib/nagios/plugins/check_http -H bridges.torproject.org --ssl=3 --string=bridges
HTTP OK: HTTP/1.1 200 OK - 4098 bytes in 2.571 second response time |time=2.570934s;;;0.000000 size=4098B;;;0
amnesia@amnesia:~$ 

The person with admin access to your icinga server will have to add a few lines to it's configuration...
specifying the service check schedule, hostgroup/servicegroup etc.

comment:2 Changed 5 years ago by isis

Cc: weasel added
Status: newneeds_review

Super! Sounds easy enough.

I'm CC'ing weasel. Weasel, could you please pretty please enable for the bridges service on ponticum some suitable version of /usr/lib/nagios/plugins/check_http -H bridges.torproject.org --string=bridges?

comment:3 Changed 5 years ago by isis

Resolution: implemented
Status: needs_reviewclosed

This is fixed.

07:35  weasel ) /usr/lib/nagios/plugins/check_http -H bridges.torproject.org
                -S --sni --string=bridge
07:35  weasel ) so that?
07:37  weasel ) what does it do when it's down?
07:39   @isis ) weasel: that check doesn't work, which we discussed earlier
                in this channel, because if it was expecting 200 OK there
                is like 30s/30m that it wouldn't get it
07:41  weasel ) I don't understand.  what would the check not get?
07:43  weasel ) this check seems to return "OK" right now.
07:43  weasel ) and when run regularly, will get OK most (if not even all)
                of the time unless the service actually crashed.
07:43  weasel ) is this not what we want?
07:44   @isis ) that works okay by me
07:44   @isis ) how often do you mean by 'regularly'?
07:44   @isis ) every 1m?
07:45  weasel ) more like every 5 or 10
07:47  weasel ) aha.  seems our default check interval is 15.  retry check
                interval is 2
07:47   @isis ) :)
07:47   @isis ) great!
Last edited 5 years ago by isis (previous) (diff)
Note: See TracTickets for help on using tickets.