Ultralight, security-first service mesh for Kubernetes. Main repo for Linkerd 2.x.
Go to file
Eliza Weisman 2f0ad66257
proxy: Add process stats to proxy metrics (on Linux) (#1128)
This branch adds process stats to the proxy's metrics, as described in
https://prometheus.io/docs/instrumenting/writing_clientlibs/#process-metrics.

In particular, it adds metrics for the process's total CPU time, number of 
open file descriptors and max file descriptors, virtual memory size, and 
resident set size.

This branch adds a dependency on the `procinfo` crate. Since this crate and the
syscalls it wraps are Linux-specific, these stats are only reported on Linux.
On other operating systems, they aren't reported.

Manual testing

Metrics scrape:
```
eliza@ares:~$ curl http://localhost:4191/metrics
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 0
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 19
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 1024
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 45252608
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 12132352
# HELP process_start_time_seconds Time that the process started (in seconds since the UNIX epoch)
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1529017536
```
Note that the `process_cpu_seconds_total` stat is 0 because I just launched this conduit instance and it's not seeing any load; it does go up after i sent a few requests to it.

Confirm RSS & virtual memory stats w/ `ps`, and get Conduit's pid so we can check the fd stats
(note that `ps` reports virt/rss in kb while Conduit's metrics reports them in bytes):
```
eliza@ares:~$ ps aux | grep conduit | grep -v grep
eliza    16766  0.0  0.0  44192 12956 pts/2    Sl+  16:05   0:00 target/debug/conduit-proxy
```

Count conduit process's open fds:
```
eliza@ares:~$ cd /proc/16766/fd
eliza@ares:/proc/16766/fd$ ls -l | wc -l
18
```

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-06-21 17:50:10 -07:00
.github Add a newline to dco.yml (#254) 2018-02-01 15:16:02 -08:00
bin Revert usage of parallel in docker-build (#1183) 2018-06-21 23:13:29 +01:00
cli Switch to multi-value --tls flag, add to inject (#1182) 2018-06-21 15:52:14 -07:00
controller Add probes and log termination policy for distributor (#1178) 2018-06-21 14:02:41 -07:00
doc Release v0.4.2 (#1063) 2018-06-04 15:37:04 -07:00
grafana Grafana: remove fill and stack from individual resource breakouts (#1092) 2018-06-18 10:14:39 -07:00
pkg Add CA certificate bundle distributor to conduit install (#675) 2018-06-21 13:12:21 -07:00
proto Propagate errors in conduit containers to the api (#1117) 2018-06-14 16:22:31 -07:00
proxy proxy: Add process stats to proxy metrics (on Linux) (#1128) 2018-06-21 17:50:10 -07:00
proxy-init Add CA certificate bundle distributor to conduit install (#675) 2018-06-21 13:12:21 -07:00
test Add controller admin servers and readiness probes (#1168) 2018-06-20 17:32:44 -07:00
testutil Fix dashboard integration test (#1160) 2018-06-19 17:01:47 -07:00
web Add CA certificate bundle distributor to conduit install (#675) 2018-06-21 13:12:21 -07:00
.dockerignore Update babel to use `env` and `react-app` as presets. (#976) 2018-05-22 17:17:44 -07:00
.editorconfig Add protobuf files to .editorconfig (#1042) 2018-05-30 15:09:38 -07:00
.gcp.json.enc Fix docker-build stage in CI (#21) 2017-12-08 00:52:06 -06:00
.gitattributes proxy: Update `rand` to 0.5.1 (#1125) 2018-06-14 15:09:58 -07:00
.gitignore Link to Grafana from Conduit Dashboard (#678) 2018-04-06 10:56:42 -07:00
.prometheus.dev.yml Remove the telemetry service (#757) 2018-04-13 11:21:29 -07:00
.travis.yml Fix conduit version issue in integration tests (#1139) 2018-06-15 16:35:51 -07:00
BUILD.md Fix unbound variable issue in docker-build script (#1146) 2018-06-18 11:29:09 -07:00
CHANGES.md v0.4.4 release notes (#1145) 2018-06-18 11:29:31 -07:00
CONTRIBUTING.md Add contributing doc and DCO file (#88) 2017-12-22 14:54:27 -08:00
Cargo.lock proxy: Add process stats to proxy metrics (on Linux) (#1128) 2018-06-21 17:50:10 -07:00
Cargo.toml Update Rustls to the latest Git version to fix a bug. (#1143) 2018-06-16 08:09:42 -10:00
DCO Add contributing doc and DCO file (#88) 2017-12-22 14:54:27 -08:00
Dockerfile-base Introducing Conduit, the ultralight service mesh 2017-12-05 00:24:55 +00:00
Dockerfile-go-deps Go: update k8s dependencies to 1.10.2 (#962) 2018-05-17 15:46:58 -07:00
Gopkg.lock Add CA certificate bundle distributor to conduit install (#675) 2018-06-21 13:12:21 -07:00
Gopkg.toml Go: update k8s dependencies to 1.10.2 (#962) 2018-05-17 15:46:58 -07:00
LICENSE Introducing Conduit, the ultralight service mesh 2017-12-05 00:24:55 +00:00
README.md update readme: experimental -> alpha, and minor tweaks (#391) 2018-02-19 15:41:04 -08:00
TEST.md Add tests/utils/scripts for running integration tests (#608) 2018-03-27 15:06:55 -07:00
docker-compose.yml Upgrade Prometheus from 2.1.0 to 2.2.1 (#816) 2018-04-19 18:00:53 -07:00

README.md

conduit

Build Status GitHub license Slack Status

🎈 Welcome to Conduit! 👋

Conduit is an ultralight service mesh for Kubernetes. It features a minimalist control plane written in Go, and a native proxy data plane written in Rust that boasts the performance of C without the heartbleed.

Conduit is alpha. It is capable of proxying all TCP traffic, and reporting top-line metrics (success rates, latencies, etc) for all HTTP, HTTP/2, and gRPC traffic. It currently does not work with websockets or with HTTP tunneling--see the --skip-outbound-ports flag for how to exclude these types of traffic.

Get involved

Documentation

View Conduit docs for more a more comprehensive guide to getting started, or view the full Conduit roadmap.

Getting started with Conduit

  1. Install the Conduit CLI with curl https://run.conduit.io/install | sh .

  2. Add $HOME/.conduit/bin to your PATH.

  3. Install Conduit into your Kubernetes cluster with: conduit install | kubectl apply -f -.

  4. Verify that the installation succeeded with conduit check.

  5. Explore the Conduit controller with conduit dashboard.

  6. Optionally, install a demo application to run with Conduit.

  7. Add your own service to the Conduit mesh!

Working in this repo

BUILD.md includes general information on how to work in this repo.

Code of conduct

This project is for everyone. We ask that our users and contributors take a few minutes to review our code of conduct.

License

Conduit is copyright 2018 Buoyant, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.