[solved] Upgrade from 2.3 failed related to service_period

  • Steps to reproduce the issue
  1. Have an existing Raw 2.3.0p29 installation which makes use of service times.
  2. Upgrade to Raw 2.4 beta.
  • Actual behaviour
    After the upgrade, the Nagios part of Checkmk will not start. Error message:
Reading configuration data...
   Read main config file okay...
Processing object config directory '/omd/sites/home1/etc/nagios/conf.d'...
Processing object config file '/omd/sites/home1/etc/nagios/conf.d/templates.cfg'...
Processing object config file '/omd/sites/home1/etc/nagios/conf.d/check_mk_templates.cfg'...
Processing object config file '/omd/sites/home1/etc/nagios/conf.d/check_mk_objects.cfg'...
Error: Invalid host object directive 'service_period'.
Error: Could not add object property in file '/omd/sites/home1/etc/nagios/conf.d/check_mk_objects.cfg' on line 1687.
   Error processing object config files!


***> One or more problems was encountered while processing the config files...

     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.
Starting apache...OK
Starting crontab...OK

Handled like this: Removed time periods from the Checkmk web interface and those rules which depended on it. As instance owner: Ran “cmk --update”. But now my time period based rules are gone, of course, and would need to be re-implemented (which I haven’t tried yet).

Operating system: Debian 12.

I can confirm the bug.

The old 2.3 config generation created a service like this, if a service period is set.

define service {
  _SERVICE_PERIOD               time_period_1
...
}

With 2.4 the config generation tries to create a real service object directive.

define service {
  service_period                time_period_1
}

As this service directive is not existing, we get the shown error.

4 Likes

Thank you, troelsarvin, for the report and
thank you, Andreas, for the confirmation and the further analysis.

This is really helpful for the Development team, we will have a look into.

Best regards,
Gregor

Hey @troelsarvin ,

we could reproduce and fix it. It is already part of 2.4.0b2. So if you have some time, I would appreciate your feedback if it works now.

Best regards,
Gregor

1 Like

I can no longer upgrade from the older generation, so I can not verify. But it is good to hear it is fixed.

1 Like

This topic was automatically closed after 10 days. New replies are no longer allowed. Contact an admin if you think this should be re-opened.