[tahoe-dev] Fwd: [tor-relays] [ANNOUNCE] check_tor.py: a Nagios check for Tor relays
Oleksandr Drach
luckyredhot at gmail.com
Tue Feb 26 15:33:36 UTC 2013
Guys,
Both *curl* and *wget* works perfectly when querying node status with
"?t=json" argument - just tested on Ubuntu.
I can't see any reason to complicate *monitoring tools* with changing
headers while parameter is quite enough!
*Sincerely,
Oleksandr Drach,*
*e-mail: **luckyredhot at gmail.com* <luckyredhot at gmail.com>*.*
2013/2/26 Kevin Reid <kpreid at switchb.org>
> On Feb 26, 2013, at 5:38, kpneal at pobox.com wrote:
>
> > On Mon, Feb 25, 2013 at 08:29:48PM -0800, Peter Secor wrote:
> >> The WUI usually has a pretty good json representation of most screens,
> just tack on a query arg ?t=json to the WUI URL and see what you get. I
> used to use it a lot when running scripts to check node usage but it's also
> useful for scraping other node stats.
> >
> > The correct way to do this is to send an "Accept: application/json"
> header in the request. Don't change the url to specify the type of return
> data. The response should have the same mime type.
> >
> > This follows normal REST design patterns.
>
> While it is true that a server should always respect the Accept header,
> and that programmatic interactions should make use of it, I disagree that a
> URL parameter is *inappropriate to offer*; the URL parameter is highly
> useful for debugging/exploration, and from a REST+caps perspective can be
> seen as an alternate resource (facet) with fewer available representations.
>
> That is, the server should support *both* Accept and ?t=, and clients
> should prefer to use Accept (at least, they should prefer Accept over
> matching and modifying a URL they receive).
>
> --
> Kevin Reid <http://switchb.org/kpreid/>
>
> _______________________________________________
> tahoe-dev mailing list
> tahoe-dev at tahoe-lafs.org
> https://tahoe-lafs.org/cgi-bin/mailman/listinfo/tahoe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tahoe-lafs.org/pipermail/tahoe-dev/attachments/20130226/6fbbb947/attachment.html>
More information about the tahoe-dev
mailing list