Prometheus
by Mark Nielsen
Copyright Dec 2022
The purpose of this doc is just to get Prometheus installed and monitoring mysql and apache
and maybe something else.
- Links
- Install Prometheus
- Configure
Links
- https://prometheus.io/docs/prometheus/latest/installation/
- https://scalegrid.io/blog/how-to-monitor-mysql-deployments-with-prometheus-and-grafana-at-scalegrid/
- https://geekflare.com/prometheus-grafana-setup-for-linux/
Install Prometheus
First of all you need docker running. The easiest is to use a Docker Image.
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
## NOTE: I am running Linux Mint, so I have to manually put in the equiv ubuntu lsb release
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
focal stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io
docker run hello-world
docker ps -a
docker rm competent_davinci
docker images
docker rmi hello-world
Now we install Prometheus
On the host computer:
mkdir /root/p
cd /root/p
wget https://github.com/prometheus/node_exporter/releases/download/v*/node_exporter-*.*-amd64.tar.gz
docker exec -it my_prometheus sh
/bin/prometheus -h
Configure