Skip to content

Netdata for monitoring

Netdata provides an easy and powerful way to monitor servers. During server provisioning using Terraform, we provide a cloud-init configuration file which looks like this:

#cloud-config
users:
  - name: ansible
    groups: users, admin
    sudo: ALL=(ALL) NOPASSWD:ALL
    shell: /bin/bash
    ssh_authorized_keys:
      - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCq8c4ByK/AiDCeep1xdwaq3Hv3Rxbqga0iB3VPMENE7AEBpwExDGxUXUbYEOjTfy1aNhupHp4GVwIeL/WDQzPbSgnbT9RVqjhMm+XdWoaX+0c2v32Q8UBYvFsh44bhnbfFPsI5LOo3TrY5McgC8DpeUrf0nxIEaQsztKP4kqWmL4wogSu4NiaNqZqUuw/tAKcGd06VkNwEr+KqLqeBYuM09i3sJ9jUiE1q3f/1ARNrN27E8UbcQSCIDGYsJxD6Xun0lcXnz1o8mHJWIF2JkqxuIiL0SpdP+cjUvsPYbCiU7H9dChB+gomSYzLCpdY+a0= ansible@ansible
package_update: true
package_upgrade: true
apt_upgrade: true
packages:
  - ufw
runcmd:
  - wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --stable-channel --claim-token 9eyW_gMRefdHz8jhK5tEb --claim-url https://app.netdata.cloud
  - ufw allow 'OpenSSH'
  - ufw enable
  - mkdir -p /home/ansible/.docker/cli-plugins/
  - wget -O /tmp/docker-compose https://github.com/docker/compose/releases/download/v2.24.5/docker-compose-linux-aarch64
  - cp /tmp/docker-compose /home/ansible/.docker/cli-plugins/docker-compose
  - chown ansible:ansible -R /home/ansible/.docker
  - chmod +x /home/ansible/.docker/cli-plugins/docker-compose
When the server starts, it will provision the Ansible user, provide a public SSH key, and perform other tasks. One of these tasks is to install the Netdata agent and connect it to the Netdata Cloud server, where we can monitor server health and performance.

Server Monitoring
Server Monitoring with NetData