diff --git a/.mdox.validator.yaml b/.mdox.validator.yaml index 065e76794..abc003a8a 100644 --- a/.mdox.validator.yaml +++ b/.mdox.validator.yaml @@ -1,6 +1,13 @@ version: 1 +explicitLocalValidators: true # Don't check external URLs, they can time-out a lot (rate limits). +# Don't check repo-local absolute URLs, they resolve to site routes rather than +# files on the local filesystem. Keep validating other local (relative) links. validators: - type: ignore - regex: http(s|)://.* \ No newline at end of file + regex: http(s|)://.* + - type: ignore + regex: ^/.* + - type: local + regex: ^.*$ diff --git a/Makefile b/Makefile index 083acdf23..25fc44a5b 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ MD_FILES_TO_FORMAT=docs/specs/om/open_metrics_spec_2_0.md MDOX="mdox" $(MDOX): - @go install github.com/bwplotka/mdox@v0.9.0 + @go install github.com/bwplotka/mdox@e88e0a8655a0c91ef6a849edd29798e7e4809d75 .PHONY: help help: ## Displays help. diff --git a/docs/guides/cadvisor.md b/docs/guides/cadvisor.md index f786d5d2e..3dcd4e32d 100644 --- a/docs/guides/cadvisor.md +++ b/docs/guides/cadvisor.md @@ -27,6 +27,7 @@ Now we'll need to create a Docker Compose [configuration](https://docs.docker.co In the same folder where you created the [`prometheus.yml`](#prometheus-configuration) file, create a `docker-compose.yml` file and populate it with this Docker Compose configuration: ### Using Bind Mounts + ```yaml version: '3.2' services: @@ -63,8 +64,8 @@ services: This configuration instructs Docker Compose to run three services, each of which corresponds to a [Docker](https://docker.com) container: 1. The `prometheus` service uses the local `prometheus.yml` configuration file (imported into the container by the `volumes` parameter). -1. The `cadvisor` service exposes port 8080 (the default port for cAdvisor metrics) and relies on a variety of local volumes (`/`, `/var/run`, etc.). -1. The `redis` service is a standard Redis server. cAdvisor will gather container metrics from this container automatically, i.e. without any further configuration. +2. The `cadvisor` service exposes port 8080 (the default port for cAdvisor metrics) and relies on a variety of local volumes (`/`, `/var/run`, etc.). +3. The `redis` service is a standard Redis server. cAdvisor will gather container metrics from this container automatically, i.e. without any further configuration. To run the installation: @@ -93,6 +94,7 @@ cadvisor /usr/bin/cadvisor -logtostderr Up 8080/tcp prometheus /bin/prometheus --config.f ... Up 0.0.0.0:9090->9090/tcp redis docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp ``` + ### Alternative: Using Inline Docker Configs (Remote Deployments) If you're managing a remote Docker host and prefer to keep all configuration within the docker-compose.yml file (avoiding the need to manage separate config files on the host), you can use Docker's configs feature: @@ -155,6 +157,7 @@ services: - `mode: 0400` - File permissions (read-only for owner) Omitting these fields or using string values like `"nobody"` will cause the following error: + ``` strconv.Atoi: parsing "nobody": invalid syntax ``` @@ -177,12 +180,12 @@ NOTE: A full listing of cAdvisor-gathered container metrics exposed to Prometheu The table below lists some other example expressions -Expression | Description | For -:----------|:------------|:--- -[`rate(container_cpu_usage_seconds_total{name="redis"}[1m])`](http://localhost:9090/graph?g0.range_input=1h&g0.expr=rate(container_cpu_usage_seconds_total%7Bname%3D%22redis%22%7D%5B1m%5D)&g0.tab=1) | The [cgroup](https://en.wikipedia.org/wiki/Cgroups)'s CPU usage in the last minute | The `redis` container -[`container_memory_usage_bytes{name="redis"}`](http://localhost:9090/graph?g0.range_input=1h&g0.expr=container_memory_usage_bytes%7Bname%3D%22redis%22%7D&g0.tab=1) | The cgroup's total memory usage (in bytes) | The `redis` container -[`rate(container_network_transmit_bytes_total[1m])`](http://localhost:9090/graph?g0.range_input=1h&g0.expr=rate(container_network_transmit_bytes_total%5B1m%5D)&g0.tab=1) | Bytes transmitted over the network by the container per second in the last minute | All containers -[`rate(container_network_receive_bytes_total[1m])`](http://localhost:9090/graph?g0.range_input=1h&g0.expr=rate(container_network_receive_bytes_total%5B1m%5D)&g0.tab=1) | Bytes received over the network by the container per second in the last minute | All containers +| Expression | Description | For | +|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:----------------------| +| [`rate(container_cpu_usage_seconds_total{name="redis"}[1m])`](http://localhost:9090/graph?g0.range_input=1h&g0.expr=rate(container_cpu_usage_seconds_total%7Bname%3D%22redis%22%7D%5B1m%5D)&g0.tab=1) | The [cgroup](https://en.wikipedia.org/wiki/Cgroups)'s CPU usage in the last minute | The `redis` container | +| [`container_memory_usage_bytes{name="redis"}`](http://localhost:9090/graph?g0.range_input=1h&g0.expr=container_memory_usage_bytes%7Bname%3D%22redis%22%7D&g0.tab=1) | The cgroup's total memory usage (in bytes) | The `redis` container | +| [`rate(container_network_transmit_bytes_total[1m])`](http://localhost:9090/graph?g0.range_input=1h&g0.expr=rate(container_network_transmit_bytes_total%5B1m%5D)&g0.tab=1) | Bytes transmitted over the network by the container per second in the last minute | All containers | +| [`rate(container_network_receive_bytes_total[1m])`](http://localhost:9090/graph?g0.range_input=1h&g0.expr=rate(container_network_receive_bytes_total%5B1m%5D)&g0.tab=1) | Bytes received over the network by the container per second in the last minute | All containers | ## Summary