Skip to content

Commit

Permalink
Adding exporter opt to get ip address
Browse files Browse the repository at this point in the history
  • Loading branch information
arlake228 committed May 14, 2024
1 parent e0ab690 commit 8943ee3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash

TARGET_FILE="/etc/default/node_exporter"
EDIT_MARKER='#Edited by PS_HOST_METRICS'
grep -q PS_HOST_METRICS ${TARGET_FILE}
#bump version when you make changes
EDIT_MARKER='#Edited by PS_HOST_METRICS - v2'
grep -q "${EDIT_MARKER}" ${TARGET_FILE}
if [ $? -eq 1 ]; then
TEMPFILE=$(mktemp)
echo ${EDIT_MARKER} > ${TEMPFILE}
OPTS="--collector.sysctl"
OPTS="--collector.netdev.address-info --collector.sysctl"
OPTS="${OPTS} --collector.sysctl.include=net.core.rmem_max"
OPTS="${OPTS} --collector.sysctl.include=net.core.rmem_default"
OPTS="${OPTS} --collector.sysctl.include=net.core.wmem_max"
Expand Down

0 comments on commit 8943ee3

Please sign in to comment.