Added -N flag to nc invocation
This commit is contained in:
parent
be4039d647
commit
66d27887f2
|
@ -41,7 +41,7 @@ prometheus_httpd () {
|
|||
echo "Serving prometheus HTTP endpoint at http://localhost:$PROMETHEUS_PORT/metrics"
|
||||
while true; do
|
||||
local REQUEST RESPONSE
|
||||
cat $prometheus_httpd_fifo | nc -l $PROMETHEUS_PORT | while read line; do
|
||||
cat $prometheus_httpd_fifo | nc -N -l $PROMETHEUS_PORT | while read line; do
|
||||
line=$(echo "$line" | tr -d '[\r\n]')
|
||||
# extract the request
|
||||
if echo "$line" | grep -qE '^GET /'; then
|
||||
|
@ -80,4 +80,4 @@ docs () {
|
|||
echo "$PROMETHEUS_METRIC_NAME{metric=\"<metric>\"} <value> <timestamp>"
|
||||
echo "PROMETHEUS_PORT=$PROMETHEUS_PORT"
|
||||
echo "PROMETHEUS_METRIC_NAME=$PROMETHEUS_METRIC_NAME"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue