Project

General

Profile

Actions

Bug #13582

closed

Zabbix service gives error about required "Hostname" field, even when the field is populated

Added by Caleb Hornbeck about 2 years ago. Updated about 2 years ago.

Status:
Not a Bug
Priority:
Normal
Assignee:
-
Category:
Zabbix
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
22.05
Affected Architecture:
7100

Description

When configuring the Zabbix agent service, I can't seem to get around the error that says "The following input errors were detected: - Hostname field is required." I've tested this with the packages for versions 5.4 and 6.0 of the zabbix agent. In our setup, I've populated the "Server" field with two IPs, "Server Active" with 127.0.0.1, "Hostname" with "Zabbix server", "Timeout" with 10, and set the respective TLS-related params to use PSK. I've found that I can populate all these fields without checking the box to enable the service, and save them without issues. Whenever that checkbox is checked to enable the service, though, it fails with the message above. This is the case whether I check the box and populate the fields all before clicking "Save"; or if I populate the fields, click "Save", then check the box and click "Save" again. In the second method, I was able to go to another part of the UI, then come back to the zabbix agent config page and verify that all the fields remained populated as I set them.

Actions #1

Updated by Caleb Hornbeck about 2 years ago

Upon further testing, this seems to be an issue related to bug #13128 as it relates to input validation. If I set the "Hostname" field to "zabbix.test", it will work just fine with all my other settings.

Along these same lines, the "Server" field does not accept networks in CIDR notation.

All of our servers (Centos/Rocky Linux) run the Zabbix agent 5.4 or 6.2, and we have not had any issue with "Zabbix server" for the "Hostname" setting (which is the default that comes with the package anyway), nor comma-separated CIDR lists.

Actions #2

Updated by Kris Phillips about 2 years ago

Are you editing the config file manually or something and just using the webConfigurator interface to start and manage the service? The Server and Hostname fields are required because Zabbix won't operate without a Zabbix server defined and a hostname defined, so I'm not understanding how this is a bug. This seems to be "how it should work". Please elaborate.

The redmine 13128 is related to running multiple Zabbix servers in an HA cluster, which doesn't seem to be relevant here. The input validation simply needs to be updated to allow the old AND new format.

Actions #3

Updated by Kris Phillips about 2 years ago

  • Status changed from New to Incomplete

Marking as Incomplete until additional information can be provided.

Actions #4

Updated by Caleb Hornbeck about 2 years ago

Kris Phillips wrote in #note-2:

Are you editing the config file manually or something and just using the webConfigurator interface to start and manage the service?

No, all my interaction with this has been done through the webConfigurator.

Kris Phillips wrote in #note-2:

The Server and Hostname fields are required because Zabbix won't operate without a Zabbix server defined and a hostname defined, so I'm not understanding how this is a bug. This seems to be "how it should work". Please elaborate.

Yes, I understand the field is required. The issue is that the pfSense package requires a format that the zabbix agent package does not require. In my situation, I was planning on setting the "Hostname" field to "Zabbix server", which is the default that comes with the agent config when you install the package on other OS's (like Centos and Rocky Linux). When I tried to use "Zabbix server" as the "Hostname" parameter, the pfSense package would give me an error when I tried to enable the service. Only after setting "Hostname" to "zabbix.test" did the pfSense package allow me to start the service. I believe this is incorrect input validation, because all of our other infrastructure that has the zabbix agent allows us to keep the default "Zabbix server" for the Hostname and still start the service without errors.

Kris Phillips wrote in #note-2:

The redmine 13128 is related to running multiple Zabbix servers in an HA cluster, which doesn't seem to be relevant here. The input validation simply needs to be updated to allow the old AND new format.

I was referencing that bug only for the input validation part. It appears that there's more than one field that could use some updated input validation.

Actions #5

Updated by Jim Pingle about 2 years ago

  • Status changed from Incomplete to Not a Bug

Hostnames/FQDNs have rules governing their format. Hostnames cannot have spaces. While Zabbix may allow spaces in their definition of "hostname", the functions we use to validate hostnames use the defined standards for that type of field.

If someone wants to submit a patch that changes the validation to follow the standards set by Zabbix there, we might consider it, but there isn't a compelling reason to follow their rules here just because they allow it when it doesn't follow set standards.

Actions

Also available in: Atom PDF