Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a new package_policies does not update elastic agent policy #8109

Closed
kaykhan opened this issue Oct 15, 2024 · 2 comments
Closed

Adding a new package_policies does not update elastic agent policy #8109

kaykhan opened this issue Oct 15, 2024 · 2 comments
Labels

Comments

@kaykhan
Copy link

kaykhan commented Oct 15, 2024

In Kibana i am trying to install 2 extra integrations kibana and kubernetes. However after applying the change, i can see the integration was installed but the policy has not been added to the existing agent policy

Image

Image

    version: 8.15.2
    spec:
      count: 1
      elasticsearchRef:
        name: elasticsearch-prod-eck-elasticsearch
      http:
        service:
          spec:
            type: NodePort
      podTemplate:
        metadata:
          labels:
            scrape: kb
        spec:
          containers:
          - name: kibana
            resources:
              limits:
                memory: 2Gi
                cpu: 1
          tolerations:
            - key: "karpenter/elastic"
              operator: "Exists"
              effect: "NoSchedule"
          nodeSelector:
            karpenter-node-pool: elastic
            karpenter.k8s.aws/instance-size: large
      config:
        xpack.fleet.agents.elasticsearch.hosts: ["https://elasticsearch-prod-eck-elasticsearch-es-http.elastic-system.svc:9200"]
        xpack.fleet.agents.fleet_server.hosts: ["https://fleet-server-prod-eck-fleet-server-agent-http.elastic-system.svc:8220"]
        xpack.fleet.packages:
          - name: system
            version: latest
          - name: elastic_agent
            version: latest
          - name: fleet_server
            version: latest
          - name: kibana // Added
            version: latest
          - name: kubernetes // Added
            version: latest
        xpack.fleet.agentPolicies:
          - name: Fleet Server on ECK policy
            id: eck-fleet-server
            namespace: default
            monitoring_enabled:
              - logs
              - metrics
            unenroll_timeout: 900
            package_policies:
            - name: fleet_server-1
              id: fleet_server-1
              package:
                name: fleet_server
          - name: Elastic Agent on ECK policy
            id: eck-agent
            namespace: default
            monitoring_enabled:
              - logs
              - metrics
            unenroll_timeout: 900
            is_default: true
            package_policies:
              - id: system-1
                name: system-1
                package:
                  name: system
              - id: kibana-1 // Added
                name: kibana-1
                package:
                  name: kibana
              - name: kubernetes-1 // Added
                id: kubernetes-1
                package:
                  name: kubernetes
@botelastic botelastic bot added the triage label Oct 15, 2024
@barkbay
Copy link
Contributor

barkbay commented Oct 17, 2024

Closing as a duplicate of #7290

I can confirm that adding integrations in the Kibana custom resource while the policy already exists has actually no effect in the Agent policy.

@barkbay barkbay closed this as completed Oct 17, 2024
@barkbay
Copy link
Contributor

barkbay commented Oct 18, 2024

According to the Kibana documentation:

is_managed
If true, this policy is not editable by the user and can only be changed by updating the Kibana config.

Could you please try to add is_managed: true in each of your agent policies, for example:

        xpack.fleet.agentPolicies:
          - name: Fleet Server on ECK policy
            id: eck-fleet-server
            namespace: default
            is_managed: true ## <---- Here
            monitoring_enabled:
              - logs
              - metrics
            unenroll_timeout: 900
            package_policies:
            - name: fleet_server-1
              id: fleet_server-1
              package:
                name: fleet_server
          - name: Elastic Agent on ECK policy
            id: eck-agent
            namespace: default
            is_managed: true ## <---- Here
            monitoring_enabled:
              - logs
              - metrics
            unenroll_timeout: 900
            is_default: true 
            package_policies:
              - id: system-1
                name: system-1
                package:
                  name: system
              - id: kibana-1 // Added
                name: kibana-1
                package:
                  name: kibana
              - name: kubernetes-1 // Added
                id: kubernetes-1
                package:
                  name: kubernetes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants