Nagvis backed configuration problem in icinga2

  • Hi everybody,


    This is my first thread in the forum and first of all, I want to apologize for my English expressions (my very bad English...) 


    Well, I'm a beginner in the monitoring world, and I'm trying to install my first monitoring server on a virtual machine that later, if all works fine, I'll deploy in my company.


    I chose icinga2 because people told me that today is better trying to install icinga2 instead nagios... To install icinga2 I followed the docs of https://docs.icinga.com and I really happy because every thing works properly (add host, service, dependencys...) in debian jessie, but now I'm trying to configure a Nagvis backend and I don't get it.


    I read a lot of information on Internet, I try to configure a functional backend (ndomy and livestatus) with a lot of different configurations in nagvis.ini.php, I try different ways to install nagvis and different versions and the result with both is a blank page on nagvis and the following error:


    "Unable to fetch data from backend - falling back to input field."


    Anyone can help me? To continue I only need a link to any documentation or tutorial that show me how can I configure a livestatus socket or another one for icinga2 in debian 8.


    (If someone want to tell me how can I do... better for me ^^, I'll be very glad)


    Thanks in advance.


    Regards!

  • Hi dnsmichi,


    Thanks for reply me as soon.


    I show you my ido-mysql.conf


    /**
    * The db_ido_mysql library implements IDO functionality
    * for MySQL.
    */



    library "db_ido_mysql"



    object IdoMysqlConnection "ido-mysql" {
    user = "icinga2",
    password = "Mypass",
    host = "localhost",
    database = "icinga2"
    }


    And here is the ndomy section from my nagvis.ini.php


    [backend_ndomy_1]
    backendtype="ndomy"
    dbhost="localhost"
    dbname="icinga2"
    dbuser="icinga2"
    dbpass="Mypass"
    maxtimewithoutupdate=180
    htmlcgi="/icinga/cgi-bin"


    I tried change the htmlcgi to /icinga2 and doesn't works.


    If you wanna see another sections from my nagvis.ini.php I can copy and paste the entire file.


    Actually in the global section, I don't change the authenticationmodule line and the URL templates for hosts, hostgroups, service... etc. If I'm not mistaken that would be used to integrate nagvis with icingaweb. And I have this another two line too:


    file_group="www-data"
    file_mode=660


    I almost forgot to tell you that I have configure this paths:


    base="/usr/share/nagvis/"

    htmlbase="/nagvis"

    htmlcgi="/icinga/cgi-bin"


    You'll tell me if you see something wrong or need more info.

    I'll be waiting for your feedback.


    Thank you very much for your help.

  • Apart from the htmlcgi bits (I'll try to explain that later) which just render URLs for external applications, does NagVis itself work with fetching the data (i.e. by using automap or your own minimal map for fetch a host and a service?

  • Hi dude!


    My Nagvis works with anything... I only can view the demo maps, when I tried to add manually a host I get the same error "Unabled to fetch data from backend...", when I create a map and try to put any backend I get a descriptive label (UNKNOWN) following my map name.


    Do you have any idea what can be hapening?


    I've read in this forum that some people have not been able to run ndomy backend but it works with livestatus backend. I don't know if i have something bad configured or I don't install any kind of package... I really don't know... I'm very lost...


    Thanks a lot for your replies and your helps ;)

  • Hmmmm ... do you have a screenshot of that, where exactly that happens? I read the source code, but it doesn't tell which backend at that stage.


    I've seen plenty of NagVis setups using the NDO/IDO database. The Vagrant boxes add a demo case too, and over there it seems working. Though I wouldn't call myself an expert in this area, web applications is a lot of searching, reading, debugging and learning from others.