API: Refine stat and config for prometheus exporter.

pull/3195/head
winlin 2 years ago
parent 981cab40d3
commit 5f8da02ee7

@ -13,5 +13,25 @@ http_server {
enabled on;
listen 8080;
}
rtc_server {
enabled on;
listen 8000; # UDP port
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#config-candidate
candidate $CANDIDATE;
}
vhost __defaultVhost__ {
hls {
enabled on;
}
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
rtc {
enabled on;
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtmp-to-rtc
rtmp_to_rtc on;
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmp
rtc_to_rtmp on;
}
}

@ -663,7 +663,7 @@ exporter {
# Whether exporter is enabled.
# Overwrite by env SRS_EXPORTER_ENABLED
# Default: off
enabled off;
enabled off;
# The logging label to category the cluster servers.
# Overwrite by env SRS_EXPORTER_LABEL
label cn-beijing;

@ -63,6 +63,7 @@ void srs_build_features(stringstream& ss)
SRS_CHECK_FEATURE2(_srs_config->get_http_api_enabled(), "api", ss);
SRS_CHECK_FEATURE2(_srs_config->get_https_api_enabled(), "https", ss);
SRS_CHECK_FEATURE2(_srs_config->get_raw_api(), "raw", ss);
SRS_CHECK_FEATURE2(_srs_config->get_exporter_enabled(), "prom", ss);
string region = srs_getenv("SRS_REGION");
SRS_CHECK_FEATURE3(!string(region).empty(), "region", region, ss);

Loading…
Cancel
Save