Movatterモバイル変換


[0]ホーム

URL:


Loading
  1. Elastic Docs/
  2. Deploy and manage/
  3. Deploy/
  4. Elastic Cloud on Kubernetes/
  5. Orchestrate other Elastic applications/
  6. Standalone Elastic Agent

Quickstart: Running standalone Elastic Agent on Elastic Cloud on Kubernetes

  1. Apply the following specification to deploy Elastic Agent with the System metrics integration to harvest CPU metrics from the Agent Pods. ECK automatically configures the secured connection to an Elasticsearch cluster namedquickstart, created inDeploy an Elasticsearch cluster.

    cat <<EOF | kubectl apply -f -apiVersion: agent.k8s.elastic.co/v1alpha1kind: Agentmetadata:  name: quickstartspec:  version: 9.3.0  elasticsearchRefs:  - name: quickstart  daemonSet:    podTemplate:      spec:        securityContext:          runAsUser: 0  config:    inputs:      - name: system-1        revision: 1        type: system/metrics        use_output: default        meta:          package:            name: system            version: 0.9.1        data_stream:          namespace: default        streams:          - id: system/metrics-system.cpu            data_stream:              dataset: system.cpu              type: metrics            metricsets:              - cpu            cpu.metrics:              - percentages              - normalized_percentages            period: 10sEOF
    1. The root user is required to persist state in ahostPath volume. SeeStoring local state in host path volume for options to not run the Agent container as root.

    CheckConfiguration examples for more ready-to-use manifests.

  2. Monitor the status of Elastic Agent.

    kubectl get agent
    NAME            HEALTH   AVAILABLE   EXPECTED   VERSION   AGEquickstart      green    3           3          9.3.0    15s
  3. List all the Pods that belong to a given Elastic Agent specification.

    kubectl get pods --selector='agent.k8s.elastic.co/name=quickstart'
    NAME                     READY   STATUS    RESTARTS   AGEquickstart-agent-6bcxr   1/1     Running   0          68squickstart-agent-t49fd   1/1     Running   0          68squickstart-agent-zqp55   1/1     Running   0          68s
  4. Access logs for one of the Pods.

    kubectl logs -f quickstart-agent-6bcxr
  5. Access the CPU metrics ingested by Elastic Agent.

    You have two options:

    • Follow the Elasticsearch deploymentguide and run:

      curl -u "elastic:$PASSWORD" -k "https://localhost:9200/metrics-system.cpu-*/_search"
    • Follow the Kibana deploymentguide, log in and go toKibana >Discover.


[8]ページ先頭

©2009-2026 Movatter.jp