Ansible Collections - goldeagle.metrics | 中文
Ansible collections for metric monitoring & IoT data streaming.
- Description
- Technical Overview
2.1. Softwares Intro
2.2. Supported OSs - Quick Start
- Software Lists
4.1. Dashboard
4.2. Time Series Database
4.3. Stream Process
Ansible collections for metric monitoring & IoT data stream. Includes some popular softwares such like prometheus or grafana.
- chronograf - a dashboard in TICK stack
- grafana - the most popular metric monitoring dashboard
- influxdb - time series database in TICK stack
- loki - a prometheus like time series database for logging
- prometheus - the most popular metric time series database
- tdengine - a fast distributed time series database system for IoT scenes
- telegraf - a metrics gathering agent in TICK stack
- Debian 10
- Ubuntu 20.04.1
- Kali 2020.3
- CentOS 8.2
- Fedora 32-1.6
- Gentoo
- MacOS
First of all, download "ansible"
- Debian & Ubuntu:
$ sudo apt install ansible
- Centos 8 & Fedora 32:
$ sudo dnf install ansible
- MacOS:
$ brew install ansible
- From github repository:
$ git clone https://github.com/ansible/ansible
Add an ansible user:
$ sudo useradd {{ your_ansible_user }}-m -G users,sudo -s /bin/bash
$ sudo passwd {{ your_ansible_user }}
Become this ansible user:
$ sudo su - {{ your_ansible_user }}
$ mkdir -p ~/.ssh
Generate ssh key pair:
$ ssh-keygen -t rsa -b 4096 -C "{{ your_ansible_user }}"
Deploy the pub key:
$ scp .ssh/id_rsa.pub {{ your_ansible_user }}@{{ target_host }}:~/.ssh/authorized_keys
Test it:
$ ssh -T {{ your_ansible_user }}@{{ target_host }}
Install this collection:
$ ansible-galaxy collection install goldeagle.metrics
By default, the collection will be installed here:
~/.ansible/collections/ansible_collections/goldeagle/metrics/
### 3.4. Create a playbook file to use the collection
Then you can use the roles from the collection in your playbooks (playbook.yml etc.):
```yaml
---
- name : configure and deploy the local servers and app codes
hosts: {{ your_host_group_in_your_inventory }}
remote_user: {{ your_remote_ansible_user }}
become: yes
become_method: sudo
vars:
ansible_python_interpreter: /usr/bin/python3
collections:
- goldeagle.metrics
roles:
- telegraf
- grafana
- tdengine
Run the playbook:
$ ansible-playbook -i <your_hosts_file> playbook.yml -K
- chronograf
- grafana
- influxdb
- loki
- prometheus
- tdengine
- tell me some