Ep 35: Monitoring von SQL-Datenbanken mit Checkmk
[0:00:00] | Welcome to the Checkmk channel. Today, we are taking a closer look at our SQL databases. |
[0:00:16] | Databases run insane amounts of applications. They store data for businesses all over the world as well as open-source projects and organizations, and you really can't think a lot of applications without an SQL database. |
[0:00:31] | In this video, we are taking a closer look at how to monitor two of the best known SQL databases on Linux. But the process is the same, for example, for MS SQL on Windows or similar databases. |
[0:00:43] | So, let's take a closer look at how this is configured. So, let's start with MySQL. |
[0:00:51] | It's probably still the best known SQL database on Linux systems, quickly followed by PostgreSQL, which will be the second database that we are going to take a look at. |
[0:01:02] | But the process in Checkmk how to monitor these databases is quite simple. To get started, we head for the Setup menu and just start searching, in this case, MySQL. |
[0:01:14] | We want to use that rule set here, create a new rule. And there really is no configuration that we need in a default installation of MySQL and the same goes for MariaDB. |
[0:01:26] | So, if you're confused there, it works the same, it's called MySQL in Checkmk, but it's really the same database. |
[0:01:34] | In the default installation, the root user can log into the database without credentials, which means we don't have to configure anything here. |
[0:01:42] | If you have some special setup, you might need to use one of these options here to provide credentials to define the socket which to connect to. |
[0:01:51] | Maybe to connect to a remote host, that is also possible, depending on where you run the plugin. And there's some more configuration options. |
[0:01:59] | But in the default, it really suffices here to configure deploy the MySQL plugin, and that's that. |
[0:02:07] | I'm going to bind this to the localhost, which is our demo system here. In a production environment, of course, you would probably use a host tag or a label to find out which hosts are hosting MySQL databases to deploy the plug-in to. |
[0:02:25] | So, I'm going to save this. And because it's the easiest, we are also directly creating the Postgres rule. Again, we just search for the term here. we see in the section of the agent rules the PostgreSQL database plug-in, which we're going to select. Again, we create a rule. |
[0:02:47] | Here we have only some specific settings, but we don't need them either. It's good enough for default installations to deploy Postgres plug-in. |
[0:02:56] | And again, I'm pinning that to localhost here because that's the only server we have running this. So, now I'm going to activate changes. Then we are baking and signing the agents. |
[0:03:12] | That's done over here. And as I already enabled automatic agent updates in this site, after the baking process has finished, the agents will quite quickly fetch the new agent package, install it, and then we will be able to discover the services. |
[0:03:27] | So, now we saw the agent baking was successful. We can take a look at the configuration and we can see that the MySQL and the PostgreSQL plug-ins have been baked into the configuration, which means when we now go to the discovery, we will find those new services. |
[0:03:49] | So, let's go to our localhost here again. Service configuration. And after a rescan, we will find the new services and there's our services. |
[0:04:05] | So, let's first take a quick look at the MySQL services. We have the connections to the MySQL database, we can see the IO of the storage engine, we see the overall instance state, we see the sessions to the database, and we get some version information what's running here. |
[0:04:25] | We can actually see it's a MariaDB in this case. But you see the MySQL plug-in still works, as I said. |
[0:04:34] | Then we see all the Postgre services. There's quite some more, but we can see there's similar information there. We also see connections here, we see the state of the daemon, we see database sizes here. |
[0:04:47] | So, quite some information relevant to make sure your database is healthy. So, let's accept those services into monitoring here. |
[0:04:57] | Then we can activate our changes and that's how you enable proper monitoring of MySQL and PostgreSQL databases. |
[0:05:08] | That concludes our video for today. Thank you so much for watching. Make sure to subscribe and I will see you around. |
Wollen Sie mehr über Checkmk erfahren? Dann nehmen Sie an unserem Webinar "Einführung in Checkmk" teil!