File: scrape.sh

package info (click to toggle)
prometheus-cpp 1.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 792 kB
  • sloc: cpp: 3,596; sh: 37; makefile: 12
file content (19 lines) | stat: -rwxr-xr-x 433 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash

telegraf=$(which telegraf)
if [ ! -x "$telegraf" ] ; then
    echo "telegraf must be in path for this test to run"
    exit 1
fi

function timeout_after
{
   ( echo failing after $1 seconds for execution && sleep $1 && kill $$ ) &
}

trap 'kill $(jobs -p)' EXIT

timeout_after 10

pull/tests/integration/sample-server &
telegraf --config pull/tests/integration/scrape.conf --quiet | grep -m1 http_requests_total