# Enable Docker multi-arch builds
docker run --rm --privileged tonistiigi/binfmt --install all
docker buildx create --name mybuilder --use
# Build the Docker image as Linux AMD and ARM
# and load the result to "docker images"
docker buildx build --load \
-t <collector_distribution_image_name>:<version> \
--platform=linux/amd64,linux/arm64 .
# Test the newly built image
docker run -it --rm -p 4317:4317 -p 4318:4318 \
--name otelcol <collector_distribution_image_name>:<version>
otel-custom:1.0 이라고 빌드하여서 아래와 같이 되어있다.
IMAGE ID DISK USAGE CONTENT SIZE
otel-custom:1.0 c6bd6908f678 318MB 64.1M
dpkg로 설치 후 superuser is라고 나오는 패스워드부분을 복사하고, Kibana 연결을 위한 Token 생성하는 명령어를 확인한다.
dpkg -i elasticsearch-9.2.3-arm64.deb
#########################################################
The generated password for the elastic built-in superuser is : nW*MbQKKcGpFoMIP1HGB
If this node should join an existing cluster, you can reconfigure this with
'/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token <token-here>'
after creating an enrollment token on your existing cluster.
You can complete the following actions at any time:
Reset the password of the elastic built-in superuser with
'/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic'.
Generate an enrollment token for Kibana instances with
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana'.
Generate an enrollment token for Elasticsearch nodes with
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node'.
2-2. ElasticSearch 설정
Clustering을 위해 Cluster.name 및 node.name을 수정한다. (Clustering 안하면 필요없음.)
다른서버에서 접근가능 하도록 network.host, http.host, transport.host 전부 0.0.0.0 으로 해주었다.
# 1. nfs-kernel-server 설치
$ apt install nfs-kernel-server
# 2. nfs 폴더 생성 경로는 마음대로 가능
$ mkdir -p /mnt/nfs/share
# 3. 권한 설정
$ chown nobody:nogroup /mnt/nfs/share
$ chmod 755 /mnt/nfs/share
# 4. 설정 구성
$ vi /etc/exports
nfs폴더경로 마운트할IP대역(rw,sync,no_subtree_check)
## 예시
/mnt/nfs/share 192.1.1.0/24(rw,sync,no_subtree_check)
# 5. 적용
$ exportfs -a
$ systemctl restart nfs-kernel-server
2. nfs 를 사용할 서버에 아래 명령어 수행
# 1. nfs-common 설치
$ apt install nfs-common
# 2. 마운트할 폴더 생성 마음대로 생성 가능
$ mkdir -p /mnt/nfs/share
# 3. 마운트 수행
$ mount -t nfs 192.1.1.1:/mnt/nfs/share /mnt/nfs/share
해당 폴더에 임시로 파일 생성하면 공유할 수 있는 것을 확인 가능하다.
root@192.168.1.1:/mnt/nfs/share# ls
test
root@192.168.1.2:/mnt/nfs/share# ls
test
최신 소스를 다운받고 gradle.properties 파일의 version부분을 OpenSearch 버전과 맞춰준다
#group = org.opensearch.plugin.prometheus
# An actual version of plugin
#### 이 부분을 변경해준다. ####
version = 2.19.1.0
# Leave this property empty, it is assigned during the gradle build execution (yes, it is a hack! see issue #324)
opensearch_version =
# A version of OpenSearch cluster to run BWC tests against
BWCversion = 2.17.1
# A version of plugin to deploy to BWC clusters
BWCPluginVersion = 2.17.1.0
pluginName = prometheus-exporter
pluginClassname = org.opensearch.plugin.prometheus.PrometheusExporterPlugin
pluginDescription = Prometheus exporter plugin for OpenSearch
#github_token = secret
#github_owner = TBD
#github_repo = prometheus-exporter
그 후 빌드해주면 prometheus-exporter-2.19.1.0.zip 플러그인이 나타난다.
# 빌드
./gradlew clean build
# 빌드된 파일
./build/distributions/prometheus-exporter-2.19.1.0.zip