Mendownload binary node exported dari repository github

root@DNS-DEV:/home/DNSTECH# mkdir monitoring
root@DNS-DEV:/home/DNSTECH# cd monitoring/
root@DNS-DEV:/home/DNSTECH/monitoring# ls -l
total 0
root@DNS-DEV:/home/DNSTECH/monitoring#
root@DNS-DEV:/home/DNSTECH/monitoring# curl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest| grep browser_download_url|grep linux-amd64|cut -d '"' -f 4|wget -qi -
root@DNS-DEV:/home/DNSTECH/monitoring# ls -l
total 10128
-rw-r--r-- 1 root root 10368103 Jul 17 19:16 node_exporter-1.6.1.linux-amd64.tar.gz
root@DNS-DEV:/home/DNSTECH/monitoring#
root@DNS-DEV:/home/DNSTECH/monitoring# tar -xvf node_exporter*.tar.gz
node_exporter-1.6.1.linux-amd64/
node_exporter-1.6.1.linux-amd64/NOTICE
node_exporter-1.6.1.linux-amd64/node_exporter
node_exporter-1.6.1.linux-amd64/LICENSE
root@DNS-DEV:/home/DNSTECH/monitoring#
root@DNS-DEV:/home/DNSTECH/monitoring# ls -l
total 10132
drwxr-xr-x 2 1001 1002     4096 Jul 17 19:16 node_exporter-1.6.1.linux-amd64
-rw-r--r-- 1 root root 10368103 Jul 17 19:16 node_exporter-1.6.1.linux-amd64.tar.gz
root@DNS-DEV:/home/DNSTECH/monitoring#
root@DNS-DEV:/home/DNSTECH/monitoring# cd  node_exporter*/
root@DNS-DEV:/home/DNSTECH/monitoring/node_exporter-1.6.1.linux-amd64# ls -l
total 19572
-rw-r--r-- 1 1001 1002    11357 Jul 17 19:15 LICENSE
-rw-r--r-- 1 1001 1002      463 Jul 17 19:15 NOTICE
-rwxr-xr-x 1 1001 1002 20025119 Jul 17 19:11 node_exporter
root@DNS-DEV:/home/DNSTECH/monitoring/node_exporter-1.6.1.linux-amd64#
root@DNS-DEV:/home/DNSTECH/monitoring/node_exporter-1.6.1.linux-amd64# sudo cp node_exporter /usr/local/bin
root@DNS-DEV:/home/DNSTECH/monitoring/node_exporter-1.6.1.linux-amd64# cd
root@DNS-DEV:~#
root@DNS-DEV:/home/DNSTECH# node_exporter --version
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
root@DNS-DEV:/home/DNSTECH#
root@DNS-DEV:/home/DNSTECH# sudo tee /etc/systemd/system/node_exporter.service <<EOF
 [Unit]
 Description=Prometheus Node Exporter
 After=network.target
 User=prometheus
 Group=prometheus

 [Service]
 Type=simple
 Restart=always
 ExecStart=/bin/sh -c '/usr/local/bin/node_exporter'

 [Install]
 WantedBy=multi-user.target
EOF
root@DNS-DEV:/home/DNSTECH# sudo systemctl daemon-reload
root@DNS-DEV:/home/DNSTECH# sudo systemctl start node_exporter
root@DNS-DEV:/home/DNSTECH# sudo systemctl status node_exporter
● node_exporter.service - Prometheus Node Exporter
     Loaded: loaded (/etc/systemd/system/node_exporter.service; disabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-11-11 05:22:29 WIB; 4s ago
   Main PID: 4160625 (sh)
      Tasks: 5 (limit: 4660)
     Memory: 2.5M
        CPU: 27ms
     CGroup: /system.slice/node_exporter.service
             ├─4160625 /bin/sh -c /usr/local/bin/node_exporter
             └─4160626 /usr/local/bin/node_exporter

Nov 11 05:22:29 DNS-DEV sh[4160626]: ts=2023-11-10T22:22:29.673Z caller=node_exporter.go:117 level=info collector=t>
Nov 11 05:22:29 DNS-DEV sh[4160626]: ts=2023-11-10T22:22:29.673Z caller=node_exporter.go:117 level=info collector=t>
Nov 11 05:22:29 DNS-DEV sh[4160626]: ts=2023-11-10T22:22:29.673Z caller=node_exporter.go:117 level=info collector=t>
Nov 11 05:22:29 DNS-DEV sh[4160626]: ts=2023-11-10T22:22:29.673Z caller=node_exporter.go:117 level=info collector=u>
Nov 11 05:22:29 DNS-DEV sh[4160626]: ts=2023-11-10T22:22:29.673Z caller=node_exporter.go:117 level=info collector=u>
Nov 11 05:22:29 DNS-DEV sh[4160626]: ts=2023-11-10T22:22:29.673Z caller=node_exporter.go:117 level=info collector=v>
Nov 11 05:22:29 DNS-DEV sh[4160626]: ts=2023-11-10T22:22:29.673Z caller=node_exporter.go:117 level=info collector=x>
Nov 11 05:22:29 DNS-DEV sh[4160626]: ts=2023-11-10T22:22:29.673Z caller=node_exporter.go:117 level=info collector=z>
Nov 11 05:22:29 DNS-DEV sh[4160626]: ts=2023-11-10T22:22:29.675Z caller=tls_config.go:274 level=info msg="Listening>
Nov 11 05:22:29 DNS-DEV sh[4160626]: ts=2023-11-10T22:22:29.675Z caller=tls_config.go:277 level=info msg="TLS is di>

root@DNS-DEV:/home/DNSTECH#

Leave a Reply

Your email address will not be published. Required fields are marked *