Skip to content

vechr/node-observability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Monitoring with Ansible

  • Install Ansible

    brew install ansible
  • Install VMWare Fusion You can download VMWare Fusion free Edition for learning purpose. You need to register your account to get the License

  • Install Vagrant

    brew install --cask vagrant
    vagrant --version

    Install VMWare Utility

    brew install vagrant-vmware-utility

    You need to setup vagrant plugin vmware

    vagrant plugin install vagrant-vmware-desktop
    vagrant plugin list

Create Key

ssh-keygen -f ./vagrant/key/vagrant-key

Setup the node server

For this example we used vagrant and use plugin vmware-desktop since we setup the node in Apple Mac M1

# Up the node server
vagrant up

# See the status of the server
vagrant status

# SSH to the node server
vagrant ssh app-1
vagrant ssh app-2
vagrant prometheus
vagrant grafana
vagrant grafana-loki

ssh-add ./vagrant/key/vagrant-key
ssh vagrant@192.168.56.2
ssh vagrant@192.168.56.3
ssh vagrant@192.168.56.4
ssh vagrant@192.168.56.5
ssh vagrant@192.168.56.6

# remove all node 
vagrant destroy

Setup Tool using Ansible

cd ansible

Install Node Exporter

ansible-playbook -i inventory playbooks/node-exporter.yaml

Install Prometheus

ansible-playbook -i inventory playbooks/prometheus-server.yaml

Install Grafana Loki

ansible-playbook -i inventory playbooks/grafana-loki.yaml

Install Promtail

ansible-playbook -i inventory playbooks/promtail.yaml

Install Grafana

ansible-playbook -i inventory playbooks/grafana.yaml