influx upgrade

This commit is contained in:
Jason Ertel
2023-02-09 18:27:14 -05:00
parent 0e50d36da6
commit 0eec8b22a2
4 changed files with 7 additions and 2 deletions

View File

@@ -36,10 +36,12 @@ log() {
read_password() {
# Read password for new user from stdin
set +e
test -t 0
if [[ $? == 0 ]]; then
echo "Enter new password:"
fi
set -e
read -rs USER_PASS
check_password_and_exit "$USER_PASS"
@@ -49,6 +51,7 @@ check_response() {
response=$1
if [[ "$response" =~ "\"code\":" ]]; then
log "Failed. Check the response for more details.\n$response"
exit 1
fi
}
@@ -61,6 +64,7 @@ if [[ "$OP" == "add" ]]; then
OP=password
fi
log "Looking up user ID"
response=$(curl -sk https://localhost:8086/api/v2/users?limit=100 -H "Authorization: Token $TOKEN")
check_response "$response"
USER_ID=$(echo "$response" | jq -r ".users[] | select(.name == \"$USER_EMAIL\").id")

View File

@@ -51,7 +51,7 @@ so-influxdb:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=so
- DOCKER_INFLUXDB_INIT_PASSWORD={{ PASSWORD }}
- DOCKER_INFLUXDB_INIT_ORG="Security Onion"
- DOCKER_INFLUXDB_INIT_ORG=Security Onion
- DOCKER_INFLUXDB_INIT_BUCKET=telegraf/so_short_term
- DOCKER_INFLUXDB_INIT_RETENTION=30d
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN={{ TOKEN }}

View File

@@ -194,6 +194,7 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Proxy "";
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cookie_path /api/ /influxdb/api/;
}
location /kibana/ {

View File

@@ -74,7 +74,7 @@
# Configuration for sending metrics to InfluxDB
[[outputs.influxdb_v2]]
urls = ["https://{{ INFLUXDBHOST }}:8086"]
token = "$TOKEN"
token = "{{ TOKEN }}"
organization = "Security Onion"
bucket = "telegraf/so_short_term"