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

Add section about required database privileges #7

Closed winem closed 5 years ago

winem commented 5 years ago

This PR adds a section to the documentation to tackle the following error messages you will experience if you did the icinga2 database setup manually and not via the database configuration wizard that grants ALL privileges to the Icinga2 user.

# missing CREATE privilege
mysql -h 127.0.0.1 -p -u icinga2 icinga2 < schema/slaperiods.sql
ERROR 1142 (42000) at line 2: CREATE command denied to user 'icinga2'@'127.0.0.1' for table 'icinga_sla_periods'

# missing ALTER ROUTINE privilege
mysql -h 127.0.0.1 -p -u icinga2 icinga2 < schema/get_sla_ok_percent.sql 
ERROR 1370 (42000) at line 1: alter routine command denied to user 'icinga2'@'127.0.0.1' for routine 'icinga2.idoreports_get_sla_ok_percent'

# missing CREATE ROUTINE privilege 
# be careful, the error message is pretty ambiguous!
mysql -h 127.0.0.1 -p -u icinga2 icinga2 < schema/get_sla_ok_percent.sql 
ERROR 1044 (42000) at line 5: Access denied for user 'icinga2'@'127.0.0.1' to database 'icinga2'

This was tested on Ubuntu 18.04.2 with Icinga r2.10.5-1.

winem commented 5 years ago

Hi @lippserd,

I addressed all your comments and suggestions and pushed all the changes in a squashed commit.

lippserd commented 5 years ago

Thanks for the changes 🎉