Daily growth expectations for Kontrollbase

Data storage requirements for Kontrollbase [monolith] server_statistics + server_report tables. These are the tables that accept incoming data from the polling processes. They hold the historical data for each server that’s being monitored.

AVG Per Server
Assuming stats every 10 minutes = 144/day
Assuming reports every hour = 24/day
10K for one row of server_statistics: 1.44 mb
16K for one row of server_report every hour: 390K
TOTAL: 1.82M/day of data collected per server

Read More

On the reporting engine, and a new name – Kontrollbase

Update for all of those that are following the progress of Monolith. I’ve been busy this week coding the reporting engine – the code that analyses the hundreds of variables that are being collected – and I’m pleased to say that Perl was the correct choice for this application.Installation on the client servers will be a breeze, and relatively few non-standard modules are required for the server application.

I’ve been silently wondering for some time if the reporting engine equations should be part of a pluggable system (stored in the database) or if they should be hard coded. After writing up all of the equations, I’ve come to the conclusion that, for a quicker release, the equations and reporting engine will be hard-coded this time around for the default system alerts. Howeve -> user-defined alerts will be pluggable. Revisions ahead of 2.0 might feature pluggable main equations but I want v2.0 out asap.

Second bit of news on the application is that any users that were requesting a simple web-based install with a single config file have now gotten their wish. It’s a much streamlined process this time around.

And the final news is that I have decided to change the name of Monolith. There’s an app on the MySQL site that is from the Monolith company and it does monitoring along the lines of Zenoss – as in site wide monitoring that isn’t MySQL specific like my software. As such, to keep the projects easier to differentiate – my Monolith app will be released under the name of Kontrollbase. Kontroll is Swedish for control, and seeing as MySQL is originally Swedish and that the app helps you control the performance of MySQL… there it is. So, from now on Monolith will be referred to as Kontrollbase.

Things are looking up for release 2 and it’s coming along with good speed. More later… back to coding.

Read More

Seeking volunteer test machines for Monolith

Monolith: MySQL server monitoring. I only have servers that run Redhat/Debian/Ubuntu Linux x86 and x86_64. I don’t have machines to test MySQL monitoring for the following OSes. Perhaps you would like to be a test candidate for the new version of Monolith? If so, let me know and you’ll be on the list, as well as get beta testing credit.

OSX Server: PPC and Intel

AIX

FreeBSD / OpenBSD / NetBSD

Windows Server

Solaris: Intel & Sparc

Linux servers that are NOT Intel based.

What this involves: testing the client script, perl modules, snmp stats, and other functions that may require a custom client script for that architecture.

Read More

Update: OSS MySQL Monitoring Solution

Progress on the Open Source enterprise grade MySQL monitoring system;  the schema for Monolith version 2 has been designed. Due to the many suggestions for features and the interest it has received I’ve put this on the front burner. That said, here is some more info on the next steps I’ll be taking.

  • Monitored servers will use a command line agent (called remotely) to pull information from both MySQL and the OS.
  • Historical information will include all values from global status and global variables, as well as CPU/Memory/IO/Disk usage.
  • Standard graphing functions – the ones in the list from the previous post – will gather information from various view tables that contain historical data that is collected from the agent script. User defined graphing will allow you to look at historical values over time for any of the various global status or global variable settings (integer based ones anyway).
  • The cnf file for each server will be stored in the monitoring database and available for viewing for historical purposes. 
Read More

Request: What do you want in a OpenSource MySQL Monitoring solution?

What would you like to see in a free enterprise-grade monitoring system for your daily MySQL needs?I’m rewriting Monolith – MySQL DBA Console from the ground up. This will be version 2 and I would like to get some input from the global MySQL community.So far I am going with the following; comment with any improvements/additions.

  • Variable interval polling of server statistics
  • Over 50 different alerts (see list below)
  • Graphing of various server statistics (see list below)
  • Tuning recommendations with cnf file changes to apply to server
  • Change control documents for recommended performance/security tuning
  • Threshold based alerting with multiple alert groups: info,warn,critical
  • Sorting/ordering of servers via groups. ie: client -> dev,stage,prod
  • RSS feeds for each alert group
  • XML export with user defined fields for external applications (API of sorts)
  • Slave server alerts, IO thread / SQL thread, seconds behind master (with threshold)
  • Various general stats: version, system ram size, # of schema, default table type
  • Ability to view current cnf file from server
  • Ability to view current global variables as a list
  • Email / pager reporting for alerts (choose warn/crit alerts to report on)

Alerts - can be enabled or disabled for reporting on a per server basis

  • number of connection failures (threshold)
  • number of connections errors (threshold)
  • binary logging not enabled
  • sync_binlog not set
  • max_used_connections too high compared to max_connections (ratio over 85% utilization)
  • query cache size too small: improper utilization
  • query cache size too large: improper utilization
  • memory usage over 85% of system ram
  • table scans excessive
  • tmp table to disk ratio too high
  • innodb buffer too small
  • innodb buffer too large (resources can be used elsewhere)
  • key buffer too large (resources can be used elsewhere)
  • key buffer too small
  • sort buffer too small
  • sort buffer too large (resources can be used elsewhere)
  • join buffer too small
  • join buffer too large (resources can be used elsewhere)
  • open_files_limit too small compared to open_files usage ratio
  • table locks too high
  • table cache too small
  • table cache too large (resources can be used elsewhere)
  • thread cache too small
  • thread cache too large (resources can be used elsewhere)
  • binlog size too small
  • excessive disk tmp table usage
  • flush time not zero value
  • indexes not being utilized properly
  • innodb doublewrite buffer enabled
  • innodb flush method not properly set
  • innodb transaction isolation level not properly set for ACID
  • innodb log wait time too high
  • conncurrent insert not set correctly
  • query cache not enabled
  • table locks too high
  • thread cache not enabled
  • concurrent queries too high (threshold)
  • binary logs not set to auto-purge
  • binary logging not enabled
  • slave not active if server is set to slave
  • slave sql thread stopped
  • slave io thread stopped
  • slave behind master too long (threshold)
  • slave not set as read-only
  • slave relay logs not automatically purged
  • account has global privs
  • account set to old_password
  • accounts able to be added with empty password
  • account has grant option
  • root can login remotely
  • root has no password
  • blank username detected
  • test database exists
  • usage user exists
  • general query log enabled
  • CPU usage over threshold
  • Load Average over threshold

Graphs - default

  • Query cache utilization, in/out hit ratio
  • Temp tables usage
  • Temp files usage
  • Open tables usage
  • Thread cached / created
  • Connections
  • Query rate
  • Data size, Index size, overall size
  • Uptime
  • CPU usage
  • I/O usage
  • Load average
  • Data transfer in/out
  • Memory allocation
  • Swap usage
  • Slave delay (if configured as a slave)

As mentioned before, this is a OSS application that has no license or subscription fees and will be updated on a regular basis. It’s a mix of PHP for the web side and Perl for the system polling and reporting processes. The installer will be new, web based, and a simple process, much improved from the current method.Please add your comments now, as I am drawing up plans this week for version 2. :)

Read More

Parallel mysqldump backup script available. Testers wanted.

Large databases, long mysqldump times, long waits for globally locked tables. These problems basically never go away when you rely on mysqldump with –all-databases or a list of databases, as it dumps schemas serially. I’m not going to explain serial vs parallel processing here since that’s a larger topic. Suffice to say that in these days of multi-core / multi-cpu servers we only make use of one processor’s core when we serially export databases using mysqldump. So, I have a new script that attempts to alleviate those issues and now I need testers to provide feedback/improvements.

 

In order to keep some sanity when dealing with hundreds of database servers, the script takes care of the following:

  1. low global locking time requirements: solved by parallel tasks / forked processes
  2. backup file checking: with mysqldump files; it checks for “–Dump completed” at the end of the sql file
  3. ability to backup all-databases or an array of databases
  4. if backing up all databases, the ability to skip schema names like information_schema, lost&found, test, etc that can be in the data directory but aren’t really schemas
  5. compression of sql files
  6. size reporting of plain text and compressed sql files
  7. overall time and single export elapsed time reporting for each schema backup
  8. debug level logging of sub routines for troubleshooting if needed
  9. file pruning to keep 28 days of backups, so you don’t have to manually remove files to keep the backups partition from filling up
  10. talkback reporting for Monolith monitoring system / email reporting as well
  11. logs to /var/log/messages with final report so we get information in network based syslog collection
  12. process state exit code reporting in the case of various issues like “mysqldump failed because binlog not enabled when using –master-data=x”

So, that all said, if you want to help test this script email me at ” the matt reid at g m a i l . c o m”

It’s a bit over 800 lines of perl so I’m not going to paste it here, therefore email me :)

Read More

Monolith – MySQL DBA Console 1.4 Released

Big changes in this release.

Features:

  • Talkback report for local script backups to report back to monolith console
  • Status page now summarizes all Codes and failed server connections for past 24 hours
  • Install now has correct data import for user setup and system settings
  • More GRAPHS!
  • Improved logic for analytics and automated tuning recommendations, fixed thread_status bug
  • Change request document generation
  • Full HTML reporting for statistics gathering and tuning report
  • XML API page for custom export of data with all fields available for output
  • Integrates with VisualMining: see api-monitor-visualmining.php file
  • Data table for index+data size reporting of all monitored databases
  • Improved table information gathering via INFORMATION_SCHEMA – no more SHOW commands
  • Remote backup process bugs fixed
  • User access leves for admin/standard users
  • Active/Inactive status now shows next to hostname list on monitor page
  • Summary emails for daily backups, no more single email per server

Get it here: http://sourceforge.net/projects/monolith-mysql/

Any issues or questions feel free to email me: themattreid (at) g m a i l . c o m

Read More

Monolith gets max/avg graphs

Updated some code to graph out the max/avg numbers for Query rate, Data growth, and Connections. Images below.

graph-uptime1

graph-combined1

Read More

Monolith 1.3 soon to be released

New features for the next release. As follows:

  1. Status page now reports daily error code summarizations, connection failures to hosts
  2. Talkback report page now reports on myback_talkback script version number
  3. Talkback report page now tracks the my.cnf file during the backup process, and the cnf file contents for each host are stored as LONGTEXT in the monitor database
  4. Multi-tier access levels, admins (rw) and general users (ro)
  5. View tables for the status page summarizations speed up reporting
  6. Daily summary email – similar to the status page, instead of singular emails for each backup success/fail notification

Look for 1.3 being released very soon! You’ll be able to find it here: http://sourceforge.net/projects/monolith-mysql

Read More

New VIEW tables for Monolith 1.2 Reporting

Here are some view tables that are going to be in the new release of Monolith. They work with the current release though, so maybe they will be useful for DBAs that have utilized the CLI to get data out of Monolith. The new release will feature an updated Status page that shows the data from these view tables instead of the “last 25 backups”. Edit the DEFINER user as needed.


mysql> show tables;
+-------------------------+
| Tables_in_monolith |
+-------------------------+
| dbs |
| process_exec |
| process_status |
| pruning |
| system |
| users |
| view_daily_result_all |
| view_daily_result_code1 |
| view_daily_result_code2 |
| view_daily_result_code3 |
+-------------------------+
10 rows in set (0.00 sec)


mysql> show create table view_daily_result_all\G
*************************** 1. row ***************************
View: view_daily_result_all
Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_daily_result_all` AS select `t1`.`id` AS `id`,`t1`.`client_name` AS `client_name`,`t1`.`host` AS `host`,`t2`.`id` AS `process_exec_id`,`t2`.`file_name` AS `file_name`,`t2`.`database_id` AS `database_id`,`t2`.`duration` AS `duration`,`t2`.`file_size` AS `file_size`,`t2`.`process_status_id` AS `process_status_id`,`t2`.`creationDate` AS `creationDate`,`t3`.`description` AS `description` from ((`dbs` `t1` join `process_exec` `t2`) join `process_status` `t3`) where ((`t1`.`id` = `t2`.`database_id`) and (`t2`.`process_status_id` = `t3`.`id`) and (date_format(`t2`.`creationDate`,_latin1'%Y,%m,%e') = curdate())) order by `t2`.`creationDate` desc
1 row in set (0.00 sec)


mysql> show create table view_daily_result_code1\G
*************************** 1. row ***************************
View: view_daily_result_code1
Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_daily_result_code1` AS select `t1`.`id` AS `id`,`t1`.`client_name` AS `client_name`,`t1`.`host` AS `host`,`t2`.`file_name` AS `file_name`,`t2`.`id` AS `process_exec_id`,`t2`.`database_id` AS `database_id`,`t2`.`duration` AS `duration`,`t2`.`file_size` AS `file_size`,`t2`.`process_status_id` AS `process_status_id`,`t2`.`creationDate` AS `creationDate`,`t3`.`description` AS `description` from ((`dbs` `t1` join `process_exec` `t2`) join `process_status` `t3`) where ((`t1`.`id` = `t2`.`database_id`) and (`t2`.`process_status_id` = `t3`.`id`) and (date_format(`t2`.`creationDate`,_latin1'%Y,%m,%e') = curdate()) and (`t2`.`process_status_id` = 1)) order by `t2`.`creationDate` desc
1 row in set (0.00 sec)


mysql> show create table view_daily_result_code2\G
*************************** 1. row ***************************
View: view_daily_result_code2
Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_daily_result_code2` AS select `t1`.`id` AS `id`,`t1`.`client_name` AS `client_name`,`t1`.`host` AS `host`,`t2`.`file_name` AS `file_name`,`t2`.`id` AS `process_exec_id`,`t2`.`database_id` AS `database_id`,`t2`.`duration` AS `duration`,`t2`.`file_size` AS `file_size`,`t2`.`process_status_id` AS `process_status_id`,`t2`.`creationDate` AS `creationDate`,`t3`.`description` AS `description` from ((`dbs` `t1` join `process_exec` `t2`) join `process_status` `t3`) where ((`t1`.`id` = `t2`.`database_id`) and (`t2`.`process_status_id` = `t3`.`id`) and (date_format(`t2`.`creationDate`,_latin1'%Y,%m,%e') = curdate()) and (`t2`.`process_status_id` = 2)) order by `t2`.`creationDate` desc
1 row in set (0.00 sec)


mysql> show create table view_daily_result_code3\G
*************************** 1. row ***************************
View: view_daily_result_code3
Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_daily_result_code3` AS select `t1`.`id` AS `id`,`t1`.`client_name` AS `client_name`,`t1`.`host` AS `host`,`t2`.`file_name` AS `file_name`,`t2`.`id` AS `process_exec_id`,`t2`.`database_id` AS `database_id`,`t2`.`duration` AS `duration`,`t2`.`file_size` AS `file_size`,`t2`.`process_status_id` AS `process_status_id`,`t2`.`creationDate` AS `creationDate`,`t3`.`description` AS `description` from ((`dbs` `t1` join `process_exec` `t2`) join `process_status` `t3`) where ((`t1`.`id` = `t2`.`database_id`) and (`t2`.`process_status_id` = `t3`.`id`) and (date_format(`t2`.`creationDate`,_latin1'%Y,%m,%e') = curdate()) and (`t2`.`process_status_id` = 3)) order by `t2`.`creationDate` desc
1 row in set (0.01 sec)

Read More