cef4e836bc
MXS-2271 Store monitored servers in a vector
...
The array is still a public member because it's used in several non-member functions.
2019-01-28 15:41:00 +02:00
10dc0f53e0
MXS-2177 Move check_monitor_permissions() into class
2019-01-25 13:46:01 +02:00
f6cec41dd8
MXS-2271 Monitor config name and instance name are parameters of createInstance()
...
Also adds/moves some comments from previous entrypoints. Name and module
are now constant fields.
2019-01-24 09:49:53 +02:00
9ac8bf93bb
MXS-2271 Rename monitor-related classes
...
MXS_MONITOR->Monitor
MonitorInstance->MonitorWorker
MonitorInstanceSimple->MonitorWorkerSimple
2019-01-22 15:59:17 +02:00
dadb6a1a79
MXS-2271 All monitors inherit from MXS_MONITOR
...
Most of the API entrypoints are replaced with virtual functions.
2019-01-22 15:59:17 +02:00
8b53e30678
MXS-2220 Move server status functions inside class
2019-01-08 15:12:47 +02:00
40485d746c
MXS-2220 Change server name to constant string
2019-01-03 12:13:15 +02:00
09aa54720d
MXS-2220 Read server version using public methods
...
Version related fields have been removed from the public class.
2019-01-03 11:23:14 +02:00
8a8ac26e32
Cleanup monitor.hh
...
Also removes an unused field from several monitors.
2018-12-11 10:41:56 +02:00
c0c9a9858d
MXS-2197 Rename maxscale/log.h to maxscale/log.hh
...
In files either include maxscale/log.hh or remove include entirelly
as maxscale/ccdefs.hh includes it.
2018-12-10 12:58:17 +02:00
ad12ff6d06
MXS-2196: Rename dcb.h to dcb.hh
2018-12-04 11:50:43 +02:00
3e5818fcb6
MXS-2205 Convert mysql_utils.h to .hh
2018-12-03 14:05:21 +02:00
77585bdb8c
MXS-2197: Make config.h and service.h C++ headers
...
This is the first step into converting the other headers into C++.
2018-11-30 12:15:57 +02:00
01628dd0de
Cleanup server version updating
2018-11-21 17:36:52 +02:00
11a756a028
Detect undefined references at link time
...
Instruct the linker to make sure all symbols are resolved at link time.
2018-11-06 21:34:28 +02:00
d11c78ad80
Format all sources with Uncrustify
...
Formatted all sources and manually tuned some files to make the code look
neater.
2018-09-10 13:22:49 +03:00
c447e5cf15
Uncrustify maxscale
...
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
2018-09-09 22:26:19 +03:00
24ab3c099c
Move top of the file "#pragma once" to after the following comment (swap them). If the comment is a BPL update it to the latest one
2018-08-21 13:13:15 +03:00
cf0aeed516
MXS-2014 Rename log_manager.h to log.h
...
There's nothing resembling a manager anymore.
2018-08-17 10:59:37 +03:00
f9ba8824d4
MXS-2004 Remove additional dependencies on maxscale/thread.h
2018-08-13 13:38:39 +03:00
b9ec3f5130
Monitor json diagnostics printing cleanup
...
The 'events' and 'script' config values were defined for every monitor.
Removed the extra definitions and moved the variables to MXS_MONITOR.
MariaDBMonitor was printing config values a second time, they are
already printed by the caller.
Moved the events enum definition to the internal header since it's no longer
required by modules.
Added a default config setting "all" to 'events' to clarify that it enables
all events.
2018-08-10 11:19:09 +03:00
f14380243b
Rename cppdefs.hh to ccdefs.hh
...
For obvious reasons; the c++ suffix is .cc and not .cpp
2018-08-10 07:50:18 +03:00
fbce38878b
Turn server status macros to functions
2018-07-25 11:19:47 +03:00
e6cf20ea29
Fix mmmon hang
...
The iteration of servers would never exit.
2018-07-09 12:10:36 +03:00
a59c0c61ce
Remove depth field from SERVER
...
It was not really used anymore.
2018-06-29 10:54:34 +03:00
cc0299aee6
Update change date of 2.3
2018-06-25 10:07:52 +03:00
8afa8c2c5a
MXS-1775 Add MonitorInstanceSimple class
...
MonitorInstanceSimple is intended for simple monitors that
probe servers in a straightforward fashion. More complex monitors
can be derived directly from MonitorInstance.
2018-06-07 15:13:26 +03:00
37841183b3
Cleanup server.h
...
Renamed, rearranged and clarified status bits. Removed unused macros.
2018-06-01 14:29:51 +03:00
ebcb807438
MXS-1775 Add default implementations
2018-06-01 13:48:15 +03:00
9b7e37e112
MXS-1775 Change MonitorInstance::configure() prototype
...
Now return boolean, to allow derived class to signal a failure
to configure.
2018-06-01 13:48:15 +03:00
0783af88ed
MXS-1775 Make general cleanup
...
Document and rearrrange so that things look nice and tidy.
2018-06-01 13:48:15 +03:00
76cfe7291d
MXS-1775 Move module entry point to the end of the file
...
Now the same way in all monitors.
2018-06-01 13:48:15 +03:00
b439857a84
MXS-1775 Remove destroy()
...
Now the instance is deleted simply by deleting it.
2018-06-01 13:48:15 +03:00
0833db8a48
MXS-1775 Flush pending status to servers using common code
2018-06-01 13:48:15 +03:00
15b1c270a3
MXS-1775 Check connection in MonitorInstance::tick()
...
Since the connection checking is done in an identical fashion in
all monitors, it can be moved to the base-class.
2018-06-01 13:48:15 +03:00
a8205824f8
MXS-1775 Update statuses the usual way in MMMon
...
As all other monitors MMMon now only manipulates the pending_status
of the monitor object during analysis and only in the end touches
the server status.
2018-06-01 13:48:15 +03:00
f50ebfce2a
MXS-1775 Set/clear initial bits similarly in all monitors
2018-06-01 13:48:15 +03:00
8d1b8a1774
MXS-1775 Handle connection error the same way
...
All monitors (but for MariaDBMon) now handle connection errors in
the same manner.
An exception is MMMon that modifies both the server status and the
monitor status. However, in fact, all other monitors do it the wrong
way and update the server status directly instead of only the monitor
status that then at the end of the loop should be copied to the server
status.
2018-06-01 13:48:15 +03:00
5196371762
MXS-1775 Use same arrangement in update_server_status
...
All monitors (but possible for MariaDBMon) now handle the
connecting to the server in the same way, that is, if the
connecting fails, then the status is updated and we return.
2018-06-01 13:48:15 +03:00
df4e19eb27
MXS-1775 Provide default implementation for MonitorInstance::tick
2018-06-01 13:48:15 +03:00
68505a0bcb
MXS-1775 Consistently name the argument to update_server_status()
2018-06-01 13:48:15 +03:00
cb1da5538c
MXS-1775 Monitoring function named consistently
...
The main monitoring function now has the same name in all
monitors (except MariaDBMonitor) and is a member function.
2018-06-01 13:48:15 +03:00
650a739c92
MXS-1775 Move monitor loop to MonitorInstance
2018-05-18 16:00:05 +03:00
db30ea96f2
MXS-1775 m_master is now a member variable of MonitorInstance
2018-05-18 16:00:05 +03:00
6eef6f52db
MXS-1775 Wait the same way in all monitors
2018-05-18 16:00:05 +03:00
2396b555f8
MXS-1775 Monitor loop and monitoring separated
...
In preparation for moving the monitor loop to MonitorInstance.
2018-05-18 16:00:05 +03:00
6fff5a4f23
MXS-1775 Preparatory work for moving main loop to MonitorInstance
2018-05-18 16:00:05 +03:00
6db4ce54a9
MXS-1775 MonitorInstance now calls mysql_thread_[init|finish]()
2018-05-18 16:00:05 +03:00
15e3a2887c
MXS-1775 Move status management to MonitorInstance
2018-05-18 16:00:05 +03:00
1e084b78b1
MXS-1775 MonitorInstance::m_script is now a std::string
2018-05-18 16:00:05 +03:00