03. 04. 2019 Valentina Da Rold Configuration Management, NetEye

Tips and Tricks for New Director Features

The new NetEye 4.5 release brings with it a new version of the Director module. There are three main new features in this module:

  • Director Health Check: a new tab in Director dashboard allows users to immediately check the current state, detecting problems or incorrect configurations
  • Multi-Instance Support: this lets you easily manage distinct environments (e.g., testing and production)
  • Baskets: this feature allows users to export, import and share all part of the Director configuration

The Director Health Check doesn’t require explanation as it is intuitive and easy to use. For this reason I’d instead like to give you some suggestions for the configuration and use of Multi-Instance and Baskets.

How to Correctly Set Up Director Multi-Instance Support

The new multi-instance feature of the Director module allows you to quickly switch between two or more distinct environments with just one click in the user interface. You will need to:

  • Ensure that you have two or more distinct Director databases (each of these should implement the Director database-schema, be accessible from your NetEye machine, and have all privileges granted to the database user)
  • Add the databases as resources to NetEye, such that all the databases are listed at Configuration > Application > Resources (alternatively you can add them to the /neteye/shared/icingaweb2/conf/resources.ini file as in this example)
    [director] type = "db" db = "mysql" host = "mariadb.neteyelocal" dbname = "director" username = "director" password = "***" charset = "utf8"   [director_testing] type = "db" db = "mysql" host = "mariadb.neteyelocal" dbname = "director_testing" username = "director" password = "***" charset = "utf8" 
  • Update the /neteye/shared/icingaweb2/conf/modules/director/config.ini file of your Director installation as follows:
    [db] resource = "director" resources = "director, director_testing"

In this way, you will be able to switch between your instances simply by selecting the desired one in the Director dashboard.

Baskets Best Practice

Configuration baskets allow the user to export, share and import a Director configuration. Baskets are intended for host and service templates, commands, definitions for automatic import, and sync.

We recommend that you create and configure Baskets when NetEye is in a state that can be easily restored, or for instance just after a new empty system has been installed. You should also avoid partial/custom baskets, since restoring them involves a number of tricky issues regarding related objects like Custom Data Fields and non-reproducible dependencies.

Creating a new Basket is quite simple:

  • Go to Director > Configuration Baskets > Create
  • Insert a self-explanatory name for the Baskets (it will affect every snapshot export)
  • Set the categories that should be included in the configuration (try to avoid Custom Selection for now, because it does not work properly)
  • Save the basket, go to the Snapshots tab, and make your first snapshot

Each snapshot is represented as a JSON object that reflects the structure of each of the categories included in the created Basket.

The Baskets feature can also be configured using the Icinga CLI:

icingacli director basket dump list restore snapshot
  • list: prints the list of available Baskets
  • dump: shows the detailed structure of the selected Basket, e.g.:
    icingacli director basket dump --name "Basket_Name"
  • snapshot: creates a new snapshot of the selected Basket, e.g.:
    icingacli director basket snapshot --name "Basket_Name"
  • restore: restores a Basket from a JSON dump provided via STDIN
Valentina Da Rold

Valentina Da Rold

Hi, I'm Valentina and I'm a Frontend Developer at Wuerth Phoenix. I started out my career applying my Cryptography skills to coding, but really quickly fell in love with the web. I have been making websites and applications since 2012 and I still can't get enough of it. Along the way I found a passion for front-end development, and I use this passion to create interfaces that solve problems. When I'm not creating beautiful solutions, I enjoy cooking or doing sport, while listening to beautiful music.

Author

Valentina Da Rold

Hi, I'm Valentina and I'm a Frontend Developer at Wuerth Phoenix. I started out my career applying my Cryptography skills to coding, but really quickly fell in love with the web. I have been making websites and applications since 2012 and I still can't get enough of it. Along the way I found a passion for front-end development, and I use this passion to create interfaces that solve problems. When I'm not creating beautiful solutions, I enjoy cooking or doing sport, while listening to beautiful music.

Leave a Reply

Your email address will not be published. Required fields are marked *

Archive