I have tried this on a couple different GCP instances with the same error below
ffoti@ep-test-gcp-debian:~$ sudo rpm -vi elastic-agent-7.10.0-x86_64.rpm
sudo: rpm: command not found
ffoti@ep-test-gcp-debian:~$ curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-7.10.0-amd64.deb
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 90.4M 100 90.4M 0 0 74.7M 0 0:00:01 0:00:01 --:--:-- 74.7M
ffoti@ep-test-gcp-debian:~$ sudo dpkg -i elastic-agent-7.10.0-amd64.deb
Selecting previously unselected package elastic-agent.
(Reading database ... 38712 files and directories currently installed.)
Preparing to unpack elastic-agent-7.10.0-amd64.deb ...
Unpacking elastic-agent (7.10.0) ...
Setting up elastic-agent (7.10.0) ...
Processing triggers for systemd (241-7~deb10u4) ...
ffoti@ep-test-gcp-debian:~$ cd /usr/share/elastic-agent/bin
ffoti@ep-test-gcp-debian:/usr/share/elastic-agent/bin$
ffoti@ep-test-gcp-debian:/usr/share/elastic-agent/bin$
ffoti@ep-test-gcp-debian:/usr/share/elastic-agent/bin$ sudo ./elastic-agent install -f --kibana-url=https://2fadc60b34cf40479ee0bee875eeaab9.us-east4.gcp.elastic-cloud.com:443 --enrollment-token=Y1ZEN3ZYVUJDM28telBHWEpXZlo6WFlxYWlIRzBSQzZsTU9BNUVVV1oxUQ==
The Elastic Agent is currently in BETA and should not be used in production
Error: failed to discover the source directory for installation: missing elastic-agent
When using the RPM to install you need to switch to the enroll command, not the install command. The install command is the recommended way, which does not use the RPM.
If you download the linux *.tar.gz and run install from inside of that directory it will work. If you want to use the RPM, you should switch to: elastic-agent enroll {kibana_url} {enrollment_token}.
Note: The RPM is not the recommended installation method. It will prevent the ability to perform upgrades directly from Kibana.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.