sherifabdlnaby / elastdocker

🐳 Elastic Stack (ELK) v8+ on Docker with Compose. Pre-configured out of the box to enable Logging, Metrics, APM, Alerting, ML, and SIEM features. Up with a Single Command.
https://towardsdatascience.com/running-securing-and-deploying-elastic-stack-on-docker-f1a8ebf1dc5b
MIT License
1.81k stars 320 forks source link

Fleet server + Agent option #111

Open jeremywgleeson opened 11 months ago

jeremywgleeson commented 11 months ago

Is your feature request related to a problem? Please describe. No, not related to a problem. I wanted to use Fleet + Elastic Agents to more easily collect metrics + logs and this not currently supported.

Describe the solution you'd like Provide a Fleet server service definition that users can enable instead of the APM server.

Describe alternatives you've considered Continue letting users roll their own Fleet configuration.

Additional context Implementation suggestion: Docker compose profiles could be a nice way to implement this and would allow all core services to exist in the same compose file.

GelsonTJunior commented 9 months ago

I'm facing the same problem, I currently use the elastdocker stack, but I'm not able to link fleet-angent with the stack.

if you can help

derekbking commented 1 week ago

Spent some time getting this working today. Here's a snippet from my docker-compose:

    fleet-server:
        image: docker.elastic.co/elastic-agent/elastic-agent:${ELK_VERSION}
        hostname: ${FLEETSERVER_HOST}
        restart: always
        ports:
            - "8220:8220"
        environment:
            FLEET_SERVER_ENABLE: true
            FLEET_SERVER_ELASTICSEARCH_HOST: https://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}
            FLEET_SERVER_SERVICE_TOKEN: ${FLEET_SERVER_SERVICE_TOKEN}
            FLEET_SERVER_PORT: ${FLEETSERVER_PORT:-8220}
            FLEET_SERVER_ELASTICSEARCH_CA: /certs/ca.crt
        secrets:
            - source: elastic.ca
              target: /certs/ca.crt

Screenshot of my Fleet server policy. I have SSL setup on my load balancer in AWS. You may need to trust the ca configured by elastdocker docker if it's not signed by an official CA. image