Giter Site home page Giter Site logo

Your MySQL Database Server is running currently inside the icinga2 container. In future, the MySQL will be located in a separate container by default. about icinga2 HOT 22 CLOSED

hsyedshams avatar hsyedshams commented on September 16, 2024
Your MySQL Database Server is running currently inside the icinga2 container. In future, the MySQL will be located in a separate container by default.

from icinga2.

Comments (22)

hsyedshams avatar hsyedshams commented on September 16, 2024 1

Thanks!
So i just need to comment message line and reload the icinga service.
So as per our whole discussions, we checked file (/etc/icingaweb2/resources.ini) and found database running on seperate mariadb container. And notification is giving because mariadb started locally at some point but now database has separate container for storing data.
It means i dont need to configure anything on icinga container to use mardia container as database, its already confgiured.

`author = "xxxxxx"
message = "Your MySQL Database Server is running currently inside the icinga2 container. In future, the MySQL will be located in a separate container by default. Find more information at https://github.com/jjethwa/icinga2#moving-to-separate-mysql-container"
start = "xxxxxxxxxxxxxx"
end = "xxxxxxxxxxxxxxxxx"
hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
`

Thanks for your overall help so far.

from icinga2.

jjethwa avatar jjethwa commented on September 16, 2024

Hi @hsyedshams

Thanks for the report. That announcement is generated here: https://github.com/jjethwa/icinga2/blob/master/content/opt/setup/70-announcements#L40

This means that there is some data under /var/lib/mysql in the icinga2 container. Can you confirm?

from icinga2.

hsyedshams avatar hsyedshams commented on September 16, 2024

Hi @jjethwa

Thanks too for your prompt reply!

Yes as i mentioned above, second output of icinga container /var/lib/mysql output, there is also mysql folder.
I am little bit confused which is the actual database which system using, as per notification message it seems system is using database inside icinga container.

How to ensure which is the actual Database ?

thanks!

from icinga2.

jjethwa avatar jjethwa commented on September 16, 2024

Sorry, @hsyedshams, I misread that part. I don't think there should be data there. Is that a volume?

from icinga2.

hsyedshams avatar hsyedshams commented on September 16, 2024

No Problem, could you please tell me which output do you need for me i am not sure about data/vloume.
thanks!

from icinga2.

jjethwa avatar jjethwa commented on September 16, 2024

Hi @hsyedshams

How do you start the icinga2 container?

from icinga2.

hsyedshams avatar hsyedshams commented on September 16, 2024

docker exec -it monitor01 service icinga2 reload
docker start/restart monitor01

from icinga2.

jjethwa avatar jjethwa commented on September 16, 2024

Hi @hsyedshams

That looks like the exec to force a daemon reload to pick up new configs. Do you have the original command used to start the container or was it using docker compose?

from icinga2.

jjethwa avatar jjethwa commented on September 16, 2024

If you're only interested in deleting the message, you can check /etc/icingaweb2/announcements.ini in the icinga2 container

from icinga2.

hsyedshams avatar hsyedshams commented on September 16, 2024

Thanks! May be i miss understood, i need to verify where is our actual database is, on container icinga or maridadb.

from icinga2.

jjethwa avatar jjethwa commented on September 16, 2024

Ah! Got it!

Can you check /etc/icinga2/features-available/ido-mysql.conf in the icinga2 container? That shows the database connection information. Is it local or the mariadb container?

from icinga2.

hsyedshams avatar hsyedshams commented on September 16, 2024

Hi, sorry for being late reply!

here is output from icinga container (/etc/icinga2/features-available/ido-mysql.conf) :
/**

  • The db_ido_mysql library implements IDO functionality
  • for MySQL.
    */

library "db_ido_mysql"

object IdoMysqlConnection "ido-mysql" {
user = "icinga2"
password = ""
host = ""
port = 3306
database = "icinga2idomysql"
}

from icinga2.

jjethwa avatar jjethwa commented on September 16, 2024

np @hsyedshams

Unfortunately that didn't help. Inside the cointainer, can you run:

supervisorctl status all

from icinga2.

hsyedshams avatar hsyedshams commented on September 16, 2024

Ok, let's find it here.

Output from the icinga container:
root@icinga2:/# supervisorctl status all
apache2 RUNNING pid 1523, uptime 73 days, 14:53:20
director RUNNING pid 1522, uptime 73 days, 14:53:20
fatalservice RUNNING pid 1521, uptime 73 days, 14:53:20
icinga2 RUNNING pid 3574936, uptime 0:00:04
mysql RUNNING pid 1524, uptime 73 days, 14:53:20

from icinga2.

jjethwa avatar jjethwa commented on September 16, 2024

Thanks, that does seem like a mariadb process is running.

One more, do you mind sharing (with sensitive information removed) the contents of /etc/icingaweb2/resources.ini

from icinga2.

hsyedshams avatar hsyedshams commented on September 16, 2024

Thanks! So it means mariadb is running inside icinga container. So how we can switch database to separate maridb container.

Here we go

[icingaweb_db]
type = "db"
db = "mysql"
host = mariadb
port = 3306
dbname = icingaweb2
username = xxxxxx
password = xxxxxxxxxxx
prefix = "icingaweb_"
charset = "utf8"
persistent = "0"

[icinga_ido]
type = "db"
db = "mysql"
host = mariadb
port = 3306
dbname = icinga2idomysql
username = xxxxxx
password = xxxxxxxxxxxx
charset = "utf8"
persistent = "0"

[director]
type = "db"
db = "mysql"
host = mariadb
port = 3306
dbname = icingaweb2_director
username = xxxxxx
password = xxxxxxxxxxxxx
charset = "utf8"
persistent = "0"
`

from icinga2.

jjethwa avatar jjethwa commented on September 16, 2024

This is the output I needed to see! 😄 The host is correctly set to the mariadb container. It looks like the local mariadb started up at some point, but it doesn't seem like you need to worry about it being active.

from icinga2.

hsyedshams avatar hsyedshams commented on September 16, 2024

If the host already set maridb container, it means pointing to host mariadb container, so for i can understand here.

But why i am getting in the web "our MySQL Database Server is running currently inside the icinga2 container. In future, the MySQL will be located in a separate container by default."

from icinga2.

jjethwa avatar jjethwa commented on September 16, 2024

The check to add the announcement is very basic, it just looks for the existence of any file inside the mysql/mariadb directory locally: https://github.com/jjethwa/icinga2/blob/master/content/opt/setup/70-announcements#L40

Since mariadb started locally at some point in time, probably before you transferred the data to the separate container, the old database files still exist (locally). I think it's safe just to remove the announcement.

from icinga2.

hsyedshams avatar hsyedshams commented on September 16, 2024

Thank you.
Ok cool idea would be remove the announcement, could u please point me how to remove the announcement.

from icinga2.

jjethwa avatar jjethwa commented on September 16, 2024

Announcements are added under /etc/icingaweb2/announcements.ini

from icinga2.

jjethwa avatar jjethwa commented on September 16, 2024

Hi @hsyedshams

That summarises it perfectly. Just comment out that section and you should be good to go 😄

from icinga2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.