Skip to main content
Version: ⭐ 24.04

Attach a poller to a central or a remote server

Prerequisites

Install the poller using packages.

Step 1: Configure a new Poller

As of Centreon version 18.10, a new wizard has been added for adding a new poller to the Centreon platform.

  1. Go to the Configuration > Pollers > Pollers menu and click Add to configure a new poller.

  2. Select Add a Centreon Poller and click Next:

    image

  3. Select the option you want:

    • Create new Poller if you haven't registered the poller yet on the central or remote server
    • Select a Poller if you have already registered the poller on the central or remote server.
  4. Type in the name, the IP address of the new poller, and the IP address of the Central Server. Click Next:

    image

    The IP address of the Poller is the IP address or the FQDN used to access this poller from the Central server.

    The IP address of the Central server is the IP address or the FQDN used to access the Central server from the Poller.

  5. Link the poller to the central server or to a remote server:

  • If you want to link the poller to the Central Server, click Apply:

    image

  • If you want to link the poller to an existing Remote Server, select one from the list, then click Apply.

    If you want to change the direction of the flow between the Central Server (or the Remote Server) and the Poller, check the Advanced: reverse Centreon Broker communication flow checkbox. In this case, it will be necessary to export the configuration of the poller as well as the server to which it will be attached.

    In a few seconds the wizard will configure your new poller.

    image

Step 2: Enable communication

The communication between the Central server and a Poller is ensured by Gorgone and can be done using ZMQ (with a Gorgone running on the Poller, recommended) or using SSH protocol.

  1. Select the communication type:

    Edit the newly created Poller configuration, and select ZMQ as Gorgone connection protocol. Define the suitable port (port 5556 is recommended).

    image

    Click Save.

    Note that the SSH Legacy port is no longer used, and will be removed.

    If you were using it in custom scripts, consider changing to the Gorgone communication system.

  2. Copy the Gorgone configuration:

    From the poller list, click the Display Gorgone configuration action icon on the line corresponding to your Poller image

    A popin will show the configuration to copy into the Poller terminal. Click Copy to clipboard.

    image

    Paste the content of the clipboard directly into the Poller terminal as it contains the following content, and will fill the right file:

    cat <<EOF > /etc/centreon-gorgone/config.d/40-gorgoned.yaml
    name: gorgoned-My Poller
    description: Configuration for poller My Poller
    gorgone:
    gorgonecore:
    id: 2
    external_com_type: tcp
    external_com_path: "*:5556"
    authorized_clients:
    - key: Np1wWwpbFD2I0MdeHWRlFx51FmlYkDRZy9JTFxkrDPI
    privkey: "/var/lib/centreon-gorgone/.keys/rsakey.priv.pem"
    pubkey: "/var/lib/centreon-gorgone/.keys/rsakey.pub.pem"
    modules:
    - name: action
    package: gorgone::modules::core::action::hooks
    enable: true

    - name: engine
    package: gorgone::modules::centreon::engine::hooks
    enable: true
    command_file: "/var/lib/centreon-engine/rw/centengine.cmd"

    EOF

    Hit the Enter key for the command to be applied.

    You can copy the configuration in a custom file by copying the content from the popin.

  3. Restart the Gorgone daemon:

    From the Poller, run the following command to restart the Gorgone service:

    systemctl restart gorgoned

    Make sure it is started by running the following command:

    systemctl status gorgoned

    It should result as follows:

    ● gorgoned.service - Centreon Gorgone
    Loaded: loaded (/etc/systemd/system/gorgoned.service; disabled; vendor preset: disabled)
    Active: active (running) since Mon 2020-03-24 19:45:00 CET; 20h ago
    Main PID: 28583 (perl)
    CGroup: /system.slice/gorgoned.service
    ├─28583 /usr/bin/perl /usr/bin/gorgoned --config=/etc/centreon-gorgone/config.yaml --logfile=/var/log/centreon-gorgone/gorgoned.log --severity=info
    ├─28596 gorgone-dbcleaner
    ├─28597 gorgone-engine
    └─28598 gorgone-action

    Mar 24 19:45:00 localhost.localdomain systemd[1]: Started Centreon Gorgone.
  4. To force the Central's Gorgone daemon to connect to the Poller, restart it with the following command from the Central server:

    systemctl restart gorgoned

Step 3: Export the configuration of the remote

This step only applies if you are attaching a poller to a remote server (not to a central server).

  1. On the central server, deploy the configuration of the remote server to which the poller will be attached:

    • Go to Configuration > Pollers > Pollers and select the remote server.
    • Click Export configuration.
    • Select the first four boxes, select the Restart method, and then click Export.
  2. Restart gorgone on the remote server:

    systemctl restart gorgoned

Step 4: Export the configuration of the poller

  1. From the poller list, select the poller and click Export configuration.

  2. Then check the first four boxes, select the Restart method, and click Export:

    image

    The poller's engine will then start and connect to the Broker service of the central server or remote server (according to which one you have attached the poller to).

    image

Getting started

Go to the Getting Started chapter to configure your first monitoring.