Commit Graph

59 Commits

Author SHA1 Message Date
Julius Volz
4fa40e22b2 Rework Scope metrics according to Prometheus conventions. (#1615)
* Rework Scope metrics according to Prometheus conventions.

- counters should end with _total
- elaborated and added units to help strings
- recommended for cache hit/miss metrics: track only the total and the
  hits and in separate metrics, since the most common query will be
  "hits / total"
- track all times in seconds (base units), which has become the standard
  recommendation
- other small changes

There could be more changes that would require more thinking (what
dimensions to use, summaries vs. histograms, etc.), but this is probably
enough controversial material already :)

* Use timeRequestStatus() in sqs_control_router.go.
2016-06-30 09:12:25 +01:00
Tom Wilkie
8f772a696d Add flag to disable reporting of processes (and procspied endpoints) 2016-05-17 17:29:09 +01:00
Alfonso Acosta
b1836acb62 Only add DNAT'ed addresses for short-lived connections 2016-05-04 14:48:48 +00:00
Alfonso Acosta
1f825c52ff Correctly attribute DNAT-ed short-lived connections 2016-05-04 14:48:47 +00:00
Tom Wilkie
0a51064713 Use reverse-resolved DNS info in the connections table. 2016-04-20 17:18:32 +01:00
Paul Bellamy
1edeb8d190 Removing report.Node.WithID (#1315)
* removing usage of report.Node.WithID

* report.Topology.AddNode can use the node's ID field
2016-04-19 16:48:03 +01:00
Tom Wilkie
e7c5fc7016 Remove address topology 2016-03-08 13:23:30 +00:00
Paul Bellamy
6cef1b10ca adding direction to connections from conntrack
* Remove report.EdgeMetadata.MaxConnCountTCP, as we don't display it anywhere
* Remove hostname metadata from local end of connection. We should be using the hostnodeid
2016-02-23 14:17:45 +00:00
Alfonso Acosta
6240187333 Fix tests 2016-02-08 13:42:54 +00:00
Alfonso Acosta
d4c68f48fa Get rid of the package-level Connections func 2016-02-08 13:42:53 +00:00
Alfonso Acosta
f922ea19c8 Rate-limit reading proc files
Use a reader in the background, dynamically rate-limited, reading the required
files in a loop
2016-02-08 13:42:52 +00:00
Tom Wilkie
6b56475766 Use ps.Map for Counters and Sets, remove Metadata in favour of Latest.
Also
- Add more complicated report.json for benchmark
- Break up report/topology.go
- Implement our own DeepEqual for ps.Map
2016-01-22 15:10:32 -08:00
Tom Wilkie
e15fe2b747 Use caching proc walker in procspy. 2015-12-10 14:00:42 +00:00
Tom Wilkie
b94751ac10 Move procspy out of vendor into probe/endpoint. 2015-12-09 11:06:04 +00:00
Tom Wilkie
9142325d54 Instruments probe runtime to find slow reporter. 2015-11-12 17:01:52 +00:00
Alvaro Saurin
bc972a52ab Resolve to a group of names (instead of taking only the first one) 2015-11-09 13:45:02 +01:00
Tom Wilkie
07af26e05b Review feedback 2015-10-27 11:39:38 +00:00
Tom Wilkie
a3c53aadf5 No more nil flow workers 2015-10-27 10:53:23 +00:00
Peter Bourgon
cb40ad3a90 Continued un-exporting of symbols; renames
- Unexport consts, types, vars, etc.
- Rename Conntracker (interface) to FlowWalker, to match its definition.
- Rename conntracker (type) to conntrackWalker, to match the interface.
- Move conntrack_test.go to conntrack_internal_test.go and package endpoint
2015-10-27 10:40:09 +00:00
Peter Bourgon
6ae5077515 Un-export NATMapper
Lots of TODOs to clean up...
2015-10-27 10:38:22 +00:00
Peter Bourgon
36ce1089f4 Don't export reverseResolver
It's only used within package endpoint, so it shouldn't be exported.
That means resolver_test becomes resolver_internal_test, and with the
previous change to the fixture, we can avoid the dot-import.

Also, update method names to reflect it's an unexported type.
2015-10-27 10:38:19 +00:00
Peter Bourgon
65a7547415 Intermediate stage fix 2015-10-27 10:36:53 +00:00
Peter Bourgon
32a57e63db probe/endpoint: NATMapper missed an edge case
NATMapper can be created with a nil Conntracker if
ConntrackerModulePresent is false, e.g. on Darwin.
Check for that in ApplyNAT.
2015-10-27 10:36:52 +00:00
Tom Wilkie
e2dfcb1def Review feedback 2015-09-24 03:07:20 +00:00
Tom Wilkie
7da599194d Test the nat mapper. 2015-09-23 11:01:29 +00:00
Tom Wilkie
f9815afad3 Remove some duplicate functionality, add some basic tests. 2015-09-23 09:46:11 +00:00
Tom Wilkie
fcb7c47bd9 Always include endpoint nodes brought in by procspy, even if they get merged with conntracked endpoints. 2015-09-16 03:46:15 +00:00
Tom Wilkie
b7598c376e Don't show shortlived connections in the host view. 2015-09-15 10:03:04 +00:00
Tom Wilkie
89b5a8d432 We don't know which end is local for shortlived connections, so don't tag any with the hostid. 2015-09-15 10:03:03 +00:00
Tom Wilkie
766d8772d7 Do a conntrack -L before -E to capture existing connections and NAT mappings. 2015-09-15 10:02:59 +00:00
Tom Wilkie
7d6b5a540e Revert "Merge pull request #450 from weaveworks/scope-284"
This reverts commit 46345e3bdb, reversing
changes made to bf3e9a1601.

Conflicts:
	probe/process/walker_darwin.go
2015-09-15 03:14:39 +00:00
Alvaro Saurin
2f9f54688f Keep a cache of open files, reducing the number of open/close cycles in the /proc dir 2015-09-14 10:59:23 +02:00
Alvaro Saurin
14dc6a5391 Cache processes and connections when reading from the /proc
Code cleanups
2015-09-14 10:53:24 +02:00
Alvaro Saurin
4331fb1c79 Drop all the dependencies we had on procspy by moving some code to probe. 2015-09-14 10:44:53 +02:00
Tom Wilkie
d411afd916 WithNode is a CPU hog. 2015-09-09 15:01:57 +00:00
Tom Wilkie
4da819b18c Merge pull request #449 from weaveworks/447-short-lived-in-apps
Prevent short lived connections appearing as pseudo nodes in the applications view.
2015-09-07 11:32:38 +01:00
Peter Bourgon
7513b4e396 Wrap comments at 80col throughout the fileset 2015-09-07 10:36:35 +02:00
Tom Wilkie
85bfcddb3f Prevent short lived connections appearing as pseudo nodes in the applications view. 2015-09-06 16:26:57 +00:00
Tom Wilkie
ad6702a196 Some review feedback. 2015-09-05 19:39:22 +00:00
Alvaro Saurin
15e25edc40 New asynchronous, caching DNS resolver for reverse resolutions
Add nodes for the remote side of connections iff we have a DNS reverse resolution for the IP.
Unit test for the resolver
2015-09-04 17:21:45 +02:00
Tom Wilkie
57f7b4f2e6 Rename NodeMetadata -> Node 2015-09-03 16:18:54 +00:00
Tom Wilkie
144a798602 Review Feedback 2015-09-02 14:32:47 +00:00
Tom Wilkie
afc2788777 Move EdgeMetadata into the NodeMetadata struct. 2015-09-02 14:32:44 +00:00
Tom Wilkie
899e2d7a5c Review feedback 2015-09-01 11:01:25 +00:00
Tom Wilkie
1f6b3d4a45 Move Adjacency info inside the NodeMetadata struct; move pseudo node generation to the probes. 2015-08-28 15:20:27 +00:00
Tom Wilkie
1a286eac04 Use an exec'd conntrack in 'events' mode instead of repeatedly execing it for NAT mappings. Also use conntrack to populate the endpoint table. 2015-08-27 16:29:33 +00:00
Tom Wilkie
7ca9dd32e6 Revert "Also use conntrack to populate the endpoint topology."
This reverts commit f89044a381.
2015-08-21 14:55:39 +00:00
Tom Wilkie
f89044a381 Also use conntrack to populate the endpoint topology. 2015-08-21 13:51:00 +00:00
Tom Wilkie
6f1f453098 Review feedback 2015-08-19 12:22:28 +00:00
Tom Wilkie
89df11bbfd Make edge direction flow from client->server. 2015-08-19 10:17:24 +00:00