Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporter: Filter normal read and write errors.(#3364) #3367

Open
wants to merge 1 commit into
base: 5.0release
Choose a base branch
from

Conversation

chundonglinlin
Copy link
Member

@chundonglinlin chundonglinlin commented Jan 6, 2023

Filter normal read and write errors, for ignore or reduce srs_clients_errs_total some disconnect events.

curl http://127.0.0.1:9972/metrics
# HELP srs_node_uname_info Labeled system information as provided by the uname system call.
# TYPE srs_node_uname_info gauge
srs_node_uname_info{sysname="Linux",nodename="7cd605a15218",release="5.10.104-linuxkit",version="#1 SMP Thu Mar 17 17:08:06 UTC 2022",machine="x86_64"} 1
# HELP srs_build_info A metric with a constant '1' value labeled by build_date, version from which SRS was built.
# TYPE srs_build_info gauge
srs_build_info{build_date="2023-01-06 17:17:09",major="6",version="6.0.13",code="Bee",label="cn-beijing",tag="cn-edge"} 1
# HELP srs_cpu_percent SRS cpu used percent.
# TYPE srs_cpu_percent gauge
srs_cpu_percent 3.003
# HELP srs_memory SRS memory used.
# TYPE srs_memory gauge
srs_memory 22280
# HELP srs_send_bytes_total SRS total sent bytes.
# TYPE srs_send_bytes_total counter
srs_send_bytes_total 5789
# HELP srs_receive_bytes_total SRS total received bytes.
# TYPE srs_receive_bytes_total counter
srs_receive_bytes_total 203862
# HELP srs_streams The number of SRS concurrent streams.
# TYPE srs_streams gauge
srs_streams 0
# HELP srs_clients The number of SRS concurrent clients.
# TYPE srs_clients gauge
srs_clients 0
# HELP srs_clients_total The total counts of SRS clients.
# TYPE srs_clients_total counter
srs_clients_total 1
# HELP srs_clients_errs_total The total errors of SRS clients.
# TYPE srs_clients_errs_total counter
srs_clients_errs_total 0

@winlinvip winlinvip linked an issue Jan 7, 2023 that may be closed by this pull request
if (srs_error_code(err) != ERROR_SUCCESS) {
// TODO: FIXME: Should filter the err.
int err_code = srs_error_code(err);
if (err_code != ERROR_SUCCESS && err_code != ERROR_SOCKET_READ && err_code != ERROR_SOCKET_WRITE
Copy link
Member

@winlinvip winlinvip Jan 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using tags would be better to determine which errors can be ignored in PromQL.

code=1048, name=StreamIsBusy

TRANS_BY_GPT3

@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TransByAI Translated by AI/GPT.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exporter: The success rate is too low.
3 participants