-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugins #1126
Plugins #1126
Conversation
ec2f8dc
to
f1e935b
Compare
@davkal should we display in the UI which plugins are enabled? what would be a good way of displaying this? |
Yes, let's place it in the bottom left for now, because
Some thing like:
The DS could be as simple as |
In order to get more/better data from the sysdig probe the best plan seems to be using the "chisel" system, which are a bunch of lua scripts sysdig can run. We could just capture the event stream, but that will likely lead to a lot of unneeded serialization/deserialization. We could either write individual chisels for bits they have, and plumb them through, or we could look into writing one generic meta-chisel which would let us dynamically grab bits and do queries. We could either implement the entire plugin in lua (probably? There seems to be a jsonrpc library for lua), or we could do the barebones filtering/querying in the lua chisel, and drive that from a go plugin. I've included a Some other things we could potentially get from the sysdig probe:
|
e145ca2
to
f485f2e
Compare
Version: Version, | ||
Hostname: hostname.Get(), | ||
}) | ||
func apiHandler(rep Reporter) func(context.Context, http.ResponseWriter, *http.Request) { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
First quick pass says its looking good. I'm thinking |
I'm not so sure on that yet. I tried it moving it into I had a vague eye to keeping the plugin registry and lifecycle-management code separate so it could be extracted into a separate library at some point. Will see about refactoring it as it goes. |
This is what I'd do - see controls; common stuff goes in common/xfer or report, probe specific stuff in probe and app specific stuff in app. Whilst I don't feel particularly strongly about this, it would be nice if this was consistent across the whole code base, where 'vertical' features are split up like this. It used to make a difference on build times, but now we just build on big binary. |
9c51e0c
to
0a49f7c
Compare
b65c2ef
to
87f008e
Compare
7c22443
to
90fb733
Compare
|
||
// Registry maintains a list of available plugins by name. | ||
type Registry struct { | ||
root string |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Raised separate issue for indicating broken plugins in the UI. |
'api_version': '1', | ||
} | ||
self.respond(json.dumps(spec)) | ||
|
||
def respond(self, body): |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
LGTM, (I would like to have #1271 for the release though) |
Squash of: * Include plugins in the report * show plugin list in the UI * moving metric and metadata templates into the probe reports * update js for prime -> priority * added retry to plugin handshake * added iowait plugin * review feedback * plugin documentation
* It sends unexpected TCP RSTs (causing connection reset by peer errors in the python plugin) Exception happened during processing of request from Traceback (most recent call last): File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock self.process_request(request, client_address) File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request self.finish_request(request, client_address) File "./http-requests.py", line 145, in finish_request self.RequestHandlerClass(request, '-', self) File "/usr/lib/python2.7/SocketServer.py", line 658, in __init__ self.handle() File "/usr/lib/python2.7/BaseHTTPServer.py", line 349, in handle self.handle_one_request() File "/usr/lib/python2.7/BaseHTTPServer.py", line 312, in handle_one_request self.raw_requestline = self.rfile.readline(65537) File "/usr/lib/python2.7/socket.py", line 480, in readline data = self._sock.recv(self._rbufsize) error: [Errno 104] Connection reset by peer * It doesn't reuse connections
|
||
```json | ||
{ | ||
"Processes: { ... } |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Awesome job @paulbellamy! \o/ |
Should this PR fix also #1022? |
@alepuccetti I think you are referring to #1837 , not this PR |
Fixes #554
Commits are still super-messy, and tests are earmarked, as this is both a work-in-progress and a proof-of-concept.
HTTP Request latency is shown on the weavescope node (we can correlate it due to weavescope being in the host network).
Plugin registry turned out very similar to #809.
TODO:
get better data from sysdig pluginreplace example plugin with something elsePushed eBPF plugin into a separate PR.consider an async "plugin-push" interface instead of probe polling.Considered it. Delaying to a future "api version"/report
, then parse the pluginspec from that.