Skip to content

Commit 716f8c0

Browse files
committed
feat(stacks): add node_exporter
1 parent 797f3d9 commit 716f8c0

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

scripts/checker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,12 @@
271271
"owner": "prometheus",
272272
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
273273
},
274+
"node_exporter": {
275+
"name": "node_exporter",
276+
"type": "github",
277+
"owner": "node_exporter",
278+
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
279+
},
274280
}
275281

276282

stacks/node_exporter/build.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# Load stack utils
4+
. /usr/bin/stack-utils
5+
6+
# Implement build function
7+
function build() {
8+
generate-stack-path
9+
curl -sSL https://github.com/prometheus/node_exporter/releases/download/v${STACK_VERSION}/node_exporter-${STACK_VERSION}.linux-${OS_ARCH}.tar.gz | tar -xvz
10+
BIN_DIR="${DATA_DIR}"/bin
11+
mkdir -p "${BIN_DIR}"
12+
mv ./node_exporter-${STACK_VERSION}.linux-${OS_ARCH}/node_exporter "${BIN_DIR}"
13+
rm -rf ./node_exporter-${STACK_VERSION}.linux-${OS_ARCH}
14+
#upx
15+
upx --lzma --best "${BIN_DIR}"/*
16+
}
17+
18+
# call build stack
19+
build-stack "${1}"

0 commit comments

Comments
 (0)