Skip to content

Commit

Permalink
[Logs Onboarding] Adds install shipper step for custom logs (#158386)
Browse files Browse the repository at this point in the history
Closes #154937

This PR is an extension of
[#157802](#157802) which was
reverted because public Api endpoint versioning problems.

![Screenshot 2023-05-15 at 5 02 29
PM](https://github.com/elastic/kibana/assets/1967266/62484fb3-e02f-410d-aa7a-86bcc4dc0b03)

---------

Co-authored-by: Oliver Gupte <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
3 people authored May 25, 2023
1 parent edaf42c commit b2f0f4e
Show file tree
Hide file tree
Showing 24 changed files with 897 additions and 157 deletions.
12 changes: 12 additions & 0 deletions packages/kbn-check-mappings-update-cli/current_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2097,6 +2097,18 @@
}
}
},
"observability-onboarding-state": {
"properties": {
"state": {
"type": "object",
"dynamic": false
},
"progress": {
"type": "object",
"dynamic": false
}
}
},
"ml-job": {
"properties": {
"job_id": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
"ml-module": "2225cbb4bd508ea5f69db4b848be9d8a74b60198",
"ml-trained-model": "482195cefd6b04920e539d34d7356d22cb68e4f3",
"monitoring-telemetry": "5d91bf75787d9d4dd2fae954d0b3f76d33d2e559",
"observability-onboarding-state": "c2a7439293913d69cc286a8f8f9885bc2dd9682f",
"osquery-manager-usage-metric": "983bcbc3b7dda0aad29b20907db233abba709bcc",
"osquery-pack": "6ab4358ca4304a12dcfc1777c8135b75cffb4397",
"osquery-pack-asset": "b14101d3172c4b60eb5404696881ce5275c84152",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ describe('split .kibana index into multiple system indices', () => {
"ml-module",
"ml-trained-model",
"monitoring-telemetry",
"observability-onboarding-state",
"osquery-manager-usage-metric",
"osquery-pack",
"osquery-pack-asset",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const previouslyRegisteredTypes = [
'ml-module',
'ml-telemetry',
'monitoring-telemetry',
'observability-onboarding-state',
'osquery-pack',
'osquery-pack-asset',
'osquery-saved-query',
Expand Down
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 2023-05-24" \
--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"
Loading

0 comments on commit b2f0f4e

Please sign in to comment.