Icinga2 pgsql.sql missing

Hoping for help here.
During the installation of Icinga2, exactly the phase of installing PostgreSQL on the server, I came across an error
when executing the command:
sudo -u icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/pgsql.sql

the error:
-bash: /usr/share/icinga2-ido-pgsql/schema/pgsql.sql: No such file or directory

I am following this guide: Ubuntu - Icinga 2

Hoping for help here.
During the installation of Icinga2, exactly the phase of installing
PostgreSQL on the server, I came across an error when executing the
command:
sudo -u jwansulyman -d icinga < /usr/share/icinga2-ido-pgsql/schema/pgsql.sql

I do not see that command shown in the following instructions:

I am following this guide:
Ubuntu - Icinga 2

Do you perhaps instead mean this command?

psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/pgsql.sql

Also, what is the output of “apt-cache policy icinga2-ido-pgsql”?

Antony.

1 Like

Yes, the user icinga was meant. I executed the command and got the info that icinga2-ido-mysql is not installed. So I did that from apt and tried again.
I got prompted to enter a password:

Password for user icinga:
psql: error: FATAL:  password authentication failed for user "icinga"

and it failed, because I can’t remember setting up a password for this user :slight_smile:

  1. What is the output of “apt-cache policy icinga2-ido-pgsql”?

  2. Did you perform the steps:

cd /tmp
sudo -u postgres psql -c “CREATE ROLE icinga WITH LOGIN PASSWORD ‘icinga’”
sudo -u postgres createdb -O icinga -E UTF8 icinga

Antony.

Thank you for helping out!
Yes, these commands work. However instead of the second one, I executed:
psql -U icinga -d postgres -h 127.0.0.1 -W

icinga: role created
postgres: the database