Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Incubator Pegasus
提交
fb72d917
Incubator Pegasus
项目概览
apache
/
Incubator Pegasus
通知
9
Star
5
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Incubator Pegasus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fb72d917
编写于
2月 05, 2020
作者:
zlw5307
提交者:
neverchanje
3月 31, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: refactor the code about prometheus in pegasus_counter_reporter (#463)
上级
944093b8
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
83 addition
and
46 deletion
+83
-46
run.sh
run.sh
+5
-3
src/reporter/CMakeLists.txt
src/reporter/CMakeLists.txt
+3
-3
src/reporter/pegasus_counter_reporter.cpp
src/reporter/pegasus_counter_reporter.cpp
+52
-32
src/reporter/pegasus_counter_reporter.h
src/reporter/pegasus_counter_reporter.h
+10
-5
src/server/config.ini
src/server/config.ini
+6
-3
src/server/config.min.ini
src/server/config.min.ini
+7
-0
未找到文件。
run.sh
浏览文件 @
fb72d917
...
@@ -670,10 +670,11 @@ function run_start_onebox()
...
@@ -670,10 +670,11 @@ function run_start_onebox()
for
i
in
$(
seq
${
META_COUNT
}
)
for
i
in
$(
seq
${
META_COUNT
}
)
do
do
meta_port
=
$((
34600
+
i
))
meta_port
=
$((
34600
+
i
))
prometheus_port
=
$((
9091
+
i
))
mkdir
-p
meta
$i
;
mkdir
-p
meta
$i
;
cd
meta
$i
cd
meta
$i
ln
-s
-f
${
SERVER_PATH
}
/pegasus_server pegasus_server
ln
-s
-f
${
SERVER_PATH
}
/pegasus_server pegasus_server
sed
"s/@META_PORT@/
$meta_port
/;s/@REPLICA_PORT@/34800/"
${
ROOT
}
/config-server.ini
>
config.ini
sed
"s/@META_PORT@/
$meta_port
/;s/@REPLICA_PORT@/34800/
;s/@PROMETHEUS_PORT@/
$prometheus_port
/
"
${
ROOT
}
/config-server.ini
>
config.ini
echo
"cd
`
pwd
`
&&
$PWD
/pegasus_server config.ini -app_list meta &>result &"
echo
"cd
`
pwd
`
&&
$PWD
/pegasus_server config.ini -app_list meta &>result &"
$PWD
/pegasus_server config.ini
-app_list
meta &>result &
$PWD
/pegasus_server config.ini
-app_list
meta &>result &
PID
=
$!
PID
=
$!
...
@@ -682,11 +683,12 @@ function run_start_onebox()
...
@@ -682,11 +683,12 @@ function run_start_onebox()
done
done
for
j
in
$(
seq
${
REPLICA_COUNT
}
)
for
j
in
$(
seq
${
REPLICA_COUNT
}
)
do
do
prometheus_port
=
$((
9091
+
${
META_COUNT
}
+
j
))
replica_port
=
$((
34800
+
j
))
replica_port
=
$((
34800
+
j
))
mkdir
-p
replica
$j
mkdir
-p
replica
$j
cd
replica
$j
cd
replica
$j
ln
-s
-f
${
SERVER_PATH
}
/pegasus_server pegasus_server
ln
-s
-f
${
SERVER_PATH
}
/pegasus_server pegasus_server
sed
"s/@META_PORT@/34600/;s/@REPLICA_PORT@/
$replica_port
/"
${
ROOT
}
/config-server.ini
>
config.ini
sed
"s/@META_PORT@/34600/;s/@REPLICA_PORT@/
$replica_port
/
;s/@PROMETHEUS_PORT@/
$prometheus_port
/
"
${
ROOT
}
/config-server.ini
>
config.ini
echo
"cd
`
pwd
`
&&
$PWD
/pegasus_server config.ini -app_list replica &>result &"
echo
"cd
`
pwd
`
&&
$PWD
/pegasus_server config.ini -app_list replica &>result &"
$PWD
/pegasus_server config.ini
-app_list
replica &>result &
$PWD
/pegasus_server config.ini
-app_list
replica &>result &
PID
=
$!
PID
=
$!
...
@@ -698,7 +700,7 @@ function run_start_onebox()
...
@@ -698,7 +700,7 @@ function run_start_onebox()
mkdir
-p
collector
mkdir
-p
collector
cd
collector
cd
collector
ln
-s
-f
${
SERVER_PATH
}
/pegasus_server pegasus_server
ln
-s
-f
${
SERVER_PATH
}
/pegasus_server pegasus_server
sed
"s/@META_PORT@/34600/;s/@REPLICA_PORT@/34800/"
${
ROOT
}
/config-server.ini
>
config.ini
sed
"s/@META_PORT@/34600/;s/@REPLICA_PORT@/34800/
;s/@PROMETHEUS_PORT@/9091/
"
${
ROOT
}
/config-server.ini
>
config.ini
echo
"cd
`
pwd
`
&&
$PWD
/pegasus_server config.ini -app_list collector &>result &"
echo
"cd
`
pwd
`
&&
$PWD
/pegasus_server config.ini -app_list collector &>result &"
$PWD
/pegasus_server config.ini
-app_list
collector &>result &
$PWD
/pegasus_server config.ini
-app_list
collector &>result &
PID
=
$!
PID
=
$!
...
...
src/reporter/CMakeLists.txt
浏览文件 @
fb72d917
...
@@ -16,12 +16,12 @@ find_package(prometheus-cpp)#TODO(huangwei5): make it optional
...
@@ -16,12 +16,12 @@ find_package(prometheus-cpp)#TODO(huangwei5): make it optional
# the INTERFACE_LINK_LIBRARIES of prometheus contains the absolute path of libcurl
# the INTERFACE_LINK_LIBRARIES of prometheus contains the absolute path of libcurl
# when we use the compiled prometheus-cpp libs, the path of libcurl should be our own path
# when we use the compiled prometheus-cpp libs, the path of libcurl should be our own path
find_package
(
CURL
)
find_package
(
CURL
)
get_target_property
(
_libs prometheus-cpp::pu
sh
INTERFACE_LINK_LIBRARIES
)
get_target_property
(
_libs prometheus-cpp::pu
ll
INTERFACE_LINK_LIBRARIES
)
string
(
REGEX REPLACE
";/.*libcurl\.a"
";
${
CURL_LIBRARIES
}
"
_libs
"
${
_libs
}
"
)
string
(
REGEX REPLACE
";/.*libcurl\.a"
";
${
CURL_LIBRARIES
}
"
_libs
"
${
_libs
}
"
)
set_target_properties
(
prometheus-cpp::pu
sh
PROPERTIES INTERFACE_LINK_LIBRARIES
"
${
_libs
}
"
)
set_target_properties
(
prometheus-cpp::pu
ll
PROPERTIES INTERFACE_LINK_LIBRARIES
"
${
_libs
}
"
)
dsn_add_static_library
()
dsn_add_static_library
()
target_link_libraries
(
${
MY_PROJ_NAME
}
PUBLIC pegasus_base
target_link_libraries
(
${
MY_PROJ_NAME
}
PUBLIC pegasus_base
prometheus-cpp::pu
sh
prometheus-cpp::pu
ll
)
# TODO(huangwei5): dsn_add_static_library doesnt link libs, need fix
)
# TODO(huangwei5): dsn_add_static_library doesnt link libs, need fix
src/reporter/pegasus_counter_reporter.cpp
浏览文件 @
fb72d917
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
#include <ios>
#include <ios>
#include <iomanip>
#include <iomanip>
#include <iostream>
#include <iostream>
#include <unistd.h>
#include <unistd.h>
#include <dsn/cpp/service_app.h>
#include <dsn/cpp/service_app.h>
...
@@ -21,10 +20,11 @@
...
@@ -21,10 +20,11 @@
#include <map>
#include <map>
#include <memory>
#include <memory>
#include <string>
#include <string>
#include <fmt/format.h>
using
namespace
::
dsn
;
using
namespace
::
dsn
;
static
std
::
string
GetHostN
ame
()
static
std
::
string
get_hostn
ame
()
{
{
char
hostname
[
1024
];
char
hostname
[
1024
];
...
@@ -34,9 +34,20 @@ static std::string GetHostName()
...
@@ -34,9 +34,20 @@ static std::string GetHostName()
return
hostname
;
return
hostname
;
}
}
static
void
change_metrics_name
(
std
::
string
&
metrics_name
)
static
std
::
string
get_hostip
()
{
uint32_t
ip
=
dsn
::
rpc_address
::
ipv4_from_network_interface
(
""
);
uint32_t
ipnet
=
htonl
(
ip
);
char
buffer
[
512
];
memset
(
buffer
,
0
,
sizeof
(
buffer
));
assert
(
inet_ntop
(
AF_INET
,
&
ipnet
,
buffer
,
sizeof
(
buffer
)));
return
buffer
;
}
static
void
format_metrics_name
(
std
::
string
&
metrics_name
)
{
{
replace
(
metrics_name
.
begin
(),
metrics_name
.
end
(),
'@'
,
':'
);
replace
(
metrics_name
.
begin
(),
metrics_name
.
end
(),
'@'
,
':'
);
replace
(
metrics_name
.
begin
(),
metrics_name
.
end
(),
'#'
,
':'
);
replace
(
metrics_name
.
begin
(),
metrics_name
.
end
(),
'.'
,
'_'
);
replace
(
metrics_name
.
begin
(),
metrics_name
.
end
(),
'.'
,
'_'
);
replace
(
metrics_name
.
begin
(),
metrics_name
.
end
(),
'*'
,
'_'
);
replace
(
metrics_name
.
begin
(),
metrics_name
.
end
(),
'*'
,
'_'
);
replace
(
metrics_name
.
begin
(),
metrics_name
.
end
(),
'('
,
'_'
);
replace
(
metrics_name
.
begin
(),
metrics_name
.
end
(),
'('
,
'_'
);
...
@@ -65,8 +76,7 @@ pegasus_counter_reporter::pegasus_counter_reporter()
...
@@ -65,8 +76,7 @@ pegasus_counter_reporter::pegasus_counter_reporter()
_update_interval_seconds
(
0
),
_update_interval_seconds
(
0
),
_last_report_time_ms
(
0
),
_last_report_time_ms
(
0
),
_enable_logging
(
false
),
_enable_logging
(
false
),
_enable_falcon
(
false
),
_perf_counter_sink
(
perf_counter_sink_t
::
INVALID
),
_enable_prometheus
(
false
),
_falcon_port
(
0
),
_falcon_port
(
0
),
_prometheus_port
(
0
)
_prometheus_port
(
0
)
{
{
...
@@ -76,17 +86,13 @@ pegasus_counter_reporter::~pegasus_counter_reporter() { stop(); }
...
@@ -76,17 +86,13 @@ pegasus_counter_reporter::~pegasus_counter_reporter() { stop(); }
void
pegasus_counter_reporter
::
prometheus_initialize
()
void
pegasus_counter_reporter
::
prometheus_initialize
()
{
{
_prometheus_host
=
dsn_config_get_value_string
(
"pegasus.server"
,
"prometheus_host"
,
"127.0.0.1"
,
"prometheus gateway host"
);
_prometheus_port
=
(
uint16_t
)
dsn_config_get_value_uint64
(
_prometheus_port
=
(
uint16_t
)
dsn_config_get_value_uint64
(
"pegasus.server"
,
"prometheus_port"
,
9091
,
"prometheus gateway port"
);
"pegasus.server"
,
"prometheus_port"
,
9091
,
"prometheus gateway port"
);
ddebug
(
"prometheus initialize: host:port(%s:%d)"
,
_prometheus_host
.
c_str
(),
_prometheus_port
);
const
auto
&
labels
=
prometheus
::
Gateway
::
GetInstanceLabel
(
GetHostName
());
_gateway
=
std
::
make_shared
<
prometheus
::
Gateway
>
(
_prometheus_host
,
std
::
to_string
(
_prometheus_port
),
"pegasus"
,
labels
);
_registry
=
std
::
make_shared
<
prometheus
::
Registry
>
();
_registry
=
std
::
make_shared
<
prometheus
::
Registry
>
();
_gateway
->
RegisterCollectable
(
_registry
);
_exposer
=
dsn
::
make_unique
<
prometheus
::
Exposer
>
(
fmt
::
format
(
"{}:{}"
,
get_hostip
().
c_str
(),
_prometheus_port
));
_exposer
->
RegisterCollectable
(
_registry
);
}
}
void
pegasus_counter_reporter
::
falcon_initialize
()
void
pegasus_counter_reporter
::
falcon_initialize
()
...
@@ -148,18 +154,22 @@ void pegasus_counter_reporter::start()
...
@@ -148,18 +154,22 @@ void pegasus_counter_reporter::start()
_enable_logging
=
dsn_config_get_value_bool
(
_enable_logging
=
dsn_config_get_value_bool
(
"pegasus.server"
,
"perf_counter_enable_logging"
,
true
,
"perf_counter_enable_logging"
);
"pegasus.server"
,
"perf_counter_enable_logging"
,
true
,
"perf_counter_enable_logging"
);
_enable_falcon
=
dsn_config_get_value_bool
(
"pegasus.server"
,
"perf_counter_enable_falcon"
,
false
,
"perf_counter_enable_falcon"
);
std
::
string
perf_counter_sink
=
_enable_prometheus
=
dsn_config_get_value_bool
(
"pegasus.server"
,
dsn_config_get_value_string
(
"pegasus.server"
,
"perf_counter_sink"
,
""
,
"perf_counter_sink"
);
"perf_counter_enable_prometheus"
,
if
(
"prometheus"
==
perf_counter_sink
)
{
false
,
_perf_counter_sink
=
perf_counter_sink_t
::
PROMETHEUS
;
"perf_counter_enable_prometheus"
);
}
else
if
(
"falcon"
==
perf_counter_sink
)
{
_perf_counter_sink
=
perf_counter_sink_t
::
FALCON
;
if
(
_enable_falcon
)
{
}
else
{
_perf_counter_sink
=
perf_counter_sink_t
::
INVALID
;
}
if
(
perf_counter_sink_t
::
FALCON
==
_perf_counter_sink
)
{
falcon_initialize
();
falcon_initialize
();
}
}
if
(
_enable_prometheus
)
{
if
(
perf_counter_sink_t
::
PROMETHEUS
==
_perf_counter_sink
)
{
prometheus_initialize
();
prometheus_initialize
();
}
}
...
@@ -178,6 +188,8 @@ void pegasus_counter_reporter::stop()
...
@@ -178,6 +188,8 @@ void pegasus_counter_reporter::stop()
if
(
_report_timer
!=
nullptr
)
{
if
(
_report_timer
!=
nullptr
)
{
_report_timer
->
cancel
();
_report_timer
->
cancel
();
}
}
_exposer
=
nullptr
;
_registry
=
nullptr
;
}
}
void
pegasus_counter_reporter
::
update_counters_to_falcon
(
const
std
::
string
&
result
,
void
pegasus_counter_reporter
::
update_counters_to_falcon
(
const
std
::
string
&
result
,
...
@@ -207,7 +219,7 @@ void pegasus_counter_reporter::update()
...
@@ -207,7 +219,7 @@ void pegasus_counter_reporter::update()
ddebug
(
"%s"
,
oss
.
str
().
c_str
());
ddebug
(
"%s"
,
oss
.
str
().
c_str
());
}
}
if
(
_enable_falcon
)
{
if
(
perf_counter_sink_t
::
FALCON
==
_perf_counter_sink
)
{
std
::
stringstream
oss
;
std
::
stringstream
oss
;
oss
<<
"["
;
oss
<<
"["
;
...
@@ -229,20 +241,21 @@ void pegasus_counter_reporter::update()
...
@@ -229,20 +241,21 @@ void pegasus_counter_reporter::update()
update_counters_to_falcon
(
oss
.
str
(),
timestamp
);
update_counters_to_falcon
(
oss
.
str
(),
timestamp
);
}
}
if
(
_enable_prometheus
)
{
if
(
perf_counter_sink_t
::
PROMETHEUS
==
_perf_counter_sink
)
{
perf_counters
::
instance
().
iterate_snapshot
([
this
](
const
std
::
string
hostname
=
get_hostname
();
perf_counters
::
instance
().
iterate_snapshot
([
&
hostname
,
this
](
const
dsn
::
perf_counters
::
counter_snapshot
&
cs
)
{
const
dsn
::
perf_counters
::
counter_snapshot
&
cs
)
{
std
::
string
metrics_name
=
cs
.
name
;
std
::
string
metrics_name
=
cs
.
name
;
// prometheus metric_name don't support characters like .*()@, it only support ":"
// prometheus metric_name don't support characters like .*()@, it only support ":"
// and "_"
// and "_"
// so change the name to make it all right
// so change the name to make it all right
change
_metrics_name
(
metrics_name
);
format
_metrics_name
(
metrics_name
);
// split metric_name like "collector_app_pegasus_app_stat_multi_put_qps:1_0_p999" or
// split metric_name like "collector_app_pegasus_app_stat_multi_put_qps:1_0_p999" or
// "collector_app_pegasus_app_stat_multi_put_qps:1_0"
// "collector_app_pegasus_app_stat_multi_put_qps:1_0"
// app[0] = "1" which is the app
_id
// app[0] = "1" which is the app
(app name or app id)
// app[1] = "0" which is the partition_
cout
// app[1] = "0" which is the partition_
index
// app[2] = "p999" or "" which represent the percent
// app[2] = "p999" or "" which represent the percent
std
::
string
app
[
3
]
=
{
""
,
""
,
""
};
std
::
string
app
[
3
]
=
{
""
,
""
,
""
};
std
::
list
<
std
::
string
>
lv
;
std
::
list
<
std
::
string
>
lv
;
...
@@ -256,14 +269,25 @@ void pegasus_counter_reporter::update()
...
@@ -256,14 +269,25 @@ void pegasus_counter_reporter::update()
i
++
;
i
++
;
}
}
}
}
/**
* deal with corner case, for example:
* replica*eon.replica*table.level.RPC_RRDB_RRDB_GET.latency(ns)@${table_name}.p999
* in this case, app[0] = app name, app[1] = p999, app[2] = ""
**/
if
(
"p999"
==
app
[
1
])
{
app
[
2
]
=
app
[
1
];
app
[
1
].
clear
();
}
// create metrics that prometheus support to report data
// create metrics that prometheus support to report data
metrics_name
=
lv
.
front
()
+
app
[
2
];
std
::
map
<
std
::
string
,
prometheus
::
Family
<
prometheus
::
Gauge
>
*>::
iterator
it
=
std
::
map
<
std
::
string
,
prometheus
::
Family
<
prometheus
::
Gauge
>
*>::
iterator
it
=
_gauge_family_map
.
find
(
metrics_name
);
_gauge_family_map
.
find
(
metrics_name
);
if
(
it
==
_gauge_family_map
.
end
())
{
if
(
it
==
_gauge_family_map
.
end
())
{
auto
&
add_gauge_family
=
prometheus
::
BuildGauge
()
auto
&
add_gauge_family
=
prometheus
::
BuildGauge
()
.
Name
(
metrics_name
)
.
Name
(
metrics_name
)
.
Labels
({{
"service"
,
"pegasus"
},
.
Labels
({{
"service"
,
"pegasus"
},
{
"host_name"
,
hostname
},
{
"cluster"
,
_cluster_name
},
{
"cluster"
,
_cluster_name
},
{
"pegasus_job"
,
_app_name
},
{
"pegasus_job"
,
_app_name
},
{
"port"
,
std
::
to_string
(
_local_port
)}})
{
"port"
,
std
::
to_string
(
_local_port
)}})
...
@@ -274,13 +298,9 @@ void pegasus_counter_reporter::update()
...
@@ -274,13 +298,9 @@ void pegasus_counter_reporter::update()
.
first
;
.
first
;
}
}
auto
&
second_gauge
=
it
->
second
->
Add
(
auto
&
second_gauge
=
it
->
second
->
Add
({{
"app"
,
app
[
0
]},
{
"partition"
,
app
[
1
]}});
{{
"app_id"
,
app
[
0
]},
{
"partition_count"
,
app
[
1
]},
{
"percent"
,
app
[
2
]}});
second_gauge
.
Set
(
cs
.
value
);
second_gauge
.
Set
(
cs
.
value
);
});
});
// report data to pushgateway
_gateway
->
Push
();
}
}
ddebug
(
"update now_ms(%lld), last_report_time_ms(%lld)"
,
now
,
_last_report_time_ms
);
ddebug
(
"update now_ms(%lld), last_report_time_ms(%lld)"
,
now
,
_last_report_time_ms
);
...
...
src/reporter/pegasus_counter_reporter.h
浏览文件 @
fb72d917
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
#include <event2/keyvalq_struct.h>
#include <event2/keyvalq_struct.h>
#include <prometheus/registry.h>
#include <prometheus/registry.h>
#include <prometheus/
gateway
.h>
#include <prometheus/
exposer
.h>
namespace
pegasus
{
namespace
pegasus
{
namespace
server
{
namespace
server
{
...
@@ -35,6 +35,13 @@ struct falcon_metric
...
@@ -35,6 +35,13 @@ struct falcon_metric
DEFINE_JSON_SERIALIZATION
(
endpoint
,
metric
,
timestamp
,
step
,
value
,
counterType
,
tags
)
DEFINE_JSON_SERIALIZATION
(
endpoint
,
metric
,
timestamp
,
step
,
value
,
counterType
,
tags
)
};
};
enum
class
perf_counter_sink_t
{
FALCON
,
PROMETHEUS
,
INVALID
};
class
pegasus_counter_reporter
:
public
::
dsn
::
utils
::
singleton
<
pegasus_counter_reporter
>
class
pegasus_counter_reporter
:
public
::
dsn
::
utils
::
singleton
<
pegasus_counter_reporter
>
{
{
public:
public:
...
@@ -72,8 +79,7 @@ private:
...
@@ -72,8 +79,7 @@ private:
// perf counter flags
// perf counter flags
bool
_enable_logging
;
bool
_enable_logging
;
bool
_enable_falcon
;
perf_counter_sink_t
_perf_counter_sink
;
bool
_enable_prometheus
;
// falcon relates
// falcon relates
std
::
string
_falcon_host
;
std
::
string
_falcon_host
;
...
@@ -82,10 +88,9 @@ private:
...
@@ -82,10 +88,9 @@ private:
falcon_metric
_falcon_metric
;
falcon_metric
_falcon_metric
;
// prometheus relates
// prometheus relates
std
::
string
_prometheus_host
;
uint16_t
_prometheus_port
;
uint16_t
_prometheus_port
;
std
::
shared_ptr
<
prometheus
::
Registry
>
_registry
;
std
::
shared_ptr
<
prometheus
::
Registry
>
_registry
;
std
::
shared_ptr
<
prometheus
::
Gateway
>
_gateway
;
std
::
unique_ptr
<
prometheus
::
Exposer
>
_exposer
;
std
::
map
<
std
::
string
,
prometheus
::
Family
<
prometheus
::
Gauge
>
*>
_gauge_family_map
;
std
::
map
<
std
::
string
,
prometheus
::
Family
<
prometheus
::
Gauge
>
*>
_gauge_family_map
;
};
};
}
}
...
...
src/server/config.ini
浏览文件 @
fb72d917
...
@@ -289,8 +289,11 @@
...
@@ -289,8 +289,11 @@
perf_counter_update_interval_seconds
=
10
perf_counter_update_interval_seconds
=
10
perf_counter_enable_logging
=
false
perf_counter_enable_logging
=
false
perf_counter_enable_falcon
=
false
# Where the metrics are collected. If no value is given, no sink is used.
perf_counter_enable_prometheus
=
false
# Options:
# - falcon
# - prometheus
perf_counter_sink
=
perf_counter_read_capacity_unit_size
=
4096
perf_counter_read_capacity_unit_size
=
4096
perf_counter_write_capacity_unit_size
=
4096
perf_counter_write_capacity_unit_size
=
4096
...
@@ -298,7 +301,7 @@
...
@@ -298,7 +301,7 @@
falcon_port
=
1988
falcon_port
=
1988
falcon_path
=
/v1/push
falcon_path
=
/v1/push
prometheus_host
=
127.0.0.1
# The HTTP port exposed to Prometheus for pulling metrics from pegasus server.
prometheus_port
=
9091
prometheus_port
=
9091
[pegasus.collector]
[pegasus.collector]
...
...
src/server/config.min.ini
浏览文件 @
fb72d917
...
@@ -114,6 +114,13 @@
...
@@ -114,6 +114,13 @@
[pegasus.server]
[pegasus.server]
perf_counter_enable_logging
=
false
perf_counter_enable_logging
=
false
# Where the metrics are collected. If no value is given, no sink is used.
# Options:
# - falcon
# - prometheus
perf_counter_sink
=
# The HTTP port exposed to Prometheus for pulling metrics from pegasus server.
prometheus_port
=
@PROMETHEUS_PORT@
[pegasus.collector]
[pegasus.collector]
available_detect_app
=
@APP_NAME@
available_detect_app
=
@APP_NAME@
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录