Skip to content

goldeagle/ansible-collection-metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Collections - goldeagle.metrics | 中文

Ansible collections for metric monitoring & IoT data streaming.

Table of Contents

  1. Description
  2. Technical Overview
    2.1. Softwares Intro
    2.2. Supported OSs
  3. Quick Start
  4. Software Lists
    4.1. Dashboard
    4.2. Time Series Database
    4.3. Stream Process

1. Description

Ansible collections for metric monitoring & IoT data stream. Includes some popular softwares such like prometheus or grafana.

2. Technical Overview

2.1. Softwares Intro

  • 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

2.2. Tested OSs

  • Debian 10
  • Ubuntu 20.04.1
  • Kali 2020.3
  • CentOS 8.2
  • Fedora 32-1.6
  • Gentoo
  • MacOS

3. Quick Start

3.1. Install ansible

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

3.2. Add a user for 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 }}

3.3. Install this collection

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

4. Software Lists

4.1. Dashboard

  • chronograf
  • grafana

4.2. Time Series Database

  • influxdb
  • loki
  • prometheus
  • tdengine

4.3. Stream Process

  • tell me some

About

Ansible collection for metrics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published