- Assumptions
- Create necessary temp dirs
- Build Custom Beat
- Download any other beats you need (filebeat & metricbeat are minimums)
- Build agent
- you want a custom version of elastic-agent
- you want a custom version of one of the beats in elastic-agent
- beats repo is
~/src/beats
- elastic-agent repo is
~/src/elastic-agent
mkdir -p ~/tmp/artifacts
mkdir -p ~/tmp/agent_drop_path
-
cd to beats directory
cd ~/src/beats
-
checkout tag that matches the version you want
git checkout v8.7.0
-
Make changes you want
-
Build your beat
cd x-pack/metricbeat DEV=true SNAPSHOT=false PLATFORMS="linux/arm64" mage -v clean package cp build/distributions/metricbeat-8.7.0-linux-arm64.tar.gz* ~/tmp/artifacts
cd ~/tmp/artifacts
curl -O -J -L https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.7.0-linux-arm64.tar.gz
curl -O -J -L https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.7.0-linux-arm64.tar.gz.sha512
-
change to agent directory
cd ~/src/elastic-agent
-
check out version to match the beat
git checkout v8.7.0
-
add your beats to agentdroppath
cp ~/tmp/artifacts/* ~/tmp/agent_drop_path
-
build elastic-agent
DEV=true AGENT_DROP_PATH=/Users/hinman/tmp/agent_drop_path PLATFORMS="linux/arm64" PACKAGES="tar.gz" mage -v clean package
-
custom elastic-agent distribuion is in
build/distribuitons