About the author

AL

If you would like more details about me check this page: http://chemaly.ca/

Related Articles

  • dyno

    Hello, thanks for your howtos, I really appreciate it, but some problems will appears.

    First have some permission problems. When I want generate configuration (Configuration -> Monitoring Engines -> Generate) and check “Run monitoring engine debug” it stuck on 10% and show just help of sudo command (usage: sudo [-D level] -h | -K | -k | -V,.. etc).
    Without check “Run monitoring engine debug” progress is on 100% but dont copy configuration files (into /usr/local/nagios/etc/)

    and second problem what I found is in Administration -> Server Status -> System Information and in Process control – is nothing.. clean page.. I think its maybe permission problem too.

    I checked sudoers and it looks good (paths to bin,..).

    Installed strictly to this howto, using Debian 7.2, Nagios 3.5.1, NDOutils 1.5, Centreon 2.4.5. If you have some ideas I need them 🙂 Thanks

    • AL

      Hi,
      Did you run the Centreon installation script as root ?
      1. Make sure that Nagios is installed in /usr/local/nagios
      2. Did you specify the Monitoring engine configuration directory as: /usr/local/nagios/etc ?
      3. did you specify the following during the script installation:
      What is the Monitoring engine user ? nagios
      What is the Broker user ? (optional) nagios
      4. What does this command returns? $ cat /etc/group | grep centreon

      • dyno

        Thanks for reply. It seems to be solved.. and how? Its really annoying me.. In Configuration -> Centreon -> Pollers -> Central (in my case) must check “Localhost?” and “Is default poller?” to Yes.. in default it is not specified.. just this little thing and now I can generate and run debug without problems O.o

        But one probles still occurs. In Administration -> Server Status -> System Information is always blank page. Process control now working.

        So my answers:
        Yes, I ran Centreon installation script as root
        1) Yes is installed in /usr/local/nagios
        2) Yes
        3) Yes
        4) nagios:x:1001:www-data,centreon,nagios
        centreon:x:999:www-data,nagios

        Going to dig this last (I hope 🙂 ) problem. I just want to say thanks for even considering it.

        • AL

          Check out a screenshot of my poller configuration:
          http://terraltech.com/wp-content/uploads/2013/11/Centreon-Poller-conf.png
          For the system information, try to follow your Apache error log while trying to open the system information page and let me know
          e.g: # tail -f /var/log/apache2/access.log

          • dyno

            I have exactly the same poller configuration as you have.

            Part of my access.log:
            http://pastebin.com/L2AwUiH8

            I have something wrong with my Centreon installation.. When I want add some hosts – nothing happens, but when duplicated default Centreon-Server it makes Centreon-Server-1 (and I can reload conf to Nagios and checking is working), but when I rename it on something – just disappear 🙂 or when I want add some host macros – it refuse with “You cannot override reserved macros”

            I will try to fix it, but if I won’t be able to do it, I will reinstall it on Debian 6. Which distribution do you use?

          • AL

            I use ubuntu 12.04 LTS, you should have a look into your error.log
            For more logs check in your Centreon installation path (e.g: /usr/local/centreon/log/)

  • dinesh

    Very nice doc.

  • youmarva

    Hello,

    I followed your tutoriel and until the step of the installation of centreon everything goes well. But when I passed to change values ​​in Configuration> Centreon> ndo2db.cfg and ndomod.cfg as As you shows it in screenshots of the Centreon configuration, I get the message “No connection broker found”
    I am very confused, I already have to try several times to install nagios centreon but I always fall on the same error! I really need guidance.
    if I can provide further details do not hesitate to ask me.
    Thank you for your help.

    Unsing Ubuntu 13.04, Nagios 3.5.1, NDOutils 1.5.2, Centreon 2.4.5.

    • AL

      Hello,
      Is your Nagios running? is your NDO2DB running?
      What does the command returns: (DONT copy/paste retype the command)
      # ps aux | grep ‘ndo\|nagios’
      In your Centreon: “Configuration” > “Centreon” is your poller running? Did you check all the settings in the poller ?
      Check your log files if it can tell us more, it should be in /usr/local/centreon/log/ or somthing like it.

      • youmarva

        Thanks for reply 🙂
        yes ndo2db and nagios are running:
        “:/usr/local/nagios/etc# /etc/init.d/nagios status
        nagios (pid 8375) is running…
        root@machinenagios-VirtualBox:/usr/local/nagios/etc# /etc/init.d/ndo2db status
        ndo (pid 1006) is running…”

        ps aux | grep ‘ndo|nagios’
        root 15959 0.0 0.0 13676 964 pts/0 S+ 13:03 0:00 grep –color=auto ndo|nagios

        I was not able to change the parameters of the poller as you showed it, because after changing variables in ndo2db.cfg in the graphical interface of Centreon, I cannot reach any more Configuration > Centreon > Pollers (the error message ” No. connection found broker “)

        There is many files .log in /usr/local/centreon/log/ :
        drwxrwxr-x 2 centreon centreon 4096 18 16:46 .
        drwxr-xr-x 13 root root 4096 18 15:55 ..
        -rw-rw-r– 1 www-data www-data 34905776 19 13:09 centAcl.log
        -rw-r–r– 1 centreon centreon 1397 19 08:48 centcore.log
        -rw-r–r– 1 centreon centreon 34423 19 10:25 centstorage.log
        -rw-rw-r– 1 www-data www-data 6960750 19 13:05 downtimeManager.log
        -rw-rw-r– 1 centreon centreon 44557 19 13:09 logAnalyser.log
        -rw-rw-r– 1 centreon centreon 5996 19 13:05 nagiosPerfTrace.log

        maybe CentAcl.log?
        CentAcl.log:
        ####################################
        Cannot adopt OID in NET-SNMP-AGENT-MIB: nsLogMaxLevel ::= { nsLoggingEntry 4 }
        Cannot adopt OID in NET-SNMP-AGENT-MIB: nsLogStatus ::= { nsLoggingEntry 5 }
        Cannot adopt OID in NET-SNMP-AGENT-MIB: nsTransactionTable ::= { nsTransactions 1 }
        Cannot adopt OID in UCD-SNMP-MIB: snmperrIndex ::= { snmperrs 1 }
        Cannot adopt OID in UCD-SNMP-MIB: snmperrNames ::= { snmperrs 2 }
        Cannot adopt OID in UCD-SNMP-MIB: snmperrErrorFlag ::= { snmperrs 100 }
        Cannot adopt OID in UCD-SNMP-MIB: snmperrErrMessage ::= { snmperrs 101 }
        Cannot adopt OID in NET-SNMP-EXTEND-MIB: nsExtendOutput1Line ::= { nsExtendOutput1Entry 1 }
        Cannot adopt OID in NET-SNMP-EXTEND-MIB: nsExtendOutputFull ::= { nsExtendOutput1Entry 2 }
        Cannot adopt OID in NET-SNMP-EXTEND-MIB: nsExtendOutNumLines ::= { nsExtendOutput1Entry 3 }
        Cannot adopt OID in NET-SNMP-EXTEND-MIB: nsExtendResult ::= { nsExtendOutput1Entry 4 }
        Cannot adopt OID in NET-SNMP-EXTEND-MIB: nsExtendLineIndex ::= { nsExtendOutput2Entry 1 }
        Cannot adopt OID in NET-SNMP-EXTEND-MIB: nsExtendOutLine ::= { nsExtendOutput2Entry 2 }
        Cannot adopt OID in UCD-SNMP-MIB: laIndex ::= { laEntry 1 }
        Cannot adopt OID in UCD-SNMP-MIB: laNames ::= { laEntry 2 }
        Cannot adopt OID in UCD-SNMP-MIB: laLoad ::= { laEntry 3 }
        Cannot adopt OID in UCD-SNMP-MIB: laConfig ::= { laEntry 4 }
        Cannot adopt OID in UCD-SNMP-MIB: laLoadInt ::= { laEntry 5 }
        Cannot adopt OID in UCD-SNMP-MIB: laLoadFloat ::= { laEntry 6 }
        Cannot adopt OID in UCD-SNMP-MIB: laErrorFlag ::= { laEntry 100 }
        Cannot adopt OID in UCD-SNMP-MIB: laErrMessage ::= { laEntry 101 }
        Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyRestart ::= { netSnmpNotifications 3 }
        Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyShutdown ::= { netSnmpNotifications 2 }
        Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyStart ::= { netSnmpNotifications 1 }

        div.Error{background-color:#fa6f6c;border:1px #AEAEAE solid;width: 500px;}
        div.Error{border-radius:4px;}
        div.Error{padding: 15px;}
        a, div.Error{font-family:”Bitstream Vera Sans”, arial, Tahoma, “Sans serif”;font-weight: bold;}

        Centreon

        No broker connection found
        Refresh Here

        #################################

        I also noticed that after the changes that I make to ndo2db.cfg and ndomod.cfg in the interface of Centreon , that the file /usr/local/nagios/etc/ndo2db.cfg is empty and /usr/local/nagios/etc/ndomod.cfg chage!

        do you want me to try to take back a copy of my virtual machine before I make modification in the graphical interface of centreon and I try to change the parameters of the poller?

        Thanks for you help

        • AL

          ndo2db.cfg file shouldn’t be empty, did you do this:
          /usr/src/ndoutils-1.5.2# cp config/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
          And then you should edit the file and insert your ndo database informations!
          e.g:
          # cat /usr/local/nagios/etc/ndo2db.cfg
          ndo2db_user=nagios
          ndo2db_group=nagios
          socket_type=unix
          socket_name=/usr/local/nagios/var/ndo.sock
          tcp_port=5668
          db_servertype=mysql
          db_host=localhost
          db_name=ndo
          db_port=3306
          db_prefix=nagios_
          db_user=ndouser
          db_pass=YourNdoDbPassword
          max_timedevents_age=1440
          max_systemcommands_age=1440
          max_servicechecks_age=1440
          max_hostchecks_age=1440
          max_eventhandlers_age=1440

          Make sure in your ndomod.cfg file “instance_name” should be the same as the “Poller Name” in “Configuration” > “Centreon” > “Pollers”

          In Configuration > Centreon > ndo2db.cfg :
          – General Tab:
          Status: enabled
          Requester: “the Poller Name”
          Socket Type: Unix
          Socket Name: /usr/local/nagios/var/ndo.sock
          TCP Port: 5668
          User and group ndo2db: nagios

          – Database Tab: The same as in your ndo2db.cfg file

          In “Configuration” > “Centreon” > “ndomod.cfg”
          Interface Type: unixsocket
          Output: /usr/local/nagios/var/ndo.sock
          Buffer File: /usr/local/nagios/var/ndomod.tmp

          What does this return:
          # ps aux | grep nagios
          and
          # ps aux | grep ndo2db

          You can take a snapshot of your VM just in case!

  • youmarva

    ps aux | grep nagios
    avahi 558 0.0 0.1 32356 1832 ? S 15:14 0:00 avahi-daemon: running [machinenagios-VirtualBox.local]
    nagios 943 0.0 0.0 27684 352 ? Ss 15:14 0:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
    1000 1824 0.0 0.2 336776 3064 ? Sl 15:14 0:00 /usr/lib/gvfs//gvfsd-fuse -f /run/user/machinenagios/gvfs
    root 2554 0.0 0.2 96596 4068 ? Ss 15:16 0:00 sshd: machinenagios [priv]
    1000 2693 0.0 0.1 96596 1984 ? S 15:16 0:00 sshd: machinenagios@pts/0
    root 2845 0.0 0.0 13680 960 pts/0 S+ 15:16 0:00 grep –color=auto nagios

    ps aux | grep ndo2db
    nagios 943 0.0 0.0 27684 352 ? Ss 15:14 0:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
    root 2960 0.0 0.0 13680 956 pts/0 S+ 15:19 0:00 grep –color=auto ndo2db

    I followed carefully the steps of your tutoriel but when I make the modification of ndo2db.cfg and ndomod.cfg in the interface of Centreon , Certain file were modified.

    As I had make several times installation, I made the snapshot of my VM before doing the configuration in centreon interface.

    • AL

      Are you able to open Nagios URL: http://YourServersIP/nagios/ ??
      if not check logging, it must be in something like /usr/local/nagios/var/nagios.log

      • youmarva

        yes the interface of Nagios works correctly, the problème is in the interface of centreon I have the error message “No connection broker found” in almost every tab of the interface :/

  • AL

    Did you check your config in “Configuration” > “Centreon” > “Pollers”
    IP Address: 127.0.0.1
    Localhost: yes
    Is default poller: No
    SSH port: 22
    Engine: Nagios
    Monitoring Engine Init Script: /etc/init.d/nagios
    Monitoring Engine Binary: /usr/local/nagios/bin/nagios
    Monitoring Engine Statistics Binary: /usr/local/nagios/bin/nagiostats
    Perfdata file: /usr/local/nagios/var/service-perfdata
    Status: Enabled

  • youmarva

    I verified on the snapshot of VM that I saved that the config of “Configuration” > “Centreon” > “Pollers” missed only this values:
    Localhost: yes
    Is default poller: No
    Status: Enabled

    it can affect the functioning of centreon?
    For your case, when you install centreon you find the values of configuration > centreon > ndomod.cfg / ndo2db.cfg as you show it in the screenshots of the Centreon configuration?

    Because I confront this problem when I change the original configuration of Centreon:
    “Configuration” > “Centreon” > ndo2db.cfg

    Requester : Central
    Socket Type: tcp
    Socket Name: /var/run/ndo.sock
    TCP Port: 5668
    User ndo2db: nagios
    Group ndo2db: nagios
    Database Information for ndo2db:
    Database Type : mysql
    Database Hoster: localhost
    Database Name : centreon_status
    Listening Port: 3306
    Prefix : nagios_
    User : centreon
    Password :

    “Configuration” > “Centreon” > ndo2db.cfg
    Instance Name: Central
    Interface Type:127.0.0.1
    Buffer File: “empty”

    when I don’t change these values​​, I have no errors, but there is not even centreon_serveur in monitoring tab.

    You have an idea where it may occur?

    Thank you for your understanding and patience 🙂

    (sorry for my english)

    • AL

      Can you show me the result of the following commands:
      # cat /usr/local/nagios/etc/ndomod.cfg
      # cat /usr/local/nagios/etc/ndo2db.cfg
      # cat /usr/local/nagios/etc/nagios.cfg | grep broker_module
      if you can send me content of /usr/local/centreon/log/centcore.log
      Screenshot of your Poller, ndo2db and ndomod configurations in Centreon.

      Email them all to: ac[@]terraltech.com

  • amine

    Hello ,

    You told that we will have to back to the shell to grant permissions for the centreon db user .

    Where i could copy paste those command please ?

    Thank you

    • AL

      Hi,
      You have to paste the commands on the server where you installed MySQL for Centreon by using your favorite Terminal!

  • MEINS

    Hi,
    followed your conversation…I still have the same problem fireing up the poller.

    First time installing nagios & centreon by your procedure I thought it was my fault that the poller did not work, second time I followed your instruction 100% but the poller does not work again.

    I have checked the settings you discussed with yourmava but could not find any differences.

    Can you give me a hint where to look at?

    Thanks.

    • AL

      Hi,
      I run through all the installation process and updated with some missing configuration steps.
      I also added a troubleshooting part at the end that might be helpful.

  • yimei

    Hello,it is a good guide!! But.. i have a problem, i can not set poller as localhost, everytime, when i choose poller central then localhost–yes and after i save, it’s stil not localhost, and maybe because of this , when i choose check “Run monitoring engine debug”, il will have generating files… NOK….. I has installed 2 times, it has the same error…

    Do you know why? Thanks you very much…….

    • AL

      In your Centreon Configuration, Configuration > Centreon > Pollers
      Is the poller running ? (status should be “yes” in green)

Creative Commons License