You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the installation of Reporting module setting database for reporting which is different between icinga_ido database.
When I'm openning Reporting tab after all configuration and choosing before configured report - I see an error:
SQLSTATE[42883]: Undefined function: 7 ERROR: function idoreports_get_sla_ok_percent(bigint, unknown, unknown, unknown) does not exist
LINE 1: ...lay_name, s.display_name AS service_display_name, idoreports...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts., query was: SELECT h.display_name AS host_display_name, s.display_name AS service_display_name, h.display_name AS host_display_name, s.display_name AS service_display_name, idoreports_get_sla_ok_percent(so.object_id, '2023-01-04 04:42:24', '2023-01-04 08:42:24', NULL) AS sla FROM icinga_objects AS so
INNER JOIN icinga_services AS s ON s.service_object_id = so.object_id AND so.is_active = 1 AND so.objecttype_id = 2
INNER JOIN icinga_hosts AS h ON h.host_object_id = s.host_object_id ORDER BY LOWER(h.display_name) ASC, LOWER(s.display_name) ASC (Pdo.php:225)
I am very sure that problem is parameter signature (bigint, unknown, unknown, unknown) because postgresql function expects folowing signature id bigint, starttime timestamp without time zone, endtime timestamp without time zone, sla_id integer DEFAULT NULL::integer
The text was updated successfully, but these errors were encountered:
If you have followed these installation steps for Icinga 2 - PGSQL, you do not need to grant any additional privileges. You just have to import the function as described in the documentation to the appropriate database.
What does this command output?
psql -U icinga2 -d icinga2 -c "SELECT routine_name FROM information_schema.routines WHERE routine_type = 'FUNCTION' AND routine_schema = 'public';"
After the installation of Reporting module setting database for reporting which is different between icinga_ido database.
When I'm openning Reporting tab after all configuration and choosing before configured report - I see an error:
SQLSTATE[42883]: Undefined function: 7 ERROR: function idoreports_get_sla_ok_percent(bigint, unknown, unknown, unknown) does not exist
LINE 1: ...lay_name, s.display_name AS service_display_name, idoreports...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts., query was: SELECT h.display_name AS host_display_name, s.display_name AS service_display_name, h.display_name AS host_display_name, s.display_name AS service_display_name, idoreports_get_sla_ok_percent(so.object_id, '2023-01-04 04:42:24', '2023-01-04 08:42:24', NULL) AS sla FROM icinga_objects AS so
INNER JOIN icinga_services AS s ON s.service_object_id = so.object_id AND so.is_active = 1 AND so.objecttype_id = 2
INNER JOIN icinga_hosts AS h ON h.host_object_id = s.host_object_id ORDER BY LOWER(h.display_name) ASC, LOWER(s.display_name) ASC (Pdo.php:225)
I import both:
psql -U icinga2 icinga2 < schema/postgresql/slaperiods.sql
psql -U icinga2 icinga2 < schema/postgresql/get_sla_ok_percent.sql
i set all Users in postgresql with Superadmin rights.
I make on all users following:
GRANT EXECUTE ON FUNCTION idoreports_get_sla_ok_percent TO username;
I have no idea why i get this error.
Why in function parameter stand (bigint, unknown, unknown, unknown)?
When i login per psql in icinga2 database and execute following query:
select idoreports_get_sla_ok_percent(1,now()::timestamp,now()::timestamp,NULL);
Function can be execute....
I am very sure that problem is parameter signature (bigint, unknown, unknown, unknown) because postgresql function expects folowing signature id bigint, starttime timestamp without time zone, endtime timestamp without time zone, sla_id integer DEFAULT NULL::integer
The text was updated successfully, but these errors were encountered: