-
Notifications
You must be signed in to change notification settings - Fork 68
Conversation
This reverts commit b3e5723.
assuming it can resolve hostnames aka is also running under docker in the same network
Great progress!
I managed to install the APM integration via navigating to Policies/Add integration. Something is odd when downloading the packages: on the first attempt it always returns a The APM Server is not yet bundled nor available via the artifacts API. While I managed to install the APM integration, the APM Server cannot actually start as it is not yet available. |
The agent could successfully enroll, also be assigned to a new policy; but when installing the APM integration to the policy, the agent went
Not an issue with this PR, just leaving the comment here in case others try it out too - needs to be fixed separately. |
In another attempt, starting with completely fresh docker images - the APM Server integration was now successfully installed, without any further changes. (0) Starting integration testing with your branch and elastic-agent enabled APM Server is now running, and can be reached from inside the elastic agent docker container (port is not opened yet) |
Nice @simitt! I haven't been able to get it to work adding the integration via a different flow: I will try the method you suggested. Any changes need to this pull request? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to get this in! Just left minor comments - feel free to skip.
# FLEET_TOKEN_NAME - token name for a token to be created | ||
# KIBANA_HOST - actual kibana host [http://localhost:5601] | ||
# KIBANA_PASSWORD - password for accessing kibana API [changeme] | ||
# KIBANA_USERNAME - username for accessing kibana API [elastic] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't that admin
instead of elastic
?
scripts/modules/elastic_stack.py
Outdated
parser.add_argument( | ||
"--elastic-agent-kibana-url", | ||
default="http://admin:changeme@" + cls.DEFAULT_KIBANA_HOST, | ||
help="Elastic Agent's Kibana URL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add including username + password
Thanks @graphaelli and @simitt ! |
@@ -859,6 +922,10 @@ def __init__(self, **options): | |||
if self.at_least_version("7.7"): | |||
self.environment["XPACK_SECURITY_ENCRYPTIONKEY"] = "fhjskloppd678ehkdfdlliverpoolfcr" | |||
self.environment["XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY"] = "fhjskloppd678ehkdfdlliverpoolfcr" | |||
if self.at_least_version("7.8"): | |||
self.environment["XPACK_FLEET_AGENTS_ELASTICSEARCH_HOST"] = urls[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Elastic Agent container crashes in 7.8, and I suspect it might be because these settings were named differently. I just can't find it, https://www.elastic.co/guide/en/kibana/7.10/fleet-settings-kb.html doesn't exist for previous versions...
We might just as well support >=7.10 only and revisit if needed for earlier version?
The error is pretty clear, thou:
localtesting_7.8.1_elastic-agent | {"statusCode":404,"error":"Not Found","message":"Not Found"}{"statusCode":404,"error":"Not Found","message":"Not Found"}{"statusCode":404,"error":"Not Found","message":"Not Found"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this PR do?
Adds Elastic Agent into apm-integration-testing using
--with-elastic-agent
option. Elastic Agent is configured in fleet mode with system logs and metrics integrations, the usual defaults.Why is it important?
For testing integrations with Elastic Agent eg APM.
Some things to note:
elastic-agent.yml
can't be bind mounted into the container as agent tries to move it out of the way when fleeting. As a result it seems any customizations will have to happen after the agent is running - this will be follow as a separate effort for Add Elastic Agent container #1004.Elastic Agent might not be running; unable to trigger restart
Related issues
related #1004