MXS-2164 Add skeleton Clustrix monitor
This commit is contained in:
@ -1,7 +1,8 @@
|
|||||||
add_subdirectory(auroramon)
|
add_subdirectory(auroramon)
|
||||||
|
add_subdirectory(clustrixmon)
|
||||||
|
add_subdirectory(csmon)
|
||||||
add_subdirectory(galeramon)
|
add_subdirectory(galeramon)
|
||||||
add_subdirectory(grmon)
|
add_subdirectory(grmon)
|
||||||
add_subdirectory(mariadbmon)
|
add_subdirectory(mariadbmon)
|
||||||
add_subdirectory(mmmon)
|
add_subdirectory(mmmon)
|
||||||
add_subdirectory(ndbclustermon)
|
add_subdirectory(ndbclustermon)
|
||||||
add_subdirectory(csmon)
|
|
||||||
|
7
server/modules/monitor/clustrixmon/CMakeLists.txt
Normal file
7
server/modules/monitor/clustrixmon/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
add_library(clustrixmon SHARED
|
||||||
|
clustrixmon.cc
|
||||||
|
clustrixmonitor.cc
|
||||||
|
)
|
||||||
|
target_link_libraries(clustrixmon maxscale-common)
|
||||||
|
set_target_properties(clustrixmon PROPERTIES VERSION "1.0.0" LINK_FLAGS -Wl,-z,defs)
|
||||||
|
install_module(clustrixmon core)
|
49
server/modules/monitor/clustrixmon/clustrixmon.cc
Normal file
49
server/modules/monitor/clustrixmon/clustrixmon.cc
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018 MariaDB Corporation Ab
|
||||||
|
*
|
||||||
|
* Use of this software is governed by the Business Source License included
|
||||||
|
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
|
||||||
|
*
|
||||||
|
* Change Date: 2022-01-01
|
||||||
|
*
|
||||||
|
* On the date above, in accordance with the Business Source License, use
|
||||||
|
* of this software will be governed by version 2 or later of the General
|
||||||
|
* Public License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "clustrixmon.hh"
|
||||||
|
#include <maxscale/modinfo.h>
|
||||||
|
#include "clustrixmonitor.hh"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The module entry point routine. It is this routine that
|
||||||
|
* must populate the structure that is referred to as the
|
||||||
|
* "module object", this is a structure with the set of
|
||||||
|
* external entry points for this module.
|
||||||
|
*
|
||||||
|
* @return The module object
|
||||||
|
*/
|
||||||
|
extern "C" MXS_MODULE* MXS_CREATE_MODULE()
|
||||||
|
{
|
||||||
|
MXS_NOTICE("Initialise the MariaDB Clustrix Monitor module.");
|
||||||
|
|
||||||
|
static MXS_MODULE info =
|
||||||
|
{
|
||||||
|
MXS_MODULE_API_MONITOR,
|
||||||
|
MXS_MODULE_GA,
|
||||||
|
MXS_MONITOR_VERSION,
|
||||||
|
"A Clustrix cluster monitor",
|
||||||
|
"V1.0.0",
|
||||||
|
MXS_NO_MODULE_CAPABILITIES,
|
||||||
|
&maxscale::MonitorApi<ClustrixMonitor>::s_api,
|
||||||
|
NULL, /* Process init. */
|
||||||
|
NULL, /* Process finish. */
|
||||||
|
NULL, /* Thread init. */
|
||||||
|
NULL, /* Thread finish. */
|
||||||
|
{
|
||||||
|
{MXS_END_MODULE_PARAMS}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return &info;
|
||||||
|
}
|
19
server/modules/monitor/clustrixmon/clustrixmon.hh
Normal file
19
server/modules/monitor/clustrixmon/clustrixmon.hh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018 MariaDB Corporation Ab
|
||||||
|
*
|
||||||
|
* Use of this software is governed by the Business Source License included
|
||||||
|
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
|
||||||
|
*
|
||||||
|
* Change Date: 2022-01-01
|
||||||
|
*
|
||||||
|
* On the date above, in accordance with the Business Source License, use
|
||||||
|
* of this software will be governed by version 2 or later of the General
|
||||||
|
* Public License.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define MXS_MODULE_NAME "clustrixmon"
|
||||||
|
|
||||||
|
#include <maxscale/ccdefs.hh>
|
||||||
|
#include <maxbase/log.hh>
|
||||||
|
|
30
server/modules/monitor/clustrixmon/clustrixmonitor.cc
Normal file
30
server/modules/monitor/clustrixmon/clustrixmonitor.cc
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018 MariaDB Corporation Ab
|
||||||
|
*
|
||||||
|
* Use of this software is governed by the Business Source License included
|
||||||
|
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
|
||||||
|
*
|
||||||
|
* Change Date: 2022-01-01
|
||||||
|
*
|
||||||
|
* On the date above, in accordance with the Business Source License, use
|
||||||
|
* of this software will be governed by version 2 or later of the General
|
||||||
|
* Public License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "clustrixmonitor.hh"
|
||||||
|
|
||||||
|
|
||||||
|
ClustrixMonitor::ClustrixMonitor(MXS_MONITOR* pMonitor)
|
||||||
|
: maxscale::MonitorInstance(pMonitor)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//static
|
||||||
|
ClustrixMonitor* ClustrixMonitor::create(MXS_MONITOR* pMonitor)
|
||||||
|
{
|
||||||
|
return new ClustrixMonitor(pMonitor);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClustrixMonitor::tick()
|
||||||
|
{
|
||||||
|
}
|
30
server/modules/monitor/clustrixmon/clustrixmonitor.hh
Normal file
30
server/modules/monitor/clustrixmon/clustrixmonitor.hh
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018 MariaDB Corporation Ab
|
||||||
|
*
|
||||||
|
* Use of this software is governed by the Business Source License included
|
||||||
|
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
|
||||||
|
*
|
||||||
|
* Change Date: 2022-01-01
|
||||||
|
*
|
||||||
|
* On the date above, in accordance with the Business Source License, use
|
||||||
|
* of this software will be governed by version 2 or later of the General
|
||||||
|
* Public License.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "clustrixmon.hh"
|
||||||
|
#include <maxscale/monitor.hh>
|
||||||
|
|
||||||
|
class ClustrixMonitor : public maxscale::MonitorInstance
|
||||||
|
{
|
||||||
|
ClustrixMonitor(const ClustrixMonitor&) = delete;
|
||||||
|
ClustrixMonitor& operator=(const ClustrixMonitor&) = delete;
|
||||||
|
public:
|
||||||
|
|
||||||
|
static ClustrixMonitor* create(MXS_MONITOR* pMonitor);
|
||||||
|
|
||||||
|
private:
|
||||||
|
ClustrixMonitor(MXS_MONITOR* pMonitor);
|
||||||
|
|
||||||
|
void tick();
|
||||||
|
};
|
Reference in New Issue
Block a user