You are here

FromDual Performance Monitor as a Service (MaaS) Installation Guide


Monitoring as a Service (MaaS)

The FromDual Performance Monitor for MariaDB and MySQL (fpmmm) can be run in 2 different modes:

  1. Locally in your company on your company machines (aka on-premises).
  2. As Monitoring as a Service (MaaS). This 2nd topic we will cover in this chapter.

back to ToC

How to install fpmmm for Maas

To install a fpmmm Agent for MaaS you have to install it normally as described above on your MariaDB/MySQL database machine. It will collect data about your machine and your database and send them to the remote service which is provided by FromDual for its customers.

mpm_inst_guide06.png

The data are uploaded via a https file uploads. So only a one way communication is possible! We cannot access your systems! Only you (and our engineers) can see your performance data on the Monitoring Server.

back to ToC

How to configure fpmmm for MaaS

Create a configuration file for example like this:

# cp /opt/fpmmm/tpl/fpmmm.conf.template /etc/fpmmm.conf

To make the fpmmm Agent work in a MaaS set-up you need a hash key from us so we can identify you non-ambig­uous and we can make sure nobody is doing nasty things with your service. You can request such a hash key, if you have not received one yet from here. To allocate you the correct re­sources we further need to know from you:

  • The company name you want to use (for example FromDual)
  • The server name the agent is running on (for example deb11db1)
  • A name which identifies your database instance (for example db1)

All those 3 identifiers together must uniquely identify your database instance you want to monitor. When we got these information we can create the service for you and provide you a configuration file.

The configuration file will look as follows:

[self]

Interval      = 60
MyPidFile     = /run/lock/fpmmm/fpmmm.pid


[default]

Debug         = 2
LogFile       = /var/log/fpmmm/fpmmm.log
CacheFileBase = /var/cache/fpmmm/fpmmm
AgentLockFile = /run/lock/fpmmm/fpmmm.lock

MaaS          = on
Hash          = <hash>
Method        = https
Url           = https://support.fromdual.com/maas/receiver.php


[<company>.<server_name>]

Type          = machine
Modules       = fpmmm server smart


[<company>.<server_name>.<db_name>]

Type          = instance
Modules       = process mysql myisam innodb master slave security data user

Username      = root
Password      = secret
MysqlHost     = 127.0.0.1
MysqlPort     = 3306
DbPidFile     = /var/lib/mysql/<server_name>.pid

We need one section for the machine (host) and one section per database (instance, typically only one per machine).

Database user other than root

If you plan to use a monitoring user other than root please look here.

Queries sent against the database

The following queries are sent against your database for monitoring:

  • SHOW BINARY LOGS
  • SHOW /*!50000 ENGINE */ INNODB STATUS
  • SHOW ENGINE NDB STATUS
  • SHOW /*!50000 GLOBAL */ STATUS
  • SHOW GLOBAL VARIABLES
  • SHOW MASTER STATUS
  • SHOW SLAVE HOSTS
  • SHOW SLAVE STATUS
  • SELECT counter_name, SUM(val) AS val FROM ndbinfo.counters GROUP BY counter_name
  • SELECT MAX(total) AS total, MAX(used) AS used FROM ndbinfo.logbuffers
  • SELECT memory_type, SUM(used) AS used, SUM(total) AS total FROM ndbinfo.memoryusage GROUP BY memory_type
  • SELECT ROUND(AVG(uptime), 0) AS uptime, SUM(start_phase) AS start_phase FROM ndbinfo.nodes
  • SELECT resource_name, SUM(reserved) AS reserved, SUM(used) AS used, SUM(max) AS max FROM ndbinfo.resources GROUP BY resource_name
  • SELECT status, COUNT(status) AS cnt FROM ndbinfo.transporters GROUP BY status
  • SELECT REPLACE(Name, ' ', '_') AS Name, Value FROM INFORMATION_SCHEMA.PBXT_STATISTICS
  • SELECT SUM(compress_time) AS compress_time, SUM(uncompress_time) AS uncompress_time FROM information_schema.INNODB_CMP
  • SELECT SUM(total) AS total, SUM(used) AS used FROM ndbinfo.logspaces
  • SELECT SUM(trx_rows_locked) AS rows_locked, SUM(trx_rows_modified) AS rows_modified, SUM(trx_lock_memory_bytes) AS lock_memory FROM information_schema.INNODB_TRX
  • SELECT LOWER(REPLACE(trx_state, " ", "_")) AS state, count(*) AS cnt from information_schema.INNODB_TRX GROUP BY state

List needs to be updated!

back to ToC

Testing the fpmmm for Maas

If you have put this in place we can run the fpmmm agent for a first test:

/opt/fpmmm/bin/fpmmm --config=/etc/fpmmm.conf
1

If the agent returns "1" then it seems to work correctly... Have a look at the fpmmm agent log (/var/log/fpmmm/fpmmm.log) as well for hidden problems. If you do not see there any message it should have worked correctly.

Then you should see the first data arriving in the Zabbix Monitor.

back to ToC

Viewing Performance data

To see your performance data go to the following web-site: support.fromdual.com/fpmmm and log in with the credentials we provide you.

Then go to to Monitoring → Latest data and choose the right Group and Host (it may take some time until Zab­bix recognizes a new agent (up to a minute) and displays its data correctly).

If they have arrived you can continue sending your data to the fpmmm MaaS Service. If not please get in contact with us for finding the problem.

back to ToC

Continuously sending data

If everything works correctly you can include the agent into the crontab (of the mysql user):

* * * * *  /opt/fpmmm/bin/fpmmm --config=/etc/fpmmm.conf | grep -v '^1$'

back to ToC

Upgrading the fpmmm MaaS agent

The fpmmm MaaS agent is upgraded in the same way as the normal fpmmm agent. For more details see here.

back to ToC