FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node_exporter/test_image.sh at master · prometheus/node_exporter · GitHub
prometheus
node_exporter
Repository navigation
Code
Issues
220
(220)
Pull requests
112
(112)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
node_exporter
/
test_image.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
36 lines (28 loc) · 606 Bytes
Breadcrumbs
node_exporter
/
test_image.sh
Copy path
File metadata and controls
executable file
·
36 lines (28 loc) · 606 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!
/bin/bash
set
-exo pipefail
docker_image=
$1
port=
$2
container_id=
'
'
wait_start
() {
for
in
in
{1..10}
;
do
if
/usr/bin/curl -s -m 5 -f
"
http://localhost:
${port}
/metrics
"
>
/dev/null
;
then
docker_cleanup
exit
0
else
sleep 1
fi
done
exit
1
}
docker_start
() {
container_id=
$(
docker run -d -p
"
${port}
"
:
"
${port}
"
"
${docker_image}
"
)
}
docker_cleanup
() {
docker
kill
"
${container_id}
"
}
if
[[
"
$#
"
-ne
2 ]]
;
then
echo
"
Usage:
$0
quay.io/prometheus/node-exporter:v0.13.0 9100
"
>&2
exit
1
fi
docker_start
wait_start
Back
|
FazBrowse Home
|
New Git URL