diff --git a/Dockerfile b/Dockerfile index 439b9366f96cc71af490cbd5d05bb802f559fed9..ecc8b977f4ccefbee95777407fc2359c9c9ecef2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ ARG BASE_TAG=8.3 FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} as prep_files -ARG ELASTIC_STACK=7.11.1 +ARG ELASTIC_STACK=7.12.0 ARG ELASTIC_PRODUCT=elastic-agent ARG OS_AND_ARCH=linux-x86_64 @@ -87,4 +87,4 @@ ENV ELASTIC_PRODUCT=${ELASTIC_PRODUCT} ENTRYPOINT ["/tinit", "--", "/usr/local/bin/docker-entrypoint"] CMD ["--environment", "container"] -HEALTHCHECK --interval=10s --timeout=5s --start-period=1m --retries=5 CMD test -w '/tmp/elastic-agent/default/metricbeat/metricbeat.sock' +HEALTHCHECK --interval=10s --timeout=5s --start-period=1m --retries=5 CMD test -w '/tmp/elastic-agent/elastic-agent.sock' diff --git a/README.md b/README.md index 049b1442171b86615769031cb5c0847be9a4f71d..7bf89ef710de3a40d254c1bc78e2e3223c7589eb 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ **elastic-agent** is a single, unified way to add monitoring for logs, metrics, and other types of data to each host. A single agent makes it easier and faster to deploy monitoring across your infrastructure. The agent’s single, unified configuration makes it easier to add integrations for new data sources. For more information about elastic-agent, please visit -https://www.elastic.co/guide/en/ingest-management/7.11/index.html. +https://www.elastic.co/guide/en/ingest-management/7.12/index.html. --- **NOTE** @@ -14,7 +14,7 @@ This functionality is in beta and is subject to change. The design and code is l ### Installation instructions -Please follow the documentation on [Quick start](https://www.elastic.co/guide/en/ingest-management/7.11/ingest-management-getting-started.html). +Please follow the documentation on [Quick start](https://www.elastic.co/guide/en/ingest-management/7.12/ingest-management-getting-started.html). ### Where to file issues and PRs @@ -37,9 +37,9 @@ visiting [Elastic Community](https://www.elastic.co/community). This software is governed by the [Elastic -License](https://github.com/elastic/elasticsearch/blob/7.11/licenses/ELASTIC-LICENSE.txt), +License](https://github.com/elastic/elasticsearch/blob/7.12/licenses/ELASTIC-LICENSE.txt), and includes the full set of [free features](https://www.elastic.co/subscriptions). View the detailed release notes -[here](https://www.elastic.co/guide/en/beats/libbeat/current/release-notes-7.11.1.html). +[here](https://www.elastic.co/guide/en/beats/libbeat/current/release-notes-7.12.1.html). diff --git a/hardening_manifest.yaml b/hardening_manifest.yaml index a8d6bb00aede574d0011fd7ff313a21b01f62638..d91f0ee39d14368e1a9537773c0ece653d3740d3 100644 --- a/hardening_manifest.yaml +++ b/hardening_manifest.yaml @@ -8,7 +8,7 @@ name: "elastic/beats/elastic-agent" # The most specific version should be the first tag and will be shown # on ironbank.dsop.io tags: -- "7.11.1" +- "7.12.0" - "latest" # Build args passed to Dockerfile ARGs @@ -16,7 +16,7 @@ args: BASE_IMAGE: "redhat/ubi/ubi8" BASE_TAG: "8.3" BASE_REGISTRY: registry1.dsop.io - ELASTIC_STACK: "7.11.1" + ELASTIC_STACK: "7.12.0" ELASTIC_PRODUCT: "elastic-agent" # Docker image labels @@ -30,7 +30,7 @@ labels: org.opencontainers.image.url: "https://www.elastic.co/products/beats/elastic-agent" ## Name of the distributing entity, organization or individual org.opencontainers.image.vendor: "Elastic" - org.opencontainers.image.version: "7.11.1" + org.opencontainers.image.version: "7.12.0" ## Keywords to help with search (ex. "cicd,gitops,golang") mil.dso.ironbank.image.keywords: "log,metrics,monitoring,observabilty,o11y,oblt,beats,elastic,elasticsearch,golang" ## This value can be "opensource" or "commercial" @@ -40,11 +40,11 @@ labels: # List of resources to make available to the offline build context resources: -- filename: elastic-agent-7.11.1-linux-x86_64.tar.gz - url: https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-7.11.1-linux-x86_64.tar.gz +- filename: elastic-agent-7.12.0-linux-x86_64.tar.gz + url: https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-7.12.0-linux-x86_64.tar.gz validation: type: sha512 - value: ec30fb58d7e5ff5d16044a0810ebd3919b70fb04d908c971ee4a0d10a49d184e6c0e96aec800b9839d6ff6fe70aaf109f78970104c77c03cde84d78daedf6072 + value: 2b3b0d0b39ab7c26dbea6d3dfd3f29538d10312fa7fa5a314ea252fc549e438a91ac31ed373c5bf486e74a9e8e6be1e80b20c2e5c54cae23786270cbfe3cf35c - filename: tinit url: https://github.com/krallin/tini/releases/download/v0.19.0/tini-amd64 validation: diff --git a/scripts/docker-entrypoint b/scripts/docker-entrypoint index 83b8cb21cff37a52fc4d14b2a44e665cef1d1486..630a14ecd130c1119381c40cc7dd48b74e6704d9 100644 --- a/scripts/docker-entrypoint +++ b/scripts/docker-entrypoint @@ -50,7 +50,12 @@ function enroll(){ exit $exitCode fi log $enrollResp - local apikeyId=$(echo $enrollResp | jq -r '.list[0].id') + local apikeyId=$(echo $enrollResp | jq -r '.list[] | select((.name | startswith("Default ")) and (.active == true)) | .id') + + if [[ -z "${apikeyId}" ]]; then + echo "Default agent policy was not found. Please consider using own enrollment token (FLEET_ENROLLMENT_TOKEN)." + exit 1 + fi log $apikeyId echo "Enroll Agent" @@ -73,7 +78,7 @@ function enroll(){ insecure_flag="--insecure" fi - elastic-agent enroll ${insecure_flag} ${KIBANA_HOST:-http://localhost:5601} $apikey -f + elastic-agent enroll ${insecure_flag} -f --url=${KIBANA_HOST:-http://localhost:5601} --enrollment-token=$apikey } if [[ -n "${FLEET_SETUP}" ]] && [[ ${FLEET_SETUP} == 1 ]]; then setup; fi