From 51674b3a5bc25909b3d27e4a3b4350eae9016275 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Wed, 8 Feb 2023 13:50:32 -0500 Subject: [PATCH] upgrade influx --- .../sbin/so-grafana-dashboard-folder-delete | 20 ------------------- salt/common/tools/sbin/so-grafana-restart | 12 ----------- salt/common/tools/sbin/so-grafana-start | 12 ----------- salt/common/tools/sbin/so-grafana-stop | 12 ----------- 4 files changed, 56 deletions(-) delete mode 100644 salt/common/tools/sbin/so-grafana-dashboard-folder-delete delete mode 100644 salt/common/tools/sbin/so-grafana-restart delete mode 100644 salt/common/tools/sbin/so-grafana-start delete mode 100644 salt/common/tools/sbin/so-grafana-stop diff --git a/salt/common/tools/sbin/so-grafana-dashboard-folder-delete b/salt/common/tools/sbin/so-grafana-dashboard-folder-delete deleted file mode 100644 index 0783fccea..000000000 --- a/salt/common/tools/sbin/so-grafana-dashboard-folder-delete +++ /dev/null @@ -1,20 +0,0 @@ -# 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') -delfolder=("Manager" "Manager Search" "Sensor Nodes" "Search Nodes" "Standalone" "Eval Mode") - -for row in $folders; do - title=$(echo ${row} | base64 --decode | jq -r '.title') - uid=$(echo ${row} | base64 --decode | jq -r '.uid') - - if [[ " ${delfolder[@]} " =~ " ${title} " ]]; then - curl -X DELETE http://admin:{{salt['pillar.get']('secrets:grafana_admin')}}@localhost:3000/api/folders/$uid - fi -done - -echo "so-grafana-dashboard-folder-delete has been run to delete default Grafana dashboard folders that existed prior to 2.3.70" > /opt/so/state/so-grafana-dashboard-folder-delete-complete - -exit 0 diff --git a/salt/common/tools/sbin/so-grafana-restart b/salt/common/tools/sbin/so-grafana-restart deleted file mode 100644 index f8fbcb9c1..000000000 --- a/salt/common/tools/sbin/so-grafana-restart +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one -# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at -# 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-restart grafana $1 diff --git a/salt/common/tools/sbin/so-grafana-start b/salt/common/tools/sbin/so-grafana-start deleted file mode 100644 index dfea3b8dc..000000000 --- a/salt/common/tools/sbin/so-grafana-start +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one -# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at -# 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-start grafana $1 diff --git a/salt/common/tools/sbin/so-grafana-stop b/salt/common/tools/sbin/so-grafana-stop deleted file mode 100644 index 62552f17f..000000000 --- a/salt/common/tools/sbin/so-grafana-stop +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one -# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at -# 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-stop grafana $1