Icinga / icingaweb2-module-idoreports

Icinga IDO Reports provides host and service availability reports for Icinga based on the monitoring database (IDO).
GNU General Public License v2.0
34 stars 13 forks source link

Unable to import Database Schema MySQL >= 5.7 #46

Closed winter1967 closed 2 years ago

winter1967 commented 3 years ago

Describe the bug

The database schema have to be import in icinga IDO DB. It ended with a message: ERROR 1067 (42000) at line 2: Invalid default value for 'start_time'

Sorry, there are two issuses open with the same case: https://github.com/Icinga/icingaweb2-module-idoreports/issues/41 https://github.com/Icinga/icingaweb2-module-idoreports/issues/42

To Reproduce

At a mysql Database >= 5.7:

Steps to reproduce the behavior:

  1. mysql -p -u icinga2 icinga2 < schema/mysql/slaperiods.sql

Expected behavior

Import successful

Your Environment

Additional context

Take a look: https://dev.mysql.com/doc/refman/5.7/en/datetime.html The Timestamp have not to be == 0

MySQL does not accept TIMESTAMP values that include a zero in the day or month column or values that are not a valid date. The sole exception to this rule is the special “zero” value '0000-00-00 00:00:00', if the SQL mode permits this value. The precise behavior depends on which if any of strict SQL mode and the NO_ZERO_DATE SQL mode are enabled; see Section 5.1.10, “Server SQL Modes”.

This would be helpful: Setting the timestamp in the schema to : '1000-01-01 00:00:00'

nilmerg commented 2 years ago

This is fixed in version 0.9.1.

nilmerg commented 2 years ago

Duplicate of #1