-
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #170 from jkossis/add-slave-config
Add configuration for running smokeping in slave mode
- Loading branch information
Showing
4 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
host1:mysecret | ||
host2:yoursecret | ||
boomer:lkasdf93uhhfdfddf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
#!/usr/bin/with-contenv bash | ||
# shellcheck shell=bash | ||
|
||
exec \ | ||
s6-setuidgid abc /usr/sbin/smokeping --config="/etc/smokeping/config" --nodaemon | ||
if [ -n "${MASTER_URL}" ] && [ -n "${SHARED_SECRET}" ] && [ -n "${CACHE_DIR}" ]; then | ||
install -g abc -o abc -m 400 -D <(echo $SHARED_SECRET) /var/smokeping/secret.txt | ||
exec \ | ||
s6-setuidgid abc /usr/sbin/smokeping --master-url="${MASTER_URL}" --cache-dir="${CACHE_DIR}" --shared-secret="/var/smokeping/secret.txt" --nodaemon | ||
else | ||
exec \ | ||
s6-setuidgid abc /usr/sbin/smokeping --config="/etc/smokeping/config" --nodaemon | ||
fi |
da61e11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
smokeping_secrets is not allowed to be world readable/writeable. Otherwise Smokeping does not work.
Needed manually todo to make Smokeping working again:
chmod o-rx smokeping_secrets
da61e11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed, this change broke my existing Smokeping instances. The below command fixed it for me, adjust for your use case depending on container name and/or non-Compose containers:
da61e11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guys, for future reference please open an issue and link to the commit/PR rather than commenting on the commit - it was pure chance I saw this in our Discord github feed, otherwise it probably would have sat here unnoticed for months.