Archive for July, 2013

Icinga REST API and custom variables

July 9th, 2013 No comments

I’m currently working for a customer who wants review its Nagios configuration. Our goal is to create a script to schedule a downtime for all servers which have a custom variable. So, the first step is to find the list of this server! After digging into the REST’S API source code, here the snippet:


For the following hosts definition:

define host {
use generic-host
name monitoring
_roles monitoring

As you can notice, custom variables must be used in uppercase in the REST request, without the leading _.

Categories: Sysadmin Tags: ,