Fix cadvisor unable to report oomkill events (#804)

This commit is contained in:
Michael Lin authored and GitHub committed 2022-04-26 14:49:59 -07:00
1 parent 1bced27dfd
commit 4cc1408995
2 files changed
+15

No files matched your search

+8
View File
@@ -491,6 +491,12 @@ services:
image: 'index.docker.io/sourcegraph/cadvisor:insiders@sha256:3544dba5cd99c429ac62f4773454c8406abe126ba340f34e457b38d828c63395'
cpus: 1
mem_limit: '1g'
# You may set `privileged` to `false and `cadvisor` will run with reduced privileges.
# `cadvisor` requires root privileges in order to display provisioning metrics.
# These metrics provide critical information to help you scale the Sourcegraph deployment.
# If you would like to bring your own infrastructure monitoring & alerting solution,
# you may want to remove the `cadvisor` container completely
privileged: true
volumes:
- '/:/rootfs:ro'
- '/var/run:/var/run:ro'
@@ -499,6 +505,8 @@ services:
- '/dev/disk/:/dev/disk:ro'
# Uncomment to enable container monitoring on MacOS
# - '/var/run/docker.sock:/var/run/docker.sock:ro'
devices:
- '/dev/kmsg'
networks:
- sourcegraph
restart: always
+7
View File
@@ -24,6 +24,13 @@ sudo docker run --detach \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--volume=/dev/disk/:/dev/disk:ro \
# You may set `privileged` to `false and `cadvisor` will run with reduced privileges.
# `cadvisor` requires root privileges in order to display provisioning metrics.
# These metrics provide critical information to help you scale the Sourcegraph deployment.
# If you would like to bring your own infrastructure monitoring & alerting solution,
# you may want to remove the `cadvisor` container completely
--privileged \
--device=/dev/kmsg \
index.docker.io/sourcegraph/cadvisor:3.36.3@sha256:249c573262967979889a186344ba5cc4e8e9186ec4f26c759ce9f8527560da69 \
--port=8080