Migrating from nagios Core 3.x to icinga on ubuntu

This forum was archived to /woltlab and is now in read-only mode. Please register a new account on our new community platform.

You can create a thread on the new site and link to an archived thread. This archive is available as knowledge base, safe and secured.

More details here.
  • Hello is there any guide/document or tools that can migrate from Nagios to Icinga2 successfully

    Icinga has been installed on Ubuntu 16 and the old Nagios is Nagios core 3.x on Ubuntu 10

  • Start here https://www.icinga.com/docs/ic…migrating-from-icinga-1x/ - do an inventory of your existing monitoring objects - and start fresh with your deployment and setup.

  • e.g I want to copy all my .cfg to a specific directory in icinga

    Due to the new syntax you can't copy your config files but have to migrate the definitions manully.

    also all the files in /usr/local/Nagios/libexec

    Looking here shows some details on installing plugins.

  • I added a hosts in the hosts.conf file in /etc/icinga2/conf.d

    what am I doing wrong as I restarted the service


    /* Specify the address attributes for checks e.g. `ssh` or `http`. */


    address = "127.0.0.1"


    address = "x.x.x.x"


    address6 = "::1"




    I still cannot see the hosts in the admin GUI

  • Every time I touch one of the configuration files (doesn't even matter which one and what objects I add) and restart the icinga service, I see under Process Info that red line: "Backend icinga is not running". Of course that the host I tried to add doesn't appear at the dashboard's host list as I expected. When I restore /etc/icinga2/conf.d/hosts.conf back to it's previous default form and restart the service, the Backend state is back to normal.

  • this is an example of my hosts.conf including section

    What should be amended


  • I am adding another device apart from localhosts in the hosts.conf file

  • I have tried to use REST to add an object to ICINGA but got the error message

    Code
    1. curl -k -s -u root:xxxxx -H 'Accept: application/json' -X PUT 'https://localhost:5665/v1/objects/hosts/npm-01.nms.exp001.exponential-e.net' \ -d '{ "templates": [ "generic-host" ], "attrs": { "address": "x.x.x.x", "check_command": "hostalive", "vars.os" : "Linux" } }' \ | python -m json.tool
    2. No JSON object could be decoded
  • Code
    1. I have setup api and restarted the icinga2 service and tried this one this time and get no errors but it did not add anything
    2. curl -k -s -u root:icinga -H 'Accept: application/json' -X PUT 'https://localhost:5665/v1/objects/hosts/rhes7' \ -d ' { "attrs" : { address" : "x.x.x.x.", "vars.os" : "Linux" } }
  • Just having a look at api.conf I have not set the bind_port or is by default

    Please tell me


  • Please stop here. You're going ping and pong without knowing much about the details on Icinga 2. This isn't done in a day or two, it requires you to understand the basic principles of the configuration DSL (Monitoring Basics) and further objects, features, etc.


    Start with a fresh Icinga 2 installation and create your first CheckCommand, Host and Service based on your own plugin. Then dive into further details like Notifications, more apply rules, and so on.


    Once you feel familiar enough with the new system, do an inventory of your old system and apply a new structure on the configuration tree. You did not yet tell whether you're using clients with NRPE or anything else. This should also be considered during a migration.


    If you think that this can't be done with reading documentation and trying things out by yourself, consider getting an Icinga 2 training with hands on sessions on the configuration and also migration.