Skip to content

Mass Installation with Configuration Management

Free
Starter
Professional

When deploying the Bleemeo agent across many servers, configuration management tools like Ansible, Puppet, or Chef can automate the installation process. This page provides ready-to-use configurations for each tool.

Before deploying, you’ll need:

  • Your Bleemeo Account ID and Registration Key (available in your Bleemeo dashboard)
  • Access to your configuration management infrastructure

Bleemeo provides an official Ansible role available on Ansible Galaxy.

Install the role:

Terminal window
ansible-galaxy install bleemeo.agent

Create a playbook deploy-bleemeo.yml:

---
- hosts: all
become: yes
vars:
bleemeo_account_id: "YOUR_ACCOUNT_ID"
bleemeo_registration_key: "YOUR_REGISTRATION_KEY"
roles:
- bleemeo.agent

Run the playbook:

Terminal window
ansible-playbook -i inventory deploy-bleemeo.yml

If you prefer not to use the Galaxy role, here’s a complete playbook:

---
- hosts: all
become: yes
vars:
bleemeo_account_id: "YOUR_ACCOUNT_ID"
bleemeo_registration_key: "YOUR_REGISTRATION_KEY"
tasks:
# Debian/Ubuntu
- name: Add Bleemeo GPG key (Debian/Ubuntu)
ansible.builtin.apt_key:
url: https://packages.bleemeo.com/bleemeo-agent/bleemeo-keyring.asc
state: present
when: ansible_os_family == "Debian"
- name: Add Bleemeo repository (Debian/Ubuntu)
ansible.builtin.apt_repository:
repo: "deb https://packages.bleemeo.com/bleemeo-agent {{ ansible_distribution_release }} main"
state: present
filename: bleemeo-agent
when: ansible_os_family == "Debian"
- name: Install Bleemeo agent (Debian/Ubuntu)
ansible.builtin.apt:
name: bleemeo-agent
state: present
update_cache: yes
when: ansible_os_family == "Debian"
# Fedora
- name: Add Bleemeo repository (Fedora)
ansible.builtin.yum_repository:
name: bleemeo-agent
description: Bleemeo Agent Repository
baseurl: https://packages.bleemeo.com/bleemeo-agent/fedora/$releasever/$basearch/
gpgcheck: yes
gpgkey: https://packages.bleemeo.com/bleemeo-agent/centos/gpg
when: ansible_os_family == "RedHat" and ansible_distribution == "Fedora"
# RHEL/CentOS/Rocky/Alma
- name: Add Bleemeo repository (RHEL/CentOS)
ansible.builtin.yum_repository:
name: bleemeo-agent
description: Bleemeo Agent Repository
baseurl: https://packages.bleemeo.com/bleemeo-agent/centos/$releasever/$basearch/
gpgcheck: yes
gpgkey: https://packages.bleemeo.com/bleemeo-agent/centos/gpg
when: ansible_os_family == "RedHat" and ansible_distribution != "Fedora"
- name: Install Bleemeo agent (RedHat family)
ansible.builtin.yum:
name: bleemeo-agent
state: present
when: ansible_os_family == "RedHat"
# Configuration (all systems)
- name: Create Bleemeo configuration directory
ansible.builtin.file:
path: /etc/glouton/conf.d
state: directory
mode: '0755'
- name: Configure Bleemeo agent
ansible.builtin.copy:
dest: /etc/glouton/conf.d/30-install.conf
content: |
bleemeo:
account_id: "{{ bleemeo_account_id }}"
registration_key: "{{ bleemeo_registration_key }}"
mode: '0640'
notify: Restart Glouton
- name: Enable and start Glouton service
ansible.builtin.systemd:
name: glouton
enabled: yes
state: started
handlers:
- name: Restart Glouton
ansible.builtin.systemd:
name: glouton
state: restarted

Store your credentials securely using Ansible Vault:

Terminal window
ansible-vault create group_vars/all/bleemeo_secrets.yml

Add your credentials:

bleemeo_account_id: "YOUR_ACCOUNT_ID"
bleemeo_registration_key: "YOUR_REGISTRATION_KEY"

Run with vault:

Terminal window
ansible-playbook -i inventory deploy-bleemeo.yml --ask-vault-pass

Create a Puppet module for Bleemeo agent deployment.

Module structure:

bleemeo/
├── manifests/
│ └── init.pp
├── files/
└── templates/
└── glouton.conf.epp

manifests/init.pp:

class bleemeo (
String $account_id,
String $registration_key,
Boolean $manage_repo = true,
String $ensure = 'present',
) {
# Repository management
if $manage_repo {
case $facts['os']['family'] {
'Debian': {
apt::source { 'bleemeo-agent':
location => 'https://packages.bleemeo.com/bleemeo-agent',
release => $facts['os']['distro']['codename'],
repos => 'main',
key => {
'id' => 'BLEEMEO_GPG_KEY_ID',
'source' => 'https://packages.bleemeo.com/bleemeo-agent/bleemeo-keyring.asc',
},
before => Package['bleemeo-agent'],
}
}
'RedHat': {
$repo_path = $facts['os']['name'] ? {
'Fedora' => 'fedora',
default => 'centos',
}
yumrepo { 'bleemeo-agent':
descr => 'Bleemeo Agent Repository',
baseurl => "https://packages.bleemeo.com/bleemeo-agent/${repo_path}/\$releasever/\$basearch/",
gpgcheck => 1,
gpgkey => 'https://packages.bleemeo.com/bleemeo-agent/centos/gpg',
enabled => 1,
before => Package['bleemeo-agent'],
}
}
default: {
fail("Unsupported OS family: ${facts['os']['family']}")
}
}
}
# Package installation
package { 'bleemeo-agent':
ensure => $ensure,
}
# Configuration directory
file { '/etc/glouton/conf.d':
ensure => directory,
mode => '0755',
}
# Agent configuration
file { '/etc/glouton/conf.d/30-install.conf':
ensure => file,
mode => '0640',
content => epp('bleemeo/glouton.conf.epp', {
'account_id' => $account_id,
'registration_key' => $registration_key,
}),
require => [Package['bleemeo-agent'], File['/etc/glouton/conf.d']],
notify => Service['glouton'],
}
# Service management
service { 'glouton':
ensure => running,
enable => true,
require => Package['bleemeo-agent'],
}
}

templates/glouton.conf.epp:

<%- | String $account_id, String $registration_key | -%>
bleemeo:
account_id: "<%= $account_id %>"
registration_key: "<%= $registration_key %>"

In your node manifest or Hiera data:

class { 'bleemeo':
account_id => 'YOUR_ACCOUNT_ID',
registration_key => 'YOUR_REGISTRATION_KEY',
}

Or with Hiera (data/common.yaml):

bleemeo::account_id: 'YOUR_ACCOUNT_ID'
bleemeo::registration_key: 'YOUR_REGISTRATION_KEY'

Encrypt sensitive data with Hiera eyaml:

Terminal window
eyaml encrypt -s 'YOUR_REGISTRATION_KEY'

Add to your Hiera data:

bleemeo::account_id: 'YOUR_ACCOUNT_ID'
bleemeo::registration_key: >
ENC[PKCS7,encrypted_value_here]

Create a Chef cookbook for Bleemeo agent deployment.

Cookbook structure:

bleemeo/
├── metadata.rb
├── recipes/
│ └── default.rb
├── attributes/
│ └── default.rb
└── templates/
└── glouton.conf.erb

metadata.rb:

name 'bleemeo'
maintainer 'Your Organization'
maintainer_email 'ops@example.com'
license 'Apache-2.0'
description 'Installs and configures Bleemeo monitoring agent'
version '1.0.0'
supports 'ubuntu'
supports 'debian'
supports 'centos'
supports 'redhat'
supports 'fedora'

attributes/default.rb:

default['bleemeo']['account_id'] = nil
default['bleemeo']['registration_key'] = nil
default['bleemeo']['manage_repo'] = true

recipes/default.rb:

#
# Cookbook:: bleemeo
# Recipe:: default
#
# Validate required attributes
if node['bleemeo']['account_id'].nil? || node['bleemeo']['registration_key'].nil?
raise 'bleemeo account_id and registration_key must be set'
end
# Repository setup
if node['bleemeo']['manage_repo']
case node['platform_family']
when 'debian'
apt_repository 'bleemeo-agent' do
uri 'https://packages.bleemeo.com/bleemeo-agent'
distribution node['lsb']['codename']
components ['main']
key 'https://packages.bleemeo.com/bleemeo-agent/bleemeo-keyring.asc'
end
when 'rhel', 'fedora'
repo_path = node['platform'] == 'fedora' ? 'fedora' : 'centos'
yum_repository 'bleemeo-agent' do
description 'Bleemeo Agent Repository'
baseurl "https://packages.bleemeo.com/bleemeo-agent/#{repo_path}/$releasever/$basearch/"
gpgkey 'https://packages.bleemeo.com/bleemeo-agent/centos/gpg'
gpgcheck true
enabled true
end
end
end
# Install the agent
package 'bleemeo-agent' do
action :install
end
# Create configuration directory
directory '/etc/glouton/conf.d' do
mode '0755'
recursive true
end
# Configure the agent
template '/etc/glouton/conf.d/30-install.conf' do
source 'glouton.conf.erb'
mode '0640'
variables(
account_id: node['bleemeo']['account_id'],
registration_key: node['bleemeo']['registration_key']
)
notifies :restart, 'service[glouton]', :delayed
end
# Manage the service
service 'glouton' do
action [:enable, :start]
end

templates/glouton.conf.erb:

bleemeo:
account_id: "<%= @account_id %>"
registration_key: "<%= @registration_key %>"

In your node’s run list or role:

node.override['bleemeo']['account_id'] = 'YOUR_ACCOUNT_ID'
node.override['bleemeo']['registration_key'] = 'YOUR_REGISTRATION_KEY'

Or using a wrapper cookbook with encrypted data bags:

# In your wrapper cookbook
bleemeo_secrets = data_bag_item('secrets', 'bleemeo')
node.override['bleemeo']['account_id'] = bleemeo_secrets['account_id']
node.override['bleemeo']['registration_key'] = bleemeo_secrets['registration_key']
include_recipe 'bleemeo::default'

Create an encrypted data bag:

Terminal window
knife data bag create secrets bleemeo --secret-file /path/to/secret_key

Contents:

{
"id": "bleemeo",
"account_id": "YOUR_ACCOUNT_ID",
"registration_key": "YOUR_REGISTRATION_KEY"
}

All configuration management examples above create a minimal configuration. You can extend the configuration file to include additional settings:

bleemeo:
account_id: "YOUR_ACCOUNT_ID"
registration_key: "YOUR_REGISTRATION_KEY"
# Optional: Set a custom agent name
agent:
public_ip_indicator: "https://api.ipify.org"
# Optional: Configure service monitoring
service:
- type: "mysql"
username: "monitoring"
password: "secret"

See the Agent Configuration page for all available options.

After deployment, verify the agent is running and connected:

Terminal window
# Check service status
systemctl status glouton
# View agent logs
journalctl -u glouton -f
# Check agent local UI (if enabled)
curl -s http://localhost:8015/

The agent should appear in your Bleemeo dashboard within a few minutes.