forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Logs Onboarding] Adds install shipper step for custom logs (elastic#…
…157802) Closes elastic#154937 This PR includes the steps to install standalone elastic agent + reporting the status from bash script back to kibana. ![Screenshot 2023-05-15 at 5 02 29 PM](https://github.com/elastic/kibana/assets/1967266/62484fb3-e02f-410d-aa7a-86bcc4dc0b03) --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Yngrid Coello <[email protected]> Co-authored-by: Yngrid Coello <[email protected]>
- Loading branch information
Showing
24 changed files
with
896 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
x-pack/plugins/observability_onboarding/public/assets/standalone_agent_setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
API_KEY_ENCODED=$1 | ||
API_ENDPOINT=$2 | ||
|
||
updateStepProgress() { | ||
echo " GET $API_ENDPOINT/step/$1?status=$2" | ||
curl --request GET \ | ||
--url "$API_ENDPOINT/step/$1?status=$2" \ | ||
--header "Authorization: ApiKey $API_KEY_ENCODED" \ | ||
--header "Content-Type: application/json" \ | ||
--header "kbn-xsrf: true" | ||
echo "" | ||
} | ||
|
||
echo "Downloading Elastic Agent" | ||
# https://www.elastic.co/guide/en/fleet/8.7/install-standalone-elastic-agent.html | ||
curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.7.1-linux-x86_64.tar.gz | ||
updateStepProgress "ea-download" "success" | ||
echo "Extracting Elastic Agent" | ||
tar xzvf elastic-agent-8.7.1-linux-x86_64.tar.gz | ||
updateStepProgress "ea-extract" "success" | ||
echo "Installing Elastic Agent" | ||
cd elastic-agent-8.7.1-linux-x86_64 | ||
./elastic-agent install -f | ||
updateStepProgress "ea-install" "success" | ||
echo "Sending status to Kibana..." | ||
updateStepProgress "ea-status" "active" |
Oops, something went wrong.