mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-14 13:12:49 +01:00
prevent false success occurring when deleting the grafana dashboard
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
# this script is used to delete the default Grafana dashboard folders that existed prior to Grafana dashboard and Salt management changes in 2.3.70
|
# this script is used to delete the default Grafana dashboard folders that existed prior to Grafana dashboard and Salt management changes in 2.3.70
|
||||||
|
|
||||||
|
# Exit if an error occurs. The next highstate will retry.
|
||||||
|
set -e
|
||||||
|
|
||||||
folders=$(curl -X GET http://admin:{{salt['pillar.get']('secrets:grafana_admin')}}@localhost:3000/api/folders | jq -r '.[] | @base64')
|
folders=$(curl -X GET http://admin:{{salt['pillar.get']('secrets:grafana_admin')}}@localhost:3000/api/folders | jq -r '.[] | @base64')
|
||||||
delfolder=("Manager" "Manager Search" "Sensor Nodes" "Search Nodes" "Standalone" "Eval Mode")
|
delfolder=("Manager" "Manager Search" "Sensor Nodes" "Search Nodes" "Standalone" "Eval Mode")
|
||||||
|
|
||||||
|
|||||||
@@ -35,9 +35,20 @@ whipit() {
|
|||||||
|
|
||||||
# Check entire setup log for errors or unexpected salt states
|
# Check entire setup log for errors or unexpected salt states
|
||||||
log_has_errors() {
|
log_has_errors() {
|
||||||
|
# Ignore salt mast cached public key and minion failed to auth because this is a test
|
||||||
|
# to see if the salt key had already been accepted.
|
||||||
|
|
||||||
|
# Ignore failed to connect to ::1 since we have most curls wrapped in a retry.
|
||||||
|
|
||||||
|
# Ignore perl-Error- since that is the name of a Perl package SO installs.
|
||||||
|
|
||||||
|
# Ignore Failed: 0 since that is the salt state output, and we detect state failures
|
||||||
|
# via Result: False already.
|
||||||
|
|
||||||
grep -E "FAILED|Failed|failed|ERROR|Error|Result: False" "$setup_log" | \
|
grep -E "FAILED|Failed|failed|ERROR|Error|Result: False" "$setup_log" | \
|
||||||
grep -vE "The Salt Master has cached the public key for this node" | \
|
grep -vE "The Salt Master has cached the public key for this node" | \
|
||||||
grep -vE "Minion failed to authenticate with the master" | \
|
grep -vE "Minion failed to authenticate with the master" | \
|
||||||
|
grep -vE "Failed to connect to ::1" | \
|
||||||
grep -vE "perl-Error-" | \
|
grep -vE "perl-Error-" | \
|
||||||
grep -vE "Failed:\s*?[0-9]+" | \
|
grep -vE "Failed:\s*?[0-9]+" | \
|
||||||
grep -vE "Status .* was not found" | \
|
grep -vE "Status .* was not found" | \
|
||||||
|
|||||||
Reference in New Issue
Block a user