Time period validation error?

Give as much information as you can, e.g.

  • Director version (System - About): Icinga Web 2 Version
    2.6.2
  • Icinga Web 2 version and modules (System - About):

Loaded modules

|setup|2.6.2|
|director|1.10.2|
|incubator|0.20.0|
|ipl|v0.5.0|
|monitoring|2.6.2|
|reactbundle|0.9.0|

  • Icinga 2 version (icinga2 --version):
    icinga2 - The Icinga 2 network monitoring daemon (version: r2.10.3-1)
    System information:
    Platform: Raspbian GNU/Linux
    Platform version: 10 (buster)
    Kernel: Linux
    Kernel version: 5.10.103-v7+
    Architecture: armv7l

Build information:
Compiler: GNU 8.3.0
Build host: bm-wb-03

Application information:

General paths:
Config directory: /etc/icinga2
Data directory: /var/lib/icinga2
Log directory: /var/log/icinga2
Cache directory: /var/cache/icinga2
Spool directory: /var/spool/icinga2
Run directory: /run/icinga2

Old paths (deprecated):
Installation root: /usr
Sysconf directory: /etc
Run directory (base): /run
Local state directory: /var

Internal paths:
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid

  • Operating System and version:
  • Webserver, PHP versions: Apache2
    Server version: Apache/2.4.38 (Raspbian)
    Server built: 2023-03-02T14:26:27
    Server’s Module Magic Number: 20120211:84
    Server loaded: APR 1.6.5, APR-UTIL 1.6.1
    Compiled using: APR 1.6.5, APR-UTIL 1.6.1
    Architecture: 32-bit
    Server MPM:
    Server compiled with…
    -D APR_HAS_SENDFILE
    -D APR_HAS_MMAP
    -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
    -D APR_USE_SYSVSEM_SERIALIZE
    -D APR_USE_PTHREAD_SERIALIZE
    -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
    -D APR_HAS_OTHER_CHILD
    -D AP_HAVE_RELIABLE_PIPED_LOGS
    -D DYNAMIC_MODULE_LIMIT=256
    -D HTTPD_ROOT=“/etc/apache2”
    -D SUEXEC_BIN=“/usr/lib/apache2/suexec”
    -D DEFAULT_PIDLOG=“/var/run/apache2.pid”
    -D DEFAULT_SCOREBOARD=“logs/apache_runtime_status”
    -D DEFAULT_ERRORLOG=“logs/error_log”
    -D AP_TYPES_CONFIG_FILE=“mime.types”
    -D SERVER_CONFIG_FILE=“apache2.conf”

PHP 7.3.31-1~deb10u3 (cli) (built: Feb 26 2023 13:00:55) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.31, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.31-1~deb10u3, Copyright (c) 1999-2018, by Zend Technologies

Problem:
Creating a TimePeriod range fails deployment validation with the following startup log:

"
[2023-03-19 09:32:24 -0600] information/cli: Icinga application loader (version: r2.10.3-1)
[2023-03-19 09:32:24 -0600] information/cli: Loading configuration file(s).
[2023-03-19 09:32:24 -0600] information/ConfigItem: Committing config item(s).
[2023-03-19 09:32:24 -0600] critical/config: Error: Validation failed for object ‘always’ of type ‘TimePeriod’; Attribute ‘ranges’: Invalid time range definition ’ 00:01-24:00’: Can’t convert ’ 00’ to an integer. Location: in
[stage]/zones.d/director-global/timeperiods.conf: 4:5-8:5
[stage]/zones.d/director-global/timeperiods.conf(2): import “legacy-timeperiod”
[stage]/zones.d/director-global/timeperiods.conf(3): display_name = “always”
[stage]/zones.d/director-global/timeperiods.conf(4): ranges = { ^^^^^^^^^^
[stage]/zones.d/director-global/timeperiods.conf(5): “monday” = " 00:01-24:00" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[stage]/zones.d/director-global/timeperiods.conf(6): “tuesday” = " 00:01-24:00" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[stage]/zones.d/director-global/timeperiods.conf(7): “wednesday” = " 00:01-24:00" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[stage]/zones.d/director-global/timeperiods.conf(8): } ^^^^^
[stage]/zones.d/director-global/timeperiods.conf(9): }
[stage]/zones.d/director-global/timeperiods.conf(10):
[2023-03-19 09:32:24 -0600] critical/config: 1 error "

Similar error occurs with the 00:00-24:00 time period.
Also I would expect the following range to be valid:
[2023-03-19 09:56:18 -0600] critical/config: Error: Validation failed for object ‘always’ of type ‘TimePeriod’; Attribute ‘ranges’: Invalid time range definition ’ 00:01-23:59’: Can’t convert ’ 00’ to an integer. Location: in [stage]/zones.d/director-global/timeperiods.conf: 4:5-6:5

Icinga has a great compatibility between versions, but have a look at this:
icinga2 2.10.2 (2018-11-14)
icingaweb 2.6.2 (2018-11-21)
director 1.10.2 (2022-11-03)

but it’s the space before the range :slight_smile: