Announcement

Collapse
No announcement yet.

save the notifications on a SQL base

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • save the notifications on a SQL base

    Hi,

    I'm new on nagios, I'd like to know if it's possible to save the notifications on a MySql base.
    I mannaged to configure correctly the notification by email but i'd like to have an historical of all this alarms on a MySql base.

  • #2
    Does anyone knows if there is a pluggin or something to do this operation?
    I didn't find anything on google.

    Comment


    • #3
      Doesn't ndo already do the job?
      Auteur de Shinken, outil de supervision compatible avec Nagios et orientée supervision distribuée hautement disponible et mulitplateforme.

      Comment


      • #4
        I didn't knew this plugin, i'll try to install ndo with mysqlServer nd come back after ^^

        Comment


        • #5
          If your install or your needs are not compatible with NDO module (too old Nagios version for example), you can also create a new notification command based on "notify-by-email" that instead of calling '/usr/bin/printf ... | mail' would call the appropriate request via '/usr/bin/mysql -e "INSERT INTO ... ;"'
          Système : Debian Etch 4.0r8 / Apache 2.2.3 / PHP 5.2.0 / MySQL 5.0.32
          Monitoring : Nagios 2.12 / Plugins 1.4.13 / Centreon 1.4.2.7

          Comment


          • #6
            impossible to access nagios web interface

            Ok I tryied to install the NDO pluggin but the result wasn't what i expected...

            Impossible to access the web interface of nagios because of some missing file, and then impossible to restart /etc/init.d/nagios...

            So I decided to reinstall nagios in the old way -> wget http://...../nagios.tar.gz
            make all, make install, and so on.

            Now nagios is starting correctly, and i even received some alerts on my mailbox so the old configuration is ok but I don't manage to access the website anymore.

            Before i was using the public address of the serveur: http://server_address/nagios

            but now whenI tryied that, i log in, and then I got the following error msg:

            "Forbidden

            You don't have permission to access /nagios/ on this server."



            In the /var/log/apache2/errormessage I got this information:

            "
            [Thu Apr 16 10:54:08 2009] [error] [client 88.179.85.186] Directory index forbidden by Options directive: /usr/nagios/share/
            "

            Does anyone can help me fix this pb?
            Last edited by tom__63; 16 April 2009, 12:11.

            Comment


            • #7
              For NDO you should check the installation doc on http://nagios.sourceforge.net/docs/n...s/NDOUtils.pdf or follow Centreon Wiki installation steps related to NDO on http://en.doc.centreon.com/Setup (depending on your Linux distribution).

              Well, according to the present error message, you are not allowed to list all the files present in the current web directory (which is normal for standard Nagios/Apache2 configuration with "Options None" directive). 2 possibilities:
              - /usr/nagios/share/ does not contain valid Nagios web directory (i.e. no index.html or index.php are present)
              - Apache is not correctly configured for DirectoryIndex directive which should contain at least "index.html index.php"

              Don't forget to reload/restart Apache after any change.
              Système : Debian Etch 4.0r8 / Apache 2.2.3 / PHP 5.2.0 / MySQL 5.0.32
              Monitoring : Nagios 2.12 / Plugins 1.4.13 / Centreon 1.4.2.7

              Comment


              • #8
                I fixed the issue!!

                Actually as i haven't installed nagios in the same folder and the same way than before the alias and scriptAlias defined in the /etc/apache2/modules.d/99_nagios.conf configuration file were not present so I just changed: /usr/nagios/share by /usr/local/nagios/share
                and /usr/nagios/sbin by /usr/local/nagios/sbin


                Now I managed to acces nagios correctly and everything is back to normal ^^

                I will try again to install ndo following the links u gave me.
                Thnaks 4 ur help, i'll keep u updated of my installation quest :P

                Comment


                • #9
                  Ok nice.

                  Just a tip for NDO: don't bother with the manual modification of NDO configuration files which can be quite complex when not knowing the internals of the tool. As soon as everything is compiled, copied into the right directories and database/users are setup, just login to Centreon and export all configuration files, defaults which will override all configuration should be fine for almost any use.
                  Système : Debian Etch 4.0r8 / Apache 2.2.3 / PHP 5.2.0 / MySQL 5.0.32
                  Monitoring : Nagios 2.12 / Plugins 1.4.13 / Centreon 1.4.2.7

                  Comment


                  • #10
                    Ok I'll do try that but I'm not using Centreon, just Nagios.

                    For what I know Centreon provide just a more user oriented graphical web page to nagios. I am correct or does it provides some more usefull features ?

                    Comment


                    • #11
                      Thanks for the link to instal NDO, that worked.

                      Now I just have to solve my last pb ( ^^ ) my nagios server receive the NSCA trames cf nagios.log. But the status isn't updated on the web interface...
                      I'm wondering what is the cause of this pb, cause it was working perfectly before...

                      Still working :P

                      Comment


                      • #12
                        Ouch sorry to annoy u with my stupid questions again (...)
                        I think I know my pb.
                        Actually I have 2 installs of nagios.

                        The 1st one was in /etc/nagios
                        and then i reinstalled it in /usr/local/nagios/etc

                        so How can I know which one is running when I start/etc/init.d/nagios start ?

                        And How can I remove correctly the useless install?
                        If I do unmerge nagios I don't know which install it will delete. (I guess).

                        Maybe If I manage to do that I will also manage to make my nagios work correctly ^^


                        By the way the database is correctly installed and linked to nagios (one of them :P )

                        Comment


                        • #13
                          NDOutils not storing data

                          Alright I'm almost there!!

                          Nagios installed and working properly (finally)
                          NDOutils installed and linked to my mysql databse.

                          I'm checking all the tables created by NDO in this db but all I can found is empty tables. Exepted the configurations tables which stores informations about how nagios is running.
                          For instance when I check the nagios_configfiles table, I see that the current instance of nagios is using the /usr/local/nagios/etc/nagios.cfg file.
                          So I'm guessing that NDO manage to pick up some info from nagios and to write them in the db.

                          But in all the historical tables, like notifications, nothing is wirtten. And I'm still receiving the notifications emails from nagios.


                          Does anyone know more about NDO, and is it possible to solve this pb ?

                          Comment


                          • #14
                            Is you broker_module parameter ok? And event_broker_options=-1? The data_processing_options of ndomod is -1 too?
                            Auteur de Shinken, outil de supervision compatible avec Nagios et orientée supervision distribuée hautement disponible et mulitplateforme.

                            Comment


                            • #15
                              Well difficult to say what's wrong when it's working halfway.
                              It can be communication problems between Nagios and NDO module, such as improper configuration in nagios.cfg, ndo2db.cfg or ndomod.cfg, NDO is very tricky when it comes to parameters.

                              For your dual installation, just edit your /etc/init.d/nagios script to see what binary and configuration file are used. To remove the useless one, if the old one was a package, just uninstall the package, if it was manual install just rm -r the directory. Backup your configuration data before proceeding, it can always be useful, especially for your /etc/init.d/nagios script or Apache config file that can be removed when uninstalling a Nagios package.
                              Système : Debian Etch 4.0r8 / Apache 2.2.3 / PHP 5.2.0 / MySQL 5.0.32
                              Monitoring : Nagios 2.12 / Plugins 1.4.13 / Centreon 1.4.2.7

                              Comment

                              Working...
                              X