Skip to main content
Solved

Centreon agent: can't not configure it cause must of my machines hostnames are less than 5 characters

  • June 2, 2026
  • 2 replies
  • 25 views

Forum|alt.badge.img+2

We are facing an issue when configuring the Centreon agent on several servers. The configuration process fails because most hostnames in our infrastructure are shorter than 5 characters, which appears to violate a validation constraint in the agent configuration process.

As a result, the agent cannot be deployed or started correctly on these hosts, preventing proper monitoring.

Expected behavior: the agent should accept short hostnames or allow configuration without enforcing a minimum hostname length constraint.

Best answer by fmattes

Hi,

We identified an issue on Linux CMA.

Here's a workaround while a fix is being prepared.

The issue only occurs when the host field is explicitly set in your agent configuration file.

The simplest fix is to remove it entirely from /etc/centreon-monitoring-agent/centagent.json.

When host is absent, the agent automatically uses the machine's system hostname (equivalent to running hostname in your shell).

Then restart the agent:

systemctl restart centagent

One requirement: the name returned by hostname on your machine must match exactly (case-sensitive) the host name as configured in the Centreon interface. If they differ, you have two options:

  • Rename the host in Centreon to match the machine's actual hostname, or
  • Set the machine's hostname to match what's in Centreon (hostnamectl set-hostname <name>).

Tell me if it helps

2 replies

fmattes
Centreonian
Forum|alt.badge.img+10
  • Centreonian
  • Answer
  • June 8, 2026

Hi,

We identified an issue on Linux CMA.

Here's a workaround while a fix is being prepared.

The issue only occurs when the host field is explicitly set in your agent configuration file.

The simplest fix is to remove it entirely from /etc/centreon-monitoring-agent/centagent.json.

When host is absent, the agent automatically uses the machine's system hostname (equivalent to running hostname in your shell).

Then restart the agent:

systemctl restart centagent

One requirement: the name returned by hostname on your machine must match exactly (case-sensitive) the host name as configured in the Centreon interface. If they differ, you have two options:

  • Rename the host in Centreon to match the machine's actual hostname, or
  • Set the machine's hostname to match what's in Centreon (hostnamectl set-hostname <name>).

Tell me if it helps


Forum|alt.badge.img+2

I do as you said and it work