Skip to content

Commit

Permalink
Use correct name
Browse files Browse the repository at this point in the history
  • Loading branch information
defensivedepth committed Aug 23, 2024
1 parent e86fce6 commit c575e02
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions salt/elasticfleet/tools/sbin_jinja/so-elastic-fleet-setup
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,13 @@ printf "\n\n"
printf "Create Manager Fleet Server Policy...\n"
elastic_fleet_policy_create "FleetServer_{{ GLOBALS.hostname }}" "Fleet Server - {{ GLOBALS.hostname }}" "false" "120"

# Now that the Manager Fleet Server Policy is created, add the Fleet Server Integration to it
elastic_fleet_integration_create "@/opt/so/conf/elastic-fleet/integrations/fleet-server/fleet-server.json"
# Modify the default integration policy to update the policy_id with the correct naming
UPDATED_INTEGRATION_POLICY=$(jq --arg policy_id "FleetServer_{{ GLOBALS.hostname }}" --arg name "fleet_server-{{ GLOBALS.hostname }}" '
.policy_id = $policy_id |
.name = $name' /opt/so/conf/elastic-fleet/integrations/fleet-server/fleet-server.json)

# Add the Fleet Server Integration to the new Fleet Policy
elastic_fleet_integration_create "$UPDATED_INTEGRATION_POLICY"

# Now we can create the Logstash Output and set it to to be the default Output
printf "\n\nCreate Logstash Output Config if node is not an Import or Eval install\n"
Expand Down

0 comments on commit c575e02

Please sign in to comment.