[icinga-users] Icinga-reports and message : [SOLVED] icinga net.sf.jasperreports.engine.JRException: Error executing SQL statement for : graph_sla and graph_availibility

Serge Noiraud Serge.Noiraud at bull.net
Mon Feb 18 16:18:45 CET 2013


Hi everybody,

I think the following can be useful to some people who havethe 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*@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'@'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*@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

-- 

Serge Noiraud

Les logiciels libre, c'est mieux : Debian, Firefox, LibreOffice, ...
Tout ce qui n'est pas gratuit est perdu.

Développeur projet gramps : http://gramps-project.org/ et osm-gps-map : 
http://nzjrs.github.com/osm-gps-map

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.icinga.org/pipermail/icinga-users/attachments/20130218/5551be86/attachment.html>


More information about the icinga-users mailing list