----- "Frank Ch. Eigler" <fche@xxxxxxxxxx> wrote:
> Hi -
> could suck data out of a PCP installation and present it in glorious
> HTML. This should include normal metric access as well as the new
> event stuff from 3.5.0. The key missing link right now seems to be a
> web-accessible interface. (nathans' json-pcp work, to the extent I
> understand it, is not directly responsive to this need.)
Yes, not directly ... there was some hand-waving involved around the
lines of an apache plugin to do the http side of things and hand off
work to pmproxy, but didn't get that far.
Definitely agree this is a missing piece of the puzzle still, would
love to see something (small & fast) in this space.
> The smallest new piece of code that seems to accomplish the need
> be a mini http server that speaks a xmlrpc-ish version of the PMAPI.
> It'd be like a pminfo-over-http. One extension would be that a
> pcp client connection would be reused for the duration of a web
> "session", consisting of many independent xmlrpc calls.
> As for implementation details, something like libmicrohttpd  for
> the protocol level stuff; or perhaps XML-RPC  and its abyss http
> code for http server side support; plain vanilla LGPL C code for the
> glue between that and PMAPI.
> Does this sound sensible?
>From the json pmproxy translator experiment, I'd say we can learn:
- fair bit of work involved in translating every PCP PDU, this is
- the connection statefulness (or lack thereof) is a problem - I'd
tried to have no new state in pmproxy, but it falls down in some
places, like on profile+fetch PDUs IIRC.
socket connection open, so some form of session state must be kept
there in the end and not clear whether the connection to pmcd can
be dropped and reestablished without extra state on the server.