Skip to content

Commit

Permalink
Merge pull request #2 from tbauriedel/add-influxdb2
Browse files Browse the repository at this point in the history
Add InfluxDB
  • Loading branch information
tbauriedel authored Sep 19, 2024
2 parents 0ba0ea7 + 5e05b3f commit 830684d
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Provider: `VirtualBox`
The following ports will be forwarded into the Vagrant box:
* 80 (guest) => 80 (host)
* 443 (guest) => 443 (host) // Webserver with TLS not configured via default
* 5665 (guest) => 5665 (guest)
* 5665 (guest) => 5665 (host)
* 8086 (guest) => 8086 (host)

## Credentials

Expand All @@ -22,6 +23,7 @@ Default credentials if not customized (Format: `user` - `password`):
* IcingaDB-redis password => `redis-pass`
* Mysql `*.*` user => `poweruser` - `poweruser`
* Mysql root user: `root` - `root0815!`
* InfluxDB admin user: `admin` - `admin12345!`

## Components

Expand All @@ -33,9 +35,11 @@ The most common used components are pre-installed and configured.
* Icingadb Redis
* Icinga Web 2
* Icinga Director
* Metrics (Ansible collection `tbauriedel.gographite`)
* Graphite (Ansible collection `tbauriedel.gographite`)
* go-carbon
* carbonapi
* InfluxDB (Ansible collection `tbauriedel.influxdb2`)
* InfluxDB v2

## Requirements

Expand Down
1 change: 1 addition & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ Vagrant.configure("2") do |config|
config.vm.network "forwarded_port", guest: 80, host: 80
config.vm.network "forwarded_port", guest: 443, host: 443
config.vm.network "forwarded_port", guest: 5665, host: 5665
config.vm.network "forwarded_port", guest: 8086, host: 8086
end
2 changes: 2 additions & 0 deletions ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
roles:
- tbauriedel.gographite.gocarbon
- tbauriedel.gographite.carbonapi
- tbauriedel.influxdb2.repos
- tbauriedel.influxdb2.influxdb2
- geerlingguy.mysql
- icinga.icinga.repos
- icinga.icinga.icinga2
Expand Down
6 changes: 6 additions & 0 deletions ansible/vars/icinga2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ icinga2_features:
port: 2003
enable_send_thresholds: true
enable_send_metadata: true
- name: influxdb2
host: localhost
port: 8086
bucket: icinga2
organization: monitoring
auth_token: "AHDUKAGSszifgj21711sfztGASg2"
icinga2_objects:
- name: poweruser
type: ApiUser
Expand Down
25 changes: 25 additions & 0 deletions ansible/vars/influxdb2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
influxdb_influxdb2_host: "http://localhost:8086"
influxdb_influxdb2_primary_user:
name: admin
password: 'admin12345!'
influxdb_influxdb2_primary_org: default
influxdb_influxdb2_primary_bucket: default
influxdb_influxdb2_retention: 0
influxdb_influxdb2_admin_token: AHDUKAGSszifgj21711sfztGASg2

influxdb_influxdb2_orgs:
- name: monitoring
desc: "Monitoring organization"
token: "{{ influxdb_influxdb2_admin_token }}"

influxdb_influxdb2_buckets:
- name: icinga2
org: monitoring
state: present
desc: "Icinga 2 perfdata"
retention:
type: expire
everySeconds: 1209600 # 2 weeks
shardGroupDurationSeconds: 172800 # 2 days
token: "{{ influxdb_influxdb2_admin_token }}"
1 change: 1 addition & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ roles:
collections:
- name: icinga.icinga
- name: tbauriedel.gographite
- name: tbauriedel.influxdb2

0 comments on commit 830684d

Please sign in to comment.