You are here

mpm configuration

Hi,

I have trouble to understand the settings of the different sections : [default], [db_server]...

I have a remote MySQL server registered in Zabbix as DBSERVER01, where there are several databases:

> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| phpmyadmin         |
| myapp              |
+--------------------+

The most important DB I need to monitor is "myapp" of course, but maybe I should watch some others ?

Here is what looks like my conf file (removed comments for this post) :

[default]
Type         = mysqld
Debug         = 2
LogFile       = /var/log/fromdual/FromDualMySQLagent.log
CacheFileBase = /var/log/fromdual/cache/FromDualAgentCache

Username     = zabbix_user
Password     = zabbix_pass
MysqlHost    = localhost
MysqlPort    = 3306

ZabbixServer = 1.2.3.4

Disabled     = false

Modules      = process mysql myisam slave mpm server

[DBSERVER01]          # This MUST match Hostname in Zabbix!

Type         = mysqld

MysqlPort    = 3306
Modules      = process mysql myisam slave
PidFile      = /var/run/mysqld/mysqld.pid

My question is about the Modules : where should I write them ? in the default section or in the [DBSERVER01] section ?
If I look at the logs, I can see :

DBG : The defaults parameters of this configuration file are:
DBG :   Modules - process mysql myisam slave mpm server
DBG : The parameters of section DBSERVER01 are:
DBG :   Modules - process mysql myisam slave
DBG : The combined (default + section) parameters for section DBSERVER01 are:
DBG :   Modules - process mysql myisam slave
...
INFO:   Processing module process for section DBSERVER01 now...
INFO:   Processing module process for section DBSERVER01 finished.
INFO:   Processing module mysql for section DBSERVER01 now...
INFO:   Processing module mysql for section DBSERVER01 finished.
INFO:   Processing module myisam for section DBSERVER01 now...
INFO:   Processing module myisam for section DBSERVER01 finished.
INFO:   Processing module slave for section DBSERVER01 now...
INFO:   Processing module slave for section DBSERVER01 finished.

So, when are the mpm and server modules treated ?
The problem is that the graph associated to values coming from the "server" module are empty (Network traffic, CPU utilization, etc...

Regards

Taxonomy upgrade extras: 

Hi burps

In Zabbix we have "hosts". In MPM a host is either a server (DBSERVER01) or a MySQL Instance (mysqld).

The host section [DBSERVER01] or [mysqld] overwrites the [default] section.

The MPM Agent is triggered by the mpm Module in the Server section. So it needs only ONE mpm module per MPM Agent.

In your case it most probably makes sense to have 2 sections: One for the Server and one for the Database:

[DBSERVER01]
Modules = mpm server

[mysqld]
Modules = process mysql myisam innodb master slave security
Type = mysqld
MysqlPort = 3306
PidFile = /var/run/mysqld/mysqld.pid

You also need 2 hosts in Zabbix associated with the according templates...

I hope this helps?

Regards,
Shinguz

Shinguzcomment

I somehow solved my problem : might not be optimal, but it just works :

[default]
#Modules      = mpm server
[DBSERVER01]
Modules      = process mysql myisam slave mpm server

Regards
Burpscomment