Advertisement
karthikvee

Prometheus

Aug 11th, 2021
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. sudo hostnamectl set-hostname prometheus
  2. 2 exit
  3. 3 sudo apt update
  4. 4 wget
  5. 5 sudo useradd --system --no-create-home --shell /usr/sbin/nologin prometheus
  6. 6 ls
  7. 7 tar xvzf prometheus-2.28.0.linux-amd64.tar.gz
  8. 8 ls
  9. 9 ls prometheus-2.28.0.linux-amd64
  10. 10 ls -lh prometheus-2.28.0.linux-amd64
  11. 11 sudo mv -v prometheus-2.28.0.linux-amd64 /opt/prometheus
  12. 12 ls
  13. 13 ls /opt/
  14. 14 ls -lh /opt/prometheus/
  15. 15 sudo chown -Rfv root:root /opt/prometheus
  16. 16 /opt/prometheus
  17. 17 sudo chmod -Rfv 0755 /opt/prometheus
  18. 18 sudo vi /opt/prometheus/prometheus.yml
  19. 19 sudo mkdir -v /opt/prometheus/data
  20. 20 sudo chown -Rfv prometheus:prometheus /opt/prometheus/data
  21. 21 sudo vi /etc/systemd/system/prometheus.service
  22. 22 sudo systemctl daemon-reload
  23. 23 sudo systemctl start prometheus.service
  24. 24 sudo systemctl status prometheus.service
  25. 25 sudo systemctl enable prometheus.service
  26. 26 netstat -tulno
  27. 27 netstat -tulnp
  28. 28 sudo apt install net-tools
  29. 29 netstat -tulnp
  30. 30 wget https://github.com/prometheus/node_exporter/releases/download/v1.1.2/node_exporter-1.1.2.linux-amd64.tar.gz
  31. 31 tar xzf node_exporter-1.1.2.linux-amd64.tar.gz
  32. 32 ls
  33. 33 ls -lh node_exporter-1.1.2.linux-amd64
  34. 34 sudo mv -v node_exporter-1.1.2.linux-amd64/node_exporter /usr/local/bin/
  35. 35 sudo chown root:root /usr/local/bin/node_exporter
  36. 36 node_exporter --version
  37. 37 sudo vi /etc/systemd/system/node-exporter.service
  38. 38 sudo systemctl daemon-reload
  39. 39 sudo systemctl start node-exporter.service
  40. 40 sudo systemctl enable node-exporter.service
  41. 41 sudo systemctl status node-exporter.service
  42. 42 sudo netstat -tulnp
  43. 43 sudo vi /opt/prometheus/prometheus.yml
  44. 44 sudo systemctl restart prometheus.service
  45. 45 sudo systemctl status prometheus.service
  46. 46 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement