adrianco / spigo

Simulate Protocol Interactions in Go
Apache License 2.0
1.12k stars 111 forks source link

Generate simulated data for weaveworks scope #23

Open adrianco opened 9 years ago

adrianco commented 9 years ago

Need to map the spigo/names package into IP addresses (using AWS IP ranges?) then it should be possible to generate a stream of reports into scope to simulate a container network.

See below for example structure generated by the scope probe https://github.com/weaveworks/scope/blob/master/app/mock_reporter_test.go

adrianco commented 9 years ago

Helpful response from Peter Bourgon copied from email: "Nice! If you were so inclined, implementing TCPPublisher[0] would allow Spigo to be treated the same as a regular probe, and its simulations incorporated into the Scope UI with no additional changes."

[0] https://sourcegraph.com/github.com/weaveworks/scope@master/.tree/xfer/publisher.go#selected=11

adrianco commented 9 years ago

Started work on adding IP metadata using Eureka to maintain it and Archaius to configure it.

hubayirp commented 9 years ago

Nice! On Fri, May 22, 2015 at 8:13 AM Adrian Cockcroft notifications@github.com wrote:

Helpful response from Peter Bourgon copied from email: "Nice! If you were so inclined, implementing TCPPublisher[0] would allow Spigo to be treated the same as a regular probe, and its simulations incorporated into the Scope UI with no additional changes."

[0] https://sourcegraph.com/github.com/weaveworks/scope@master/.tree/xfer/publisher.go#selected=11

— Reply to this email directly or view it on GitHub https://github.com/adrianco/spigo/issues/23#issuecomment-104685569.

adrianco commented 9 years ago

First step, just added code to generate IP addresses, each zone has its own /16 network using AWS ranges. Currently only generated when writing metadata to record each node, but easy to include in a metrics writer interface with dhcp.Lookup(name)

{"node":"netflixoss.us-east-1.zoneA.cassSubscriber.priamCassandra.cassSubscriber0","package":"priamCassandra","timestamp":"2015-06-17T14:57:33.974773558-07:00","metadata":"IP/54.198.0.1"},