mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Added metric with revision number for better monitoring of deployment [#CLICKHOUSE-2].
This commit is contained in:
parent
fd5ac57b8e
commit
34ac4fa3b8
@ -34,6 +34,7 @@
|
||||
M(StorageBufferRows) \
|
||||
M(StorageBufferBytes) \
|
||||
M(DictCacheRequests) \
|
||||
M(Revision) \
|
||||
|
||||
|
||||
namespace CurrentMetrics
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include <Common/getMultipleKeysFromConfig.h>
|
||||
#include <common/getMemoryAmount.h>
|
||||
#include <Common/getNumberOfPhysicalCPUCores.h>
|
||||
#include <Common/CurrentMetrics.h>
|
||||
#include <Common/ClickHouseRevision.h>
|
||||
#include <IO/HTTPCommon.h>
|
||||
#include <Interpreters/AsynchronousMetrics.h>
|
||||
#include <Interpreters/ProcessList.h>
|
||||
@ -46,9 +48,15 @@
|
||||
#include <TableFunctions/registerTableFunctions.h>
|
||||
|
||||
|
||||
namespace CurrentMetrics
|
||||
{
|
||||
extern const Metric Revision;
|
||||
}
|
||||
|
||||
namespace DB
|
||||
{
|
||||
namespace ErrorCodes
|
||||
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int NO_ELEMENTS_IN_CONFIG;
|
||||
extern const int SUPPORT_IS_DISABLED;
|
||||
@ -221,6 +229,8 @@ int Server::main(const std::vector<std::string> & args)
|
||||
registerAggregateFunctions();
|
||||
registerTableFunctions();
|
||||
|
||||
CurrentMetrics::set(CurrentMetrics::Revision, ClickHouseRevision::get());
|
||||
|
||||
/** Context contains all that query execution is dependent:
|
||||
* settings, available functions, data types, aggregate functions, databases...
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user