Add network interface stats

We do not have to collect these often, so for now set the collection
interval to 120s (even though the Stackdriver exporter is still set to
export every 60s).
This commit is contained in:
Karan Goel
2021-01-20 08:56:34 -08:00
parent 45f70a8b26
commit 2a2bab3d28
10 changed files with 465 additions and 9 deletions
+5 -3
View File
@@ -47,13 +47,16 @@ function install-npd() {
readonly workdir=$(mktemp -d)
tar -xf "${TARBALL}" --directory "${workdir}"
echo "Preparing NPD binary directory."
mkdir -p "${BIN_DIR}"
mount --bind "${BIN_DIR}" "${BIN_DIR}"
# Below remount is to work around COS's noexec mount on /home.
mount -o remount,exec "${BIN_DIR}"
echo "Stopping NPD"
systemctl stop node-problem-detector.service || true
echo "Installing NPD binary."
cp "${workdir}"/bin/node-problem-detector "${BIN_DIR}"
@@ -75,7 +78,6 @@ function install-npd() {
# Start systemd service.
echo "Starting NPD systemd service."
systemctl daemon-reload
systemctl stop node-problem-detector.service || true
systemctl start node-problem-detector.service
}
@@ -97,4 +99,4 @@ done
shift "$((OPTIND-1))"
main "${@}"
main "${@}"