Support JSON formatted server statistics: op=stats&options=json

Bug #1105592 reported by Casey Marshall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hockeypuck
Fix Released
High
Casey Marshall

Bug Description

Hockeypuck's status page contains most of the info needed for SKS statistics aggregators, but the HTML is different. It would be better to provide this data in JSON format.

{
  "hostname" : "",
  "server_contact" : "",
  "recon_port" : "",
  "numkeys" : "",
  "software" : "",
  "version" : "",
  "peers" : [ "", "", "" # repeats for each peer hostname
  ]
#For completeness, we could add (allow for):
  "mailsync_peers" : [ "", "", "" # repeats for each peer email address
  ],
   "stats_by_day" : [
    {
          "time" : "",
          "new_keys: : "",
          "updated_keys": ""
        } # Object repeats for each row of table
  ],
  "stats_by_hour" : [
    {
          "time" : "",
          "new_keys: : "",
          "updated_keys": ""
        } # Object repeats for each row of table
   ]
}

nodename, http_port and debug_level should also be provided to support https://github.com/syscomet/sks_spider.

This will be returned when options=json is specified in the request.

Revision history for this message
John Clizbe (i-john) wrote :

Casey,

I'm still hashing this out in the SKS code, hopefully I'll have a finished data map RealSoonNow­®.

If options=json is specified and not yet supported, SKS will ignore the option and return the HTML stats page.
The two are easily differentiated by Content-Type header, "application/json" vs "text/html"

Casey Marshall (cmars)
Changed in hockeypuck:
assignee: nobody → Casey Marshall (cmars)
milestone: backlog → 0.8.2
status: Triaged → In Progress
Casey Marshall (cmars)
Changed in hockeypuck:
status: In Progress → Fix Committed
Casey Marshall (cmars)
Changed in hockeypuck:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.