Announcement

Collapse
No announcement yet.

[Centstorage] Error when connecting to database

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

  • [Centstorage] Error when connecting to database

    Hi,

    (french version below)

    I've just install Centreon 2.0.2 wih Nagios 3.2.0 on a RHEL 5.2 with Templates (install -f). I had some problems with NDO but that's OK now.
    Still, Centstorage keeps telling me, in centstorage.log, this :

    Code:
    1251371052 - Error when connecting to database : Access denied for user 'centreon'@'localhost' (using password: NO)
    1251371053 - Error when connecting to database : Access denied for user 'centreon'@'localhost' (using password: YES)
    and so on...
    Meanwhile I don't see any host / service monitored and in Configuration menu I do have "some" hosts to be monitored :
    - One host have been created via Centreon's interface
    - Others have been uploads via Configuration - Nagios - Load

    The second method has created some problems :

    Code:
    objects.tar.gz File loading OK
    Data recovery OK
    Command : 83 Entries are registered
    Time Period : 5 Entries are registered
    Contact : 13 Entries are registered
    Contact Group : 7 Entries are registered
    Host : 142 Entries are registered
    Host Group : 25 Entries are registered
    Service : 46 Entries are registered
    Service Group : 5 Entries are registered
    The tarball contains the 'objects' directory with all nagios config from another Nagios (3.2.0) server.

    just before the ' Nagios Configuration Upload' title here are the errors I get :

    Code:
    DB Error : INSERT INTO hostgroup_relation (hostgroup_hg_id, host_host_id) VALUES ('79', '') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`centreon/hostgroup_relation`, CONSTRAINT `hostgroup_relation_ibfk_2` FOREIGN KEY (`host_host_id`) REFERENCES `host` (`host_id`) ON DELETE CASCADE)]
    INSERT INTO servicegroup_relation (host_host_id, service_service_id, servicegroup_sg_id) VALUES ('125', '', '6') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`centreon/servicegroup_relation`, CONSTRAINT `servicegroup_relation_ibfk_9` FOREIGN KEY (`service_service_id`) REFERENCES `service` (`service_id`) ON DELETE CASCADE)]
    INSERT INTO servicegroup_relation (host_host_id, service_service_id, servicegroup_sg_id) VALUES ('127', '', '6') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`centreon/servicegroup_relation`, CONSTRAINT `servicegroup_relation_ibfk_9` FOREIGN KEY (`service_service_id`) REFERENCES `service` (`service_id`) ON DELETE CASCADE)]
    (I haven't put all errors)
    Now I see my different hosts / services to be monitored but nothing is reported.

    Nagios has been restart ( Configuration - Nagios - restart nagios ) :
    Code:
    Running configuration check...done.
    Stopping nagios: done.
    Starting nagios: done.
    and here are the 'nagios' user process :

    Code:
    [[email protected] nagios]$ ps ux
    USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    nagios    4293  0.0  0.0 168528  7500 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios    4373  0.0  0.0 168528  7504 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios    4856  0.0  0.0 168528  7504 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios    8378  0.0  0.0 168524  7500 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios    8541  0.0  0.0 168524  7504 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios    8700  0.0  0.0 168524  7476 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios    9953  0.0  0.0 168524  7500 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios   13146  0.0  0.0 136924  5204 ?        S    Aug25   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios   17700  0.0  0.0  66036  1524 pts/2    S    13:41   0:00 -bash
    nagios   30946  0.0  0.0  46228   532 ?        Ss   14:31   0:00 /opt/nagios/bin/ndo2db-3x -c /opt/nagios/etc/ndo2db.cfg
    nagios   30951  0.0  0.0  46496  1616 ?        S    14:31   0:00 /opt/nagios/bin/ndo2db-3x -c /opt/nagios/etc/ndo2db.cfg
    nagios   30953  0.0  0.0  32204  1560 ?        Ssl  14:31   0:00 /opt/nagios/bin/nagios -d /opt/nagios/etc/nagios.cfg
    nagios   31161  0.0  0.0  32208   664 ?        S    14:32   0:00 /opt/nagios/bin/nagios -d /opt/nagios/etc/nagios.cfg
    nagios   31162  0.0  0.0  65244   764 ?        S    14:32   0:00 /opt/nagios/libexec/check_ping -H 172.17.32.109 -w 3000.0,80
    nagios   31163  0.0  0.0   6004   608 ?        S    14:32   0:00 /bin/ping -n -U -w 30 -c 5 172.17.32.109
    nagios   31164  0.0  0.0  65568   952 pts/2    R+   14:32   0:00 ps ux
    Is there a link with the Centstorage error ?


    To what I understood, here are the links between Nagios and Centstorage :

    Code:
    $ grep perfdata etc/nagios.cfg 
    perfdata_timeout=5
    service_perfdata_command=process-service-perfdata
    service_perfdata_file=/opt/nagios/var/service-perfdata
    host_perfdata_file_mode=2
    service_perfdata_file_mode=2
    The /opt/nagios/var/service-perfdata file does'nt exist whereas 'process-service-perfdata' is in Nagios' libexec directory.
    Did I miss something ?


    ====================================

    En français, car je ne sais pas encore si ce forum est anglophon, francophone ou franglophone :

    Je viens d'installer Centreon 2.0.2 via un template modifié par mes soins et Nagios 3.2.0 à partir des sources, sur une RHEL 5.2
    Après quelques soucis dus à NDO (j'en profite pour signaler qu'il manque trois parties dans le wiki français sur l'installation de NDOutils ; au besoin, je peux modifier la page).

    J'ai par contre toujours des soucis avec Centstorage qui n'arrive pas à se connecter à la base MySQL (depuis le début de l'installation). Voici une partie du contenu de centstorage.log :

    Code:
    1251371053 - Error when connecting to database : Access denied for user 'centreon'@'localhost' (using password: YES)
    Je n'ai d'ailleurs aucun serveur ou service monitoré dans Centreon, alors que je les vois dans la partie "Configuration" de Centreon. J'ai procédé de plusieurs manières pour les rajouter :
    - Rajout d'un hote via l'interface web de Centreon.
    - Rajout de la configuration d'un serveur Nagios existant ( menu "Configuration - Nagios - Load" )

    La deuxième méthode a rencontré des problèmes :

    Code:
    objects.tar.gz File loading OK
    Data recovery OK
    Mais au début de la page, avant le titre 'Nagios Configuration Upload' j'obtiens les erreurs suivantes :

    Code:
    DB Error : INSERT INTO hostgroup_relation (hostgroup_hg_id, host_host_id) VALUES ('79', '') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`centreon/hostgroup_relation`, CONSTRAINT `hostgroup_relation_ibfk_2` FOREIGN KEY (`host_host_id`) REFERENCES `host` (`host_id`) ON DELETE CASCADE)]

    Nagios a bien été redémarré via l'interface Centreo (Configuration - Nagios - restart nagios ) :
    Code:
    Running configuration check...done.
    Stopping nagios: done.
    Starting nagios: done.

    voici les process tournant sous l'utilisateur unix "nagios" :


    Code:
    [[email protected] nagios]$ ps ux
    USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    nagios    4293  0.0  0.0 168528  7500 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios    4373  0.0  0.0 168528  7504 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios    4856  0.0  0.0 168528  7504 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios    8378  0.0  0.0 168524  7500 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios    8541  0.0  0.0 168524  7504 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios    8700  0.0  0.0 168524  7476 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios    9953  0.0  0.0 168524  7500 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios   13146  0.0  0.0 136924  5204 ?        S    Aug25   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
    nagios   17700  0.0  0.0  66036  1524 pts/2    S    13:41   0:00 -bash
    nagios   30946  0.0  0.0  46228   532 ?        Ss   14:31   0:00 /opt/nagios/bin/ndo2db-3x -c /opt/nagios/etc/ndo2db.cfg
    nagios   30951  0.0  0.0  46496  1616 ?        S    14:31   0:00 /opt/nagios/bin/ndo2db-3x -c /opt/nagios/etc/ndo2db.cfg
    nagios   30953  0.0  0.0  32204  1560 ?        Ssl  14:31   0:00 /opt/nagios/bin/nagios -d /opt/nagios/etc/nagios.cfg
    nagios   31161  0.0  0.0  32208   664 ?        S    14:32   0:00 /opt/nagios/bin/nagios -d /opt/nagios/etc/nagios.cfg
    nagios   31162  0.0  0.0  65244   764 ?        S    14:32   0:00 /opt/nagios/libexec/check_ping -H 172.17.32.109 -w 3000.0,80
    nagios   31163  0.0  0.0   6004   608 ?        S    14:32   0:00 /bin/ping -n -U -w 30 -c 5 172.17.32.109
    nagios   31164  0.0  0.0  65568   952 pts/2    R+   14:32   0:00 ps ux
    Je ne sais pas s'il y a un rapport entre l'erreur du début concernant Centstorage et l'absence d'hôtes / services remontés par centreon.

    Au niveau lien entre Centstorage et Nagios (de ce que j'ai compris) :

    Code:
    $ grep perfdata etc/nagios.cfg 
    perfdata_timeout=5
    service_perfdata_command=process-service-perfdata
    service_perfdata_file=/opt/nagios/var/service-perfdata
    host_perfdata_file_mode=2
    service_perfdata_file_mode=2
    Le fichier /opt/nagios/var/service-perfdata n'existe pas et process-service-perfdata est bien dans libexec de nagios.
    J'ai raté quelque chose ?

    En espérant avoir un début de réponse,

    c-moi

  • #2
    What version of mySQL?
    Specializing in Open Source Monitoring Solutions
    Nagios / Cacti / Centreon / SNMP

    Comment


    • #3
      Hi and thank you for your answer,

      Code:
      # mysql --version
      mysql  Ver 14.12 Distrib 5.0.45, for redhat-linux-gnu (x86_64) using readline 5.0
      I've changed a few parameters in Centreon config ( «*Configuration – Nagions – nagios.cfg' tab ‘Data’ and «*Service Performance Data Processing Command*» to «*process-service-perfdata*» ) according to the Installing CentStorage tuto on your wiki and now, the $nagios_dir/var/service-perfdata exists and I see, sometimes, a line with a nagios value.

      But I still don't see anything in Centreon.

      Comment


      • #4
        Ok, its hard to tell what really is the problem. Really???? Sometimes I just do a new install, you have some wierd things happening that I haven't seen before.

        One thing that I noticed is that centcore isnt running:
        Code:
        [[email protected] nagios]$ ps ux
        USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
        nagios    4293  0.0  0.0 168528  7500 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
        nagios    4373  0.0  0.0 168528  7504 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
        nagios    4856  0.0  0.0 168528  7504 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
        nagios    8378  0.0  0.0 168524  7500 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
        nagios    8541  0.0  0.0 168524  7504 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
        nagios    8700  0.0  0.0 168524  7476 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
        nagios    9953  0.0  0.0 168524  7500 ?        S    Aug24   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
        nagios   13146  0.0  0.0 136924  5204 ?        S    Aug25   0:00 /usr/bin/perl -w /opt/centreon/bin/centstorage
        nagios   17700  0.0  0.0  66036  1524 pts/2    S    13:41   0:00 -bash
        nagios   30946  0.0  0.0  46228   532 ?        Ss   14:31   0:00 /opt/nagios/bin/ndo2db-3x -c /opt/nagios/etc/ndo2db.cfg
        nagios   30951  0.0  0.0  46496  1616 ?        S    14:31   0:00 /opt/nagios/bin/ndo2db-3x -c /opt/nagios/etc/ndo2db.cfg
        nagios   30953  0.0  0.0  32204  1560 ?        Ssl  14:31   0:00 /opt/nagios/bin/nagios -d /opt/nagios/etc/nagios.cfg
        nagios   31161  0.0  0.0  32208   664 ?        S    14:32   0:00 /opt/nagios/bin/nagios -d /opt/nagios/etc/nagios.cfg
        nagios   31162  0.0  0.0  65244   764 ?        S    14:32   0:00 /opt/nagios/libexec/check_ping -H 172.17.32.109 -w 3000.0,80
        nagios   31163  0.0  0.0   6004   608 ?        S    14:32   0:00 /bin/ping -n -U -w 30 -c 5 172.17.32.109
        nagios   31164  0.0  0.0  65568   952 pts/2    R+   14:32   0:00 ps ux
        That might be part of the problem. Additionally, you may already know, but I didnt when I started is that you have to export "Config>Nagios>Generate" EVERY-SINGLE-TIME you modify your hosts/services/contacts.

        Your mysql errors are funny, I have not seen that before. Please try logging into mysql via

        Code:
        mysql -u centreon -p
        and see if you can get in. You might need to GRANT localhost access to the "centreon" user.

        Post what happens.
        Specializing in Open Source Monitoring Solutions
        Nagios / Cacti / Centreon / SNMP

        Comment


        • #5
          Hi,

          I haven't writtent it, but I can connet to mysql using centreon login :

          Code:
          $ mysql -u centreon -h localhost -p
          Enter password: 
          Welcome to the MySQL monitor.  Commands end with ; or \g.
          Your MySQL connection id is 1742842
          Server version: 5.0.45 Source distribution
          
          Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
          
          mysql> show databases;
          +--------------------+
          | Database           |
          +--------------------+
          | information_schema | 
          | centreon           | 
          | centstorage        | 
          | ndo                | 
          | test               | 
          +--------------------+
          5 rows in set (0.00 sec)
          Hum, about centcore :

          Code:
          [[email protected] etc]# updatedb
          [[email protected] etc]# locate centcore
          /opt/src/centreon-2.0.2/bin/centcore
          /opt/src/centreon-2.0.2/tmpl/install/centcore.init.d
          I guess I missed something in the install ?


          Code:
          # ls -l /opt/centreon/bin/
          total 488
          -rwxr-xr-x 1 root   root     5100 aoû 24 11:44 centFillTrapDB
          -rwxr-xr-x 1 root   root     5441 aoû 24 11:44 centGenSnmpttConfFile
          -rwxr-xr-x 1 nagios nagios  25777 aoû 24 11:44 centstorage
          -rwxr-xr-x 1 root   root     9989 aoû 24 11:44 centTrapHandler-2.x
          -rwxr-xr-x 1 nagios nagios  12265 aoû 24 11:44 logAnalyser
          -rwxr-xr-x 1 nagios nagios  11574 aoû 24 11:44 nagiosPerfTrace
          -rwxr-xr-x 1 root   root   168318 aoû 24 11:44 snmptt
          -rwxr-xr-x 1 root   root   168318 aoû 21 12:02 snmptt.bak-centreon
          -rwxr-xr-x 1 root   root    28860 aoû 24 11:44 snmpttconvertmib
          -rwxr-xr-x 1 root   root    28860 aoû 21 12:02 snmpttconvertmib.bak-centreon
          I'll try to install Centreon from a new server, with kickstart and Centreon templates, to see what I've missed.

          Comment


          • #6
            It looks like the centcore init "/etc/init.d/centcore" is not present.

            c-moi......... could you PM me, its regarding kickstart in RH.

            Thanks
            Last edited by michaelwjoyner; 1 September 2009, 18:57.
            Specializing in Open Source Monitoring Solutions
            Nagios / Cacti / Centreon / SNMP

            Comment


            • #7
              Hi again,

              I've installed a new RHEL server with Centreon, using RHEL kickstart and Centreon template (no interactive installation).

              I'm having the same problem : no centcore has been installed.

              Here is my template ( without '#' lines ) :

              Code:
               grep -v '#' tmpl/vardistrib/RHEL5.2_tmpl 
              
              
              PROCESS_CENTREON_WWW=1
              PROCESS_CENTSTORAGE=1
              PROCESS_CENTCORE=0
              PROCESS_CENTREON_PLUGINS=1
              PROCESS_CENTREON_SNMP_TRAPS=1
              
              
              LOG_DIR="$BASE_DIR/log"
              LOG_FILE="$LOG_DIR/install_centreon.log"
              
              TMPDIR="/tmp/centreon-setup"
              SNMP_ETC="/etc/snmp/"
              PEAR_MODULES_LIST="pear.lst"
              
              
              INSTALL_DIR_CENTREON="/opt/centreon"
              CENTREON_LOG="/var/opt/log/centreon"
              CENTREON_ETC="/etc/opt/centreon"
              CENTREON_RUNDIR="/var/run/centreon"
              CENTREON_GENDIR="/var/opt/cache/centreon"
              CENTSTORAGE_RRD="/var/opt/lib/centreon"
              CENTSTORAGE_BINDIR="/opt/centreon/bin"
              CENTCORE_BINDIR="/opt/centreon/bin"
              CENTREON_VARLIB="/var/opt/lib/centreon"
              CENTPLUGINS_TMP="/var/opt/lib/centreon/centplugins"
              CENTPLUGINSTRAPS_BINDIR="/opt/centreon/bin"
              SNMPTT_BINDIR="/opt/centreon/bin/"
              CENTCORE_INSTALL_INIT=1
              CENTSTORAGE_INSTALL_INIT=1
              CENTCORE_INSTALL_RUNLVL=1
              CENTSTORAGE_INSTALL_RUNLVL=1
              
              
              INSTALL_DIR_NAGIOS="/opt/nagios/"
              NAGIOS_ETC="/opt/nagios/etc/"
              NAGIOS_PLUGIN="/opt/nagios/libexec/"
              NAGIOS_IMG="/opt/nagios/share/images/logos"
              NAGIOS_BINARY="/opt/nagios/bin"
              NAGIOSTATS_BINARY="/opt/nagios/bin/nagiostats"
              NAGIOS_VAR="/opt/nagios/var"
              NAGIOS_USER="nagios"
              NAGIOS_GROUP="nagios"
              NAGIOS_P1_FILE="/opt/nagios/lib/p1.pl"
              NDOMOD_BINARY=/opt/nagios/bin/ndomod-3x.o
              NAGIOS_INIT_SCRIPT="/etc/init.d/nagios"
              
              DIR_APACHE="/etc/ihttpd"
              DIR_APACHE_CONF="/etc/httpd/conf.d"
              APACHE_CONF="httpd.conf"
              WEB_USER="apache"
              WEB_GROUP="apache"
              APACHE_RELOAD=1
              
              BIN_RRDTOOL="/usr/bin/rrdtool"
              BIN_MAIL="/usr/bin/mail"
              BIN_SSH="/usr/bin/ssh"
              BIN_SCP="/usr/bin/scp"
              PHP_BIN="/usr/bin/php"
              GREP="/bin/grep"
              CAT="/bin/cat"
              SED="/bin/sed"
              
              
              RRD_PERL="/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/"
              SUDO_FILE="/etc/sudoers"
              FORCE_SUDO_CONF=1
              WEB_USER="apache"
              WEB_GROUP="apache"
              INIT_D="/etc/init.d"
              CRON_D="/etc/cron.d"
              PEAR_PATH="/usr/share/pear/"
              As you can see :
              Code:
              CENTCORE_INSTALL_INIT=1
              CENTCORE_INSTALL_RUNLVL=1
              Did I miss something ?

              Comment


              • #8
                I believe that you can run the manual installation and just do the centcore part and skip the rest.

                I always do by hand because it creates a log file that has save my ass a couple of times.

                I have never done it any other way like some others using YUM and Automated installs.
                Specializing in Open Source Monitoring Solutions
                Nagios / Cacti / Centreon / SNMP

                Comment


                • #9
                  Hi again,

                  Well, I've found my mistake... I had
                  Code:
                  PROCESS_CENTCORE=0
                  instead of
                  Code:
                  PROCESS_CENTCORE=1
                  I've (once more) installed RHEL and Centreon via kickstart and template, i've got centcore now and don't have any centstorage database error. I still don't have any monitoring information on centreon and my logAnalyser.log gives me this error :

                  Code:
                  # vim /var/opt/log/centreon/logAnalyser.log
                  Can't locate /etc/opt/centreon/conf.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /us
                  r/lib64/perl5/site_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64
                  /perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5
                  /site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thre
                  ad-multi /usr/lib64/perl5/vendor_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-
                  multi /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_per
                  l/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x
                  86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /opt/centreon/bin/logAnalyser line 44.
                  and

                  Code:
                  vim /opt/centreon/bin/logAnalyser +44
                  require "/etc/opt/centreon/conf.pm";
                  I guess that's another error, perhaps I should open another thread...

                  Thank you for helping !

                  Comment


                  • #10
                    Hello !

                    Did you check if this file (/etc/opt/centreon/conf.pm) exists and if your Nagios user can read it ?

                    Ben
                    Ben
                    FAN 2 beta 2 (Nagios® 3.0.6 - Centreon 2.0.2)
                    4 hosts, 66 services (it's a try )

                    Comment


                    • #11
                      Hi !

                      Yep :

                      Code:
                      ls -l /etc/opt/centreon/conf.pm
                      -rw-r--r-- 1 apache apache 157 sep 17 14:34 /etc/opt/centreon/conf.pm
                      I just did some changes :
                      Code:
                      chmod 755 /etc/opt/centreon/conf.pm
                      chown nagios:apache /etc/opt/centreon/conf.pm
                      and
                      Code:
                      ln -s /etc/opt/centreon/conf.pm /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi
                      even if the line in logAnalyser is :
                      Code:
                      # vim /opt/centreon/bin/logAnalyser +44
                      require "/etc/opt/centreon/conf.pm";
                      I'll try to modify '@INC' via the 'PERL5LIB' variable. I just don't know which user executes logAnalyser. I'll check this and will keep you informed.

                      Thanks again

                      Edit: I changed the 'PERL5LIB' variable of 'nagios' user. Now @INC contains '/etc/opt/centreon' :
                      Code:
                      $ perl -le 'print for @INC'
                      /etc/opt/centreon
                      ....
                      But /var/opt/log/centreon/logAnalyser.log is unchanged since sept 17th... :-S
                      I've loaded my old nagios config in Centreon but nothing seems to be monitored, even after a nagios restart via Centreon (0 Host up/down in Centreon)...
                      Last edited by c-moi; 21 September 2009, 12:03. Reason: updating

                      Comment


                      • #12
                        Still a NDO/MySQL problem ?

                        Hi, it's me again :-)

                        After viewing another post ( http://forum.centreon.com/f8/host-do...788/page2.html ) I've looked at /var/log/messages, read some MYSQL INSERT errors, followed the instruction of http://en.doc.centreon.com/Setup:ndoutils2 and those of the post :

                        Code:
                        mysql> use ndo;
                        mysql> alter table nagios_configfilevariables drop index instance_id;
                        Query OK, 110 rows affected (0.03 sec)
                        Records: 110  Duplicates: 0  Warnings: 0
                        mysql> alter table nagios_configfilevariables add index (instance_id, configfile_id, varname);
                        Query OK, 110 rows affected (0.05 sec)
                        Records: 110  Duplicates: 0  Warnings: 0
                        
                        
                        ALTER TABLE `nagios_hostchecks` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
                        ALTER TABLE `nagios_hoststatus` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
                        ALTER TABLE `nagios_servicechecks` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
                        ALTER TABLE `nagios_servicestatus` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
                        ALTER TABLE `nagios_statehistory` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
                        ALTER TABLE `nagios_eventhandlers` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
                        ALTER TABLE `nagios_systemcommands` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
                        ALTER TABLE `nagios_notifications` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
                        I looked again and saw (uic17039 is my server) :

                        Code:
                        Sep 21 11:26:57 uic17039 nagios: Caught SIGTERM, shutting down... 
                        Sep 21 11:26:57 uic17039 nagios: Successfully shutdown... (PID=31573)
                        Sep 21 11:26:57 uic17039 nagios: ndomod: Shutdown complete. 
                        Sep 21 11:26:57 uic17039 nagios: Event broker module '/opt/nagios/bin/ndomod-3x.o' deinitialized successfully.
                        Sep 21 11:27:14 uic17039 nagios: Nagios 3.2.0 starting... (PID=32203)
                        Sep 21 11:27:14 uic17039 nagios: Local time is Mon Sep 21 11:27:14 CEST 2009
                        Sep 21 11:27:14 uic17039 nagios: LOG VERSION: 2.0 
                        Sep 21 11:27:14 uic17039 nagios: ndomod: NDOMOD 1.4b8 (07-16-2009) Copyright (c) 2009 Nagios Core Development Team and Commun
                        ity Contributors
                        Sep 21 11:27:14 uic17039 nagios: ndomod: Successfully connected to data sink.  0 queued items to flush.
                        Sep 21 11:27:14 uic17039 nagios: Event broker module '/opt/nagios/bin/ndomod-3x.o' initialized successfully.
                        Sep 21 11:27:14 uic17039 ndo2db-3x: Successfully connected to MySQL database
                        Sep 21 11:27:14 uic17039 nagios: Finished daemonizing... (New PID=32206) 
                        Sep 21 11:27:14 uic17039 nagios: Warning: Host performance file processing command 'process-host-perfdata-file' was not found
                         - host performance data file will not be processed!
                        Sep 21 11:27:14 uic17039 nagios: Warning: Service performance file processing command 'process-service-perfdata-file' was not
                         found - service performance data file will not be processed!
                        Are these warnings important ? I have a 'Service Performance Data File' in "Centreon - Configuration - Nagios - nagios.cfg - Data" but no "Host Performance Data File".

                        Comment

                        Working...
                        X