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

Michael Friedrich michael.friedrich at gmail.com
Mon Feb 18 20:45:35 CET 2013


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 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 ?

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?

https://wiki.icinga.org/display/howtos/Setting+up+Icinga+with+Reporting#SettingupIcingawithReporting-IcingaIDOUtils

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
>
>
>
> ------------------------------------------------------------------------------
> The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
> is your hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials, tech docs,
> whitepapers, evaluation guides, and opinion stories. Check out the most
> recent posts - join the conversation now. http://goparallel.sourceforge.net/
>
>
>
> _______________________________________________
> icinga-devel mailing list
> icinga-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/icinga-devel


-- 
DI (FH) Michael Friedrich

mail:     michael.friedrich at gmail.com
twitter:  https://twitter.com/dnsmichi
jabber:   dnsmichi at jabber.ccc.de
irc:      irc.freenode.net/icinga dnsmichi

icinga open source monitoring
position: lead core developer
url:      https://www.icinga.org




More information about the icinga-users mailing list