Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
AbahDoku Custom
Serba-serbi Windows
AbahDoku Wiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Monitoring Server
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Install node_exporter= ==Download node-exporter== Download package node-exporter caranya sama dengan cara prometheus. Maasuk ke url https://prometheus.io/download/#node_exporter kemudian copy link url https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-amd64.tar.gz, paste setelah command wget, atau command lengkapnya adalah berikut ini : wget https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-amd64.tar.gz tunggu proses downloadnya selesai. Jalankan command untuk menampilkan package yang sudah di download : ls -l ==Menyiapkan node_exporter== Extract node-exporter yang sudah di download dengan command berikut : tar xvf node_exporter-1.6.1.linux-amd64.tar.gz tunggu proses extract sampai selesai, jalan ls -l, maka akan keluhatan folder baru dengan nama node_exporter-1.6.1.linux-amd64. Masuk ke folder node_exporter-1.6.1.linux-amd64 : cd node_exporter-1.6.1.linux-amd64 jalankan ls -l akan kelihatan 1 file package yaitu node_exporter. Seperti halnya prometheus, binari package node_exporter tidak akan kita eksekusi langsung, melainkan akan kita eksekusi menggunakan service daemon agar dapat berjalan di background proses. Langkah pertama adalah memindahkan node_exportr ke folder /usr/local/bin/ sudo mv node_exporter /usr/local/bin/ Dapat dilihat hasil pemindahannya which node_exporter hasilnya /usr/local/bin/node_exporter Dapat juga dilihat vesinya menggunakan node_exporter --version hasilnya node_exporter, version 1.6.1 (branch: HEAD, revision: 4a1b77600c1873a8233f3ffb55afcedbb63b8d84) build user: root@586879db11e5 build date: 20230717-12:10:52 go version: go1.20.6 platform: linux/amd64 tags: netgo osusergo static_build ===Membuat backgroud service prometheus=== Kita buatkan file servicenya : sudo nano /etc/systemd/system/node-exporter.service sehingga isinya secara sederhana seperti berikut ini : [Unit] Description=Prometheus exporter for machine metrics [Service] Restart=always User=prometheus ExecStart=/usr/local/bin/node_exporter ExecReload=/bin/kill -HUP $MAINPID TimeoutStopSec=20s SendSIGKILL=no [Install] WantedBy=multi-user.target Karena ada konfigurasi baru maka node_exporter perlu di reload sudo systemctl daemon-reload Kemudaian cek status node-exporter.service sudo systemctl status node-exporter.service Disini statusnya masih dalam keadaan inactive β node-exporter.service - Prometheus exporter for machine metrics Loaded: loaded (/etc/systemd/system/node-exporter.service; disabled; vendor preset: enabled) Active: inactive (dead) Agar stausnya active dan servicenya enable maka jalankan command berikut : sudo systemctl enable --now node-exporter.service hasilnya : Created symlink /etc/systemd/system/multi-user.target.wants/node-exporter.service β /etc/systemd/system/node-exporter.service. Cek sekali lagi statusnya : sudo systemctl status node-exporter.service hasilnya sduah running : β node-exporter.service - Prometheus exporter for machine metrics Loaded: loaded (/etc/systemd/system/node-exporter.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2023-10-24 01:06:54 UTC; 1min 14s ago Main PID: 903200 (node_exporter) Tasks: 5 (limit: 38003) Memory: 3.0M CGroup: /system.slice/node-exporter.service ββ903200 /usr/local/bin/node_exporter Oct 24 01:06:55 pcbuntu node_exporter[903200]: ts=2023-10-24T01:06:55.004Z caller=node_exporter.go:117 level=info collector=thermal_zone Oct 24 01:06:55 pcbuntu node_exporter[903200]: ts=2023-10-24T01:06:55.004Z caller=node_exporter.go:117 level=info collector=time Oct 24 01:06:55 pcbuntu node_exporter[903200]: ts=2023-10-24T01:06:55.004Z caller=node_exporter.go:117 level=info collector=timex Oct 24 01:06:55 pcbuntu node_exporter[903200]: ts=2023-10-24T01:06:55.004Z caller=node_exporter.go:117 level=info collector=udp_queues Oct 24 01:06:55 pcbuntu node_exporter[903200]: ts=2023-10-24T01:06:55.004Z caller=node_exporter.go:117 level=info collector=uname Oct 24 01:06:55 pcbuntu node_exporter[903200]: ts=2023-10-24T01:06:55.004Z caller=node_exporter.go:117 level=info collector=vmstat Oct 24 01:06:55 pcbuntu node_exporter[903200]: ts=2023-10-24T01:06:55.004Z caller=node_exporter.go:117 level=info collector=xfs Oct 24 01:06:55 pcbuntu node_exporter[903200]: ts=2023-10-24T01:06:55.004Z caller=node_exporter.go:117 level=info collector=zfs Oct 24 01:06:55 pcbuntu node_exporter[903200]: ts=2023-10-24T01:06:55.005Z caller=tls_config.go:274 level=info msg="Listening on" address=[::]:9100 Oct 24 01:06:55 pcbuntu node_exporter[903200]: ts=2023-10-24T01:06:55.005Z caller=tls_config.go:277 level=info msg="TLS is disabled." http2=false address=[::]> lines 1-19/19 (END) Selanjutnya cek dan validasi sesuai ip dan port default untuk node_exporter di 9100 degan cara : sudo lsof -n -i | grep node hasilnya : node_expo 903200 prometheus 3u IPv6 984686 0t0 TCP *:9100 (LISTEN) Sebelumnya cek dulu ip server menggunakan : hostname -I misal hasilnya : 10.10.10.7 Dapat di akses menggunakan browser 10.10.10.7:9100/metrics maka akan terbuka halaman metrics dari node_exporter Sampai disini konfigurasi node_exporter sudah selesai, namun belum terintegrasi ke Prometheus.
Summary:
Please note that all contributions to AbahDoku Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
AbahDoku Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width