Monitoring plugin Icinga2 (initial approach)

Hi all,

I had some time to start on integrating Foreman (the smart proxy for now)
and Icinga2 but now I have no idea when I find some more time but perhaps
someone else wants to have a first look into or take it to the next level.

You can find the code on https://github.com/dgoetz/smart-proxy.

Idea was to route the communication through the smart proxy, so I started
with this. In Icinga2 we have a rule based configuration so only creation
of a host with custom attributes is required then services, notifications,
dependencies and so on will be added automatically depending on the rules.

Status is this:

  • If the smart proxy gets a post request it creates the host on Icinga 2 or
    updates it if already existing. I did not add the zones attribute for now
    required in a cluster setup and hit some bugs in the Icinga2 api in
    creating endpoint and zone required for running Icinga2 also as agent. Also
    for now Icinga2 does not re-evaluate apply rules on changes.
  • If the smart proxy gets a delete request it will delete the host and all
    depending objects. Endpoints and zones should also work but is not tested
    without being able to create them.
  • If the smart proxy gets a get request it will print some status
    information. This is only for testing. Later it should get the initial
    state for all hosts and services on start up and then connect to an event
    stream to get updates on state changes, downtimes and acknowlegements and
    forward it to Foreman.
  • No documentation and nearly no error handling

For testing install Icinga2, enable the api feature and add an api-user or
simply use the vagrant boxes provided by the Icinga Project on
http://git.icinga.org/icinga-vagrant.git. More documentation on the Icinga2
api you can find on
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/icinga2-api.
And of course feel free to ask me.

Regards,
Dirk

Dirk

Hope all is well - I am attempting to get Icinga2 and Icinga2 Web Interface
up and running on Ubuntu 16.04 OS.

I've gotten all the packages pulled down, it appears everything has
installed correctly however I'm running into a small issue getting the GUI
up and running:

When I attempt to go to the http://localhost/icingaweb2/setup page I'm
getting a message that You don't have permission to access http://IP
address/icingaweb2/setup on this server.

Any thoughts on the steps I might of missed or need to still do for the
setup - I'm trying to roll this out by Wed. morning so I can compare this
product and the legacy Nagios product as this looks a whole lot easier to
manage.

Thanks for your help and time at looking at this - much appreciated.

Best regards,

Ryan

··· On Tuesday, April 5, 2016 at 1:29:35 PM UTC-4, Dirk Götz wrote:

Hi all,

I had some time to start on integrating Foreman (the smart proxy for now)
and Icinga2 but now I have no idea when I find some more time but perhaps
someone else wants to have a first look into or take it to the next level.

You can find the code on https://github.com/dgoetz/smart-proxy.

Idea was to route the communication through the smart proxy, so I started
with this. In Icinga2 we have a rule based configuration so only creation
of a host with custom attributes is required then services, notifications,
dependencies and so on will be added automatically depending on the rules.

Status is this:

  • If the smart proxy gets a post request it creates the host on Icinga 2
    or updates it if already existing. I did not add the zones attribute for
    now required in a cluster setup and hit some bugs in the Icinga2 api in
    creating endpoint and zone required for running Icinga2 also as agent. Also
    for now Icinga2 does not re-evaluate apply rules on changes.
  • If the smart proxy gets a delete request it will delete the host and all
    depending objects. Endpoints and zones should also work but is not tested
    without being able to create them.
  • If the smart proxy gets a get request it will print some status
    information. This is only for testing. Later it should get the initial
    state for all hosts and services on start up and then connect to an event
    stream to get updates on state changes, downtimes and acknowlegements and
    forward it to Foreman.
  • No documentation and nearly no error handling

For testing install Icinga2, enable the api feature and add an api-user or
simply use the vagrant boxes provided by the Icinga Project on
http://git.icinga.org/icinga-vagrant.git. More documentation on the
Icinga2 api you can find on
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/icinga2-api.
And of course feel free to ask me.

Regards,
Dirk