Installation of icinga notifications

Hi,

i was trying to install icinga notification on our icinga server, this our environment:

OS Ubuntu 20.04.6 LTS
Icinga Web 2 Version 2.12.1
mysql version Ver 8.0.39-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

I have followed the steps in the guide:

Created the user like this:

CREATE DATABASE notifications;
CREATE USER ‘notifications’@‘localhost’ IDENTIFIED BY ‘PASSWORDMODIFIED’;
GRANT ALL ON notifications.* TO ‘notifications’@‘localhost’;

Imported the schema

mysql -u root -p notifications < /usr/share/icinga-notifications/schema/mysql/schema.sql

and configured the yml file:

then when i launch the start of the component this is the result:

i have also tried to change the ip with localhost or the hostname of the VM without any result.

I have noticed that when i launch the command
GRANT ALL ON notifications.* TO ‘notifications’@‘localhost’;
this is the output:

image

it seems the grants havn’t been granted or am i wrong?
can you help me?

thanks

This looks like a network connectivity issue to me, I would check the local firewall and/or the network firewall. Is your database located on the same VM, same IP, as your notifications installation? Can you ensure you have connectivity from the command line of the notificatiosn server, to port 3306 of the database server? (I use the check_tcp plugin for that)
My two cents,
Jean

I have tried to make a telnet to the 3306 port and it works, the database is on the same server so as icinga is working correclty now i would expect that the connection should be working without any issue

When within mysql, can you issue the following statement?

select user, host from mysql.user;

This will show what users are defined. Note that having defined user@localhost will not allow user@172.31.184.151 to connect.

yes i confirm that exis at localhost, now i have modified my config file to localhost instead of IP address but same error
image

root on 127.0.0.1 can cause any issue when releasing grant on user?

Exact same error? Is it still referring to the 172.31.184.151 IP address?

No sorry now it refer to localhost

You are trying to connect with user notifications@127.0.0.1 but your DB user is notifications@localhost
Try changing the user used to connect to: notifications@localhost

1 Like