Hello! I need help to create a alert for Error Per...
# support
p
Hello! I need help to create a alert for Error Percentage (10%+) for a app/service called: nodejs-example-app-for-signoz How i made this query?
s
Do you want to make an alert similar to this?
p
No, just use thist chart to alert on slack channel
This is one of default chart on defaults panes.
s
This is made with
SUM_RATE
of spans with
status_code=STATUS_CODE_ERROR
for a service as query
A
to
SUM_RATE
of all spans from same service query
B
and using
Formula
of
(A/B)*100
.
You can achieve this with query builder
p
Metric based or traced-based alert?
s
No, there is a metric called
signoz_calls_total
.
p
Ok i will try
I use IN or Like?
Who is equal?
Status_code IN status_code_error Status_code LIKE status_code_error
s
You can use Status_code IN status_code_error
p
hey bro @Srikanth Chekuri
The result is 2.88
But on default panel the result is 15%
what i`m doing wrong?
s
Select the operations which are the API endpoints; otherwise, it includes all the operations. We call these operations as service entry spans i.e in a trace call there are some operations which are the actual starting points and there are sub operations so when we work with service we are generally interested in top-level/entry-spans for service.
p
Sorry, but i did not urderstand.
So, its not possible create a alert for the Error Percentage, from the default (overview metrics) panel.
s
It is possible. Your filter criteria is not the same as in overview page.
p
I just want create a alert for this chart
How i made the correct. filter?
s
That is exactly what I am referring to. You are halfway through creating the alert. You need to add an operations filter. In the list of operations for the service, there are going to be some operations which are the entry point for the service, and you need to select those operations. For the example trace -> service-a
/api/users/{user_id}
-> service-a
db.operation
-> return. In this case, the ``/api/users/{user_id}`` is the top-level span i.e span where the trace journey started for the service. There can be a number of sub-operations under that such as
db.operation
etc...
And another question, how the default do the service discovery of all, if i understand correctly, i will need to create one by one.
s
I can create this here?
Yes
how the default do the service discovery of all
Are you talking about the service entry spans or service discovery in k8s?
p
hey @Srikanth Chekuri. Thanks!! I found the operation you mentioned.
But has a option to select all?
Or all that the error percentage chart on overview metrics show as default.
s
Your question was not clear to me. In this list, you need to select those are the entry-level spans.
p
Here, i think the chart from home page have a filter that select all pertinent to that app
I will need do it manually one by one?
s
No, key operations are not necessarily top-level operations.
For example the
tcp.connect
is most likely some inner span in service not the top level/entry span
p
Who operations the error percentage chart form home page uses?
s
It has an API and queries to fetch those top-level operations. You can open devtools and see it.
p
You are the best. I will configure and back you as soon. Thanks again