Icinga2 network monitoring

wblock@

Developer
There's a new port for Icinga2, net-mgmt/icinga2. This is an updated fork of Nagios, only written in C++ rather than PHP. The port was announced along with installation instructions here: http://lists.freebsd.org/pipermail/freebsd-ports/2014-June/093372.html.

I have it installed and running, but non-trivial configuration examples are hard to find. If anyone is using it, or interested in using it, please chime in. For a start, I'd like to figure out where it gets the definition for the ping4 test.
 
The online documentation holds plenty of configuration examples, and how to step further. http://docs.icinga.org/icinga2/latest
Most likely you're interested in the Basics, but also monitoring remote systems. If you happen to have an existing Icinga 1.x setup with agent based/less checks, make sure to read the migration hints on the documentation as well.

Unlike Icinga 1.x Icinga 2 ships plugin commands already predefined with command arguments for usage. These check commands are maintained upstream, so patches and enhancements should be sent there.

Code:
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/monitoring-basics

There's also detailed configuration available on each of these check commands:

Code:
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#plugin-check-command-ping4

(if you ever have used Debian's nagios-plugins package with Icinga 1.x, that one was providing sample check commands. We "stole" that idea, and figured it would be a good idea to add these examples upstream. Since the most tricky part was always "how do I integrate my new plugin?")

I just stumbled over this thread through a google search - if you have further questions, feel free to use one of the official support channels at https://support.icinga.org :)

kind regards,
Michael
 
dnsmichi said:
The online documentation holds plenty of configuration examples, and how to step further. http://docs.icinga.org/icinga2/latest
Most likely you're interested in the Basics, but also monitoring remote systems.

Thank you for responding.

I'm familiar with Nagios from way back. The basic examples for Icinga2 are fine. What I would really like to see are some nontrivial examples. Without those, I'm forced to experiment to figure out the syntax. How can I define a hostname and IP address and reuse those in all the service tests for a particular host in the same file? I found multiple, conflicting examples, but they were for Icinga1 or an earlier version of Icinga2 and nonfunctional.
 
Further questions: is there a searchable bug database, or just the wiki? It appears that check_dig is not defined in 1.11.5. That could be due to a local problem, or the FreeBSD port, or actually an Icinga bug.

Code:
object Service "dig" {
  import "generic-service"

  host_name = "myserver"
  check_command = "dig"

  vars.dig_server = "10.0.0.1"
  vars.dig_lookup = "myserver"
}

service icinga2 restart
Code:
...
[2014-07-06 16:30:44 -0600] information/ConfigItem: Validating config items (step 1)...
[2014-07-06 16:30:44 -0600] critical/config: 
Config error: Invalid value for attribute: Object 'dig' (Type: 'Service') at /usr/local/etc/icinga2/conf.d/myserver/myserver.conf:10 -> Attribute 'check_command': Object 'dig' of type 'CheckCommand' does not exist.
[2014-07-06 16:30:44 -0600] critical/config: 1 errors, 0 warnings.
FAILED

I can make it work by defining it in a custom check-commands.conf:
Code:
object CheckCommand "dig" {
        import "plugin-check-command"

        command = [
                PluginDir + "/check_dig",
                "-H", "$dig_server$",
                "-l", "$dig_lookup$"
        ]
}
 
Thanks for the link edits, such boards always screw them up ;)

Regarding your 'check_dig' question - thanks for the pointer. I missed something on the release 2 weeks ago - 'latest' should only reflect the latest released docs version, but not the 'next' branch. dig was added to next. It's changed now.

Will be in one of the next versions, meanwhile feel free to use your own check command definition, or use sort of "snapshot" builds from ports, if that exists (I'm not a FreeBSD user, just doing icinga support wherever possible).

In terms of more telling examples - that's true, but still one of those "how to make it right" things. We intentionally wrote every documentation piece in markdown, so it's easy to edit, and we happily receive patches/pull requests with your findings and input. Meanwhile you should not use any web resources, but only docs.icinga.org or the plain markdown files as main reference. Plenty of things changed towards the final 2.0.0 release, but since we are an open project, testers and users have been publishing their old guides which are merely outdated these days.

There's an issue open already: https://dev.icinga.org/issues/5474

When it comes to the documentation, it's presented by the Icinga Web 2 docs module, which is still undergoing heavy development. A search bar, and other stuff will be added once there is time again.
The wiki shouldn't be used as reference, you will either use https://dev.icinga.org for bugs, or http://docs.icinga.org for online documentation. More information is listed at https://www.icinga.org/community/
 
Hi, I am also trying this system for monitoring. The first impression was not in favor of this system, it was difficult for me to navigate the settings, because the settings are described for Linux systems in which paths and commands other than FreeBSD. But it all worked out. It really took a long time. At this stage, I want to use the NagVis module with this I have a problem, this module does not work (I need to deal separately with the nagius, then with the NagVis module for Icinga2 and this is all interconnected).
 
Back
Top