From 5f3c302e1c06c5ff8e8b8d88dcc6d9699ebedb6d Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Wed, 11 May 2022 01:12:53 -0400 Subject: [PATCH] make installing more robust --- setup | 2 +- sysd-prom-fail-install | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/setup b/setup index 5897f56..9044d45 100755 --- a/setup +++ b/setup @@ -67,6 +67,6 @@ else if $dry; then echo "setup dry run: install ${files[*]} /usr/local/bin" else - install ${files[@]} /usr/local/bin + install -C ${files[@]} /usr/local/bin fi fi diff --git a/sysd-prom-fail-install b/sysd-prom-fail-install index 244e0a5..ad98456 100755 --- a/sysd-prom-fail-install +++ b/sysd-prom-fail-install @@ -13,6 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# usage: since this is a counter, in prometheus alert manager you will +# need to test something like: rate(node_systemd_unit_result_fail_count[30m]) > 0 + source /a/bin/errhandle/err [[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" -- 2.30.2