Depends on Country wise but typical Indian govt also used ubuntu OS
Here is the offically website of ubuntu you can find more about it
Networking | Support | Tricks | Troubleshoot | Tips
1. docker should be installed
2. docker-compose also be installed
1. sudo apt-get install docker.io or sudo apt install docker.io
2. docker --version
3. sudo apt-get install docker-compose
1. create a new file prometheus.yml and copy paste below
sudo nano ~/ prometheus.yml or sudo nano /etc/prometheus/prometheus.yml
# prometheus.yml global: scrape_interval: 5s external_labels: monitor: 'my-monitor' rule_files: - 'alert.rules' scrape_configs: - job_name: 'prometheus' static_configs: - targets: ['your_server_ip:9090']
2. create a new file docker-compose.yml and copy paste below
sudo nano ~/docker-compose.yml or sudo nano /etc/prometheus/docker-compose.yml
# docker-compose.yml version: '2' services: prometheus: image: prom/prometheus:latest volumes: - ./prometheus.yml:/etc/prometheus/prometheus.yml command: - '--config.file=/etc/prometheus/prometheus.yml' ports: - '9090:9090'
cd /etc/prometheus/ or sudo ~/docker-compose up
sudo docker-compose up
http://your_server_ip:9090
node-exporter: image: prom/node-exporter ports: - '9100:9100'sudo nano ~/ prometheus.yml or sudo nano /etc/prometheus/prometheus.yml
- job_name: 'node-exporter'
static_configs:
- targets: ['node-exporter:9100']
cd /etc/prometheus/ or sudo ~/docker-compose restart
sudo docker-compose restart
sudo nano ~/docker-compose.yml or sudo nano /etc/prometheus/docker-compose.yml
copy paste at last line
grafana: image: grafana/grafana user: "0" #[ Execute id -u in terminal to find the user id from where you are invoking docker compose] volumes: - ./grafana_db:/var/lib/grafana environment: - GF_SECURITY_ADMIN_PASSWORD=yourpass depends_on: - prometheus ports: - '3000:3000'
http://your_server_ip:
3000