javax4u / customer-meetings

2 stars 1 forks source link

Grafana with Prometheus #117

Open apoorvpandey-ap opened 2 years ago

apoorvpandey-ap commented 2 years ago

Connect www6c with Grafana cloud

apoorvpandey-ap commented 2 years ago

Install node exporter

Download the node_exporter compressed package. wget https://github.com/prometheus/node_exporter/releases/download/v*/node_exporter-*.*-amd64.tar.gz Extract the node_exporter binary tar xvfz node_exporter-*.*-amd64.tar.gz cd node_exporter-*.*-amd64 chmod +x node_exporter Run the node_exporter binary ./node_exporter Test that metrics are being exported on port 9100. curl http://localhost:9100/metrics

apoorvpandey-ap commented 2 years ago

Install Prometheus

cd /opt/prometheus
wget https://github.com/prometheus/prometheus/releases/download/v2.39.1/prometheus-2.39.1.linux-amd64.tar.gz
tar xvf prometheus-2.39.1.linux-amd64.tar.gz
./prometheus --config.file=./prometheus.yml --web.listen-address=:8083

edit yml file to show own metrics

vi /opt/prometheus/prometheus-2.39.1.linux-amd64/prometheus.yml
- job_name: "prometheus"

### to allow port 8083 through firewall

sudo ufw allow 8083/tcp