mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
influx upgrade
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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/ {
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user