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!
===Membuat backgroud service prometheus=== Kita buatkan file servicenya : sudo nano /etc/systemd/system/prometheus.service sehingga isinya secara sederhana seperti berikut ini : #Prometheus Service [Unit] Description=Prometheus Documentation=https://prometheus.io/docs/introduction/overview/ Wants=network-online.target After=network-online.target [Service] User=prometheus Group=prometheus Type=simple ExecStart=/usr/local/bin/prometheus \ --config.file /etc/prometheus/prometheus.yml \ --storage.tsdb.path /var/lib/prometheus/ \ --web.console.templates=/etc/prometheus/consoles \ --web.console.libraries=/etc/prometheus/comnsole_libraries [Install] WantedBy=multi-user.target Karena ada konfigurasi baru maka prometheus perlu di reload sudo systemctl daemon-reload Kemudaian cek status prometheus sudo systemctl status prometheus.service Disini statusnya masih dalam keadaan inactive β prometheus.service - Prometheus Loaded: loaded (/etc/systemd/system/prometheus.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: https://prometheus.io/docs/introductions/overview/ Agar stausnya active dan servicenya enable maka jalankan command berikut : sudo systemctl enable --now prometheus.service hasilnya : Created symlink /etc/systemd/system/multi-user.target.wants/prometheus.service β /etc/systemd/system/prometheus.service. Cek sekali lagi : sudo systemctl status prometheus hasilmya sudah running : β prometheus.service - Prometheus Loaded: loaded (/etc/systemd/system/prometheus.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2023-10-23 08:36:04 UTC; 2s ago Docs: https://prometheus.io/docs/introductions/overview/ Main PID: 5597 (prometheus) Tasks: 5 (limit: 2252) Memory: 50.9M CGroup: /system.slice/prometheus.service ββ5597 /usr/local/bin/prometheus --config.file /etc/prometheus/prometheus.yml --storage.tsdb.path /var/lib/promethe> Oct 23 08:36:04 pcbuntu systemd[1]: Started Prometheus. Selanjutnya cek dan validasi sesuai port default di 9090 degan cara : sudo lsof -n -i | grep prometheus menghasilkan : prometheu 2872 prometheus 7u IPv6 36798 0t0 TCP *:9090 (LISTEN) prometheu 2872 prometheus 11u IPv4 37901 0t0 TCP 127.0.0.1:56360->127.0.0.1:9090 (ESTABLISHED) prometheu 2872 prometheus 12u IPv6 37902 0t0 TCP 127.0.0.1:9090->127.0.0.1:56360 (ESTABLISHED) Dapat dilihat port server yang akan dimonitor sudah aktif, selanjutnya coba akses ip_server:9090. Sebelumnya cek dulu ip server menggunakan : hostname -I misal hasilnya : 10.10.10.7 Dapat di akses menggunakan browser 10.10.10.7:9090 maka akan terbuka halaman Prometheus namun msh belum dilengkap metric-metric untuk memonitor system server, seperti cpu, memory, hardisk dan sebagainya. Sampai pada tahap ini perispan Prometheus sudah selesai.
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