Hi everybody,
I think the following can be useful to some people who have
the same problem :
icinga net.sf.jasperreports.engine.JRException: Error
executing SQL statement for : graph_sla
icinga net.sf.jasperreports.engine.jrexception error
executing sql statement for graph availability
These two errors was related to the following reports
HostAvailabilityReportInGivenTime and
ServiceAvailabilityReportInGivenTime
All works correctly except those two reports. After reading all
docs I finally found the following :
mysql >show function
status;
+--------+---------------------+----------+------------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
| Db | Name | Type | Definer |
Modified | Created | Security_type |
Comment | character_set_client | collation_connection | Database
Collation
|
+--------+---------------------+----------+------------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
| icinga | icinga_availability | FUNCTION | root <at> localhost
| 2013-02-18 15:36:12 | 2013-02-18 15:36:12 | DEFINER
| | latin1 | latin1_swedish_ci |
latin1_swedish_ci
|
+--------+---------------------+----------+------------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
1 row in set (0.00 sec)
The function is owned by root <at> localhost (Definer)
All the installation was made with the root user.
I tried to get icinga as owner, so I modify this :
GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE ROUTINE, CREATE
VIEW, INDEX, ALTER, EXECUTE ON icinga.* TO 'icinga' <at> 'localhost';
then I reload sql/mysql/icinga_availability.sql with user icinga
instead of root.
Now we have :
mysql >show function
status;
+--------+---------------------+----------+------------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
| Db | Name | Type | Definer |
Modified | Created | Security_type |
Comment | character_set_client | collation_connection | Database
Collation
|
+--------+---------------------+----------+------------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
| icinga | icinga_availability | FUNCTION | icinga <at> localhost
| 2013-02-18 15:51:45 | 2013-02-18 15:51:45 | DEFINER
| | latin1 | latin1_swedish_ci |
latin1_swedish_ci
|
+--------+---------------------+----------+------------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
1 row in set (0.28
sec)
and all is working perfectly now.
Is there a better way to do that ?
OS : debian 6.0.6
icinga : 1.8.4
icinga-web : 1.8.2
icinga-reports : 1.8.1
jasperreports : 4.7
Serge