Le 18/02/2013 20:45, Michael Friedrich a écrit :
On 18.02.2013 16:18, Serge Noiraud wrote:
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@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 ?

Not sure what you are trying to say - the documentation already tells you to grant the EXECUTE permissions to the icinga db user in order to access that new sla function.

did you miss that one?
No. I read carefuly.

https://wiki.icinga.org/display/howtos/Setting+up+Icinga+with+Reporting#SettingupIcingawithReporting-IcingaIDOUtils
You don't say it must be done with user icinga :


       MySQL

Import the function into your existing IDOUtils database.

|/usr/bin/mysql| |icinga < icinga-reports-1.8.0||/sql/mysql/icinga_availability||.sql|


If you are logged root, this is done under root.
You should say :|/usr/bin/mysql||-u icinga ||icinga < icinga-reports-1.8.0||/sql/mysql/icinga_availability||.sql

maybe I'm wrong


|

http://docs.icinga.org/latest/en/reporting_1.8.html#requirements

kind regards,
Michael


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

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users

Reply via email to