mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-11-18 18:16:02 +01:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f005453605 |
@@ -5,6 +5,7 @@
|
||||
# https://securityonion.net/license; you may not use this file except in compliance with the
|
||||
# Elastic License 2.0.
|
||||
|
||||
|
||||
. /usr/sbin/so-common
|
||||
. /usr/sbin/so-image-common
|
||||
|
||||
@@ -16,7 +17,6 @@ INSTALLEDVERSION=$(cat /etc/soversion)
|
||||
# not finish its post-upgrade steps; its contents are the resume point. It is read
|
||||
# here before preupgrade_changes mutates INSTALLEDVERSION and before any highstate
|
||||
# stamps /etc/soversion from the pillar.
|
||||
|
||||
POSTVERSION_FILE=/etc/sopostversion
|
||||
|
||||
if [ -f "$POSTVERSION_FILE" ]; then
|
||||
@@ -55,6 +55,7 @@ fi
|
||||
# used to display messages to the user at the end of soup
|
||||
declare -a FINAL_MESSAGE_QUEUE=()
|
||||
SOUP_ERR_CONTEXT=
|
||||
TELEGRAF_REPAIR_RAN=
|
||||
|
||||
|
||||
check_err() {
|
||||
@@ -1063,6 +1064,17 @@ up_to_3.3.0() {
|
||||
}
|
||||
|
||||
telegraf_repair() {
|
||||
# post_to_3.3.0 and post_to_3.5.0 both call this; run it once per soup.
|
||||
[[ -n "$TELEGRAF_REPAIR_RAN" ]] && return 0
|
||||
TELEGRAF_REPAIR_RAN=true
|
||||
local output
|
||||
output=$(salt-call pillar.get telegraf:output --out=newline_values_only)
|
||||
output=$(tr -d '[:space:]' <<<"$output" | tr '[:lower:]' '[:upper:]')
|
||||
output=${output:-INFLUXDB}
|
||||
case "$output" in
|
||||
POSTGRES|BOTH) ;;
|
||||
*) return 0 ;;
|
||||
esac
|
||||
# Only grids whose Telegraf partitions stalled need this; --check exits 1
|
||||
# when there is something to repair, so everyone else is left alone.
|
||||
local repair=/usr/sbin/so-telegraf-repair
|
||||
|
||||
Reference in new issue
Block a user