Find file Copy path
371c7e1 Nov 5, 2018
1 contributor

Users who have contributed to this file

153 lines (101 sloc) 3.54 KB

Icinga Vagrant in OpenStack

You'll need to have access to your OpenStack cloud platform and a ready to use local Vagrant installation.

This documentation does not cover the OpenStack basics, just the required fields for an OpenStack "vagrant up" run.


The Vagrant boxes have been tested with the NWS OpenStack cloud platform.

OS Overview


Environment: openrc

Open the OpenStack webinterface and navigate to API Access. Download the OpenStack RC File (Identity API v3) file.

OS openrc

Open a terminal if not already opened, and source the downloaded openrc file. Paste/type the account password when asked.


<enter password>

Key Pair

Open the OpenStack webinterface and navigate to API Access > Compute > Key Pairs.

OS Key Pair

Import a key pair, for demo cases use your own public SSH key.

Note the private key path. Note the name of the key pair.

Extract the default username from the image, for CentOS 7 that's just "centos".

export OS_SSH_PRIVATE_KEY_PATH="~/.ssh/id_rsa"
export OS_KEYPAIR_NAME="mif"
export OS_SSH_USER="centos"


Pick a flavor depending on your OpenStack installation. For NWS OpenStack, I'm choosing s2.medium.

export OS_FLAVOR=s2.medium


Use the CentOS 7 image. Other distributions are not supported.

export OS_IMAGE="Centos 7"


Specify the default pool for floating ips. Navigate to Network > Floating IPs and get the proper name.

OS Floating IPs

export OS_FLOATING_IP_POOL="public-network"

Note: Vagrant automatically detects the IP address from the specified floating IP pool and uses it for Puppet/Hiera provisioning for external services (HTTP, Icinga, integrations).

    icinga2: OpenStack SSH IP address detected: for hostname icinga2.novalocal
    icinga2: Patching Hiera for Puppet provisioner in /hieradata/node/icinga2.novalocal.yaml.

Security Groups

Navigate to Network > Security Groups and add a new group called vagrant.

OS Security Groups

Depending on the Vagrant box, you'd need the following opened ports:

  • 22, 80, 443 as default
  • 5665 for Icinga 2 cluster communication
  • 8003 for Graphite Web
  • 8004 for Grafana
  • 8005 for Dashing
  • 2003 for Graphite/Carbon
  • 8086 for InfluxDB
  • 5602 for Kibana
  • 9000 for Graylog


Install the OpenStack Vagrant plugin.

vagrant plugin install vagrant-openstack-provider


vagrant up --provider=openstack

If you made a mistake e.g. with wrong floating ip pool names, or anything different, just destroy the box and start over again.

vagrant destroy -f
vagrant up --provider=openstack

Complete Example


export OS_SSH_USER="centos"
export OS_SSH_PRIVATE_KEY_PATH="~/.ssh/id_rsa"
export OS_KEYPAIR_NAME="mif"

export OS_FLAVOR=s2.medium
export OS_IMAGE="Centos 7"
export OS_INTERFACE="public-network"

vagrant up --provider=openstack


The plugin allows to activate the debug logging which provides insights into every OpenStack REST API call and more.

vagrant up --provider=openstack