Comments (10)
@jadiunr thank you for the proposal and the PRs! Everything looks sound to me.
Pinging @fguimond who is working on pulling things together for a 6.10.0 release early next week. Perhaps we can move forward with this for a 6.10.1 release?
from sensu-go.
One of the biggest changes between sensu classic and sensu-go is that successful events now move all the way through the pipeline. (Previously only failing events did this.) I think this is a great enhancement because it reflects that same spirit of design for metrics thresholds. Thanks for the great issue and PRs.
from sensu-go.
We've accepted this proposal for the main branch, it will be a part of 7.x.
from sensu-go.
Thank you for replying!
I am considering having multiple thresholds for annotations as a better improvement idea.
"metadata": {
"namespace": "default",
"annotations": {
"sensu.io/notifications/ok": "The value of test_metric.value is within the configured threshold (max: 200 (status: warning) 300 (status: critical), actual: 100).",
"sensu.io/output_metric_thresholds/test_metric.value/max/ok": "The value of test_metric.value is within the configured threshold (max: 200 (status: warning) 300 (status: critical), actual: 100)."
}
},
My current PR only shows a single threshold value in the annotations for successful events.
In the documentation, the null_status
annotation can be displayed multiple threshold values.
{
"annotations": {
"sensu.io/output_metric_thresholds/system_host_processes/null": "WARNING: no metric matching \"system_host_processes\" (namespace=\"production\") was found; expected min: 5 - max: 50 (status: warning) min:2 - max: 75 (status: critical)"
}
}
After submitting PR, but if the work is not too complicated, I would like to make the above improvements.
from sensu-go.
Considering the various use cases for threshold monitoring, it seems that the above proposal (#4987 (comment)) is not as simple as it appears....
Spoiler
---
type: CheckConfig
api_version: core/v2
metadata:
name: test
spec:
command: "echo \"test_metric value=250\""
output_metric_format: influxdb_line
output_metric_thresholds:
- name: test_metric.value
null_status: 2
thresholds:
- max: "200"
min: "50"
status: 1
- max: "300"
min: "25"
status: 2
subscriptions:
- test
interval: 15
publish: true
- An example of a less appropriate output
"annotations": {
"sensu.io/notifications/warning": "The value of test_metric.value is within the configured threshold (max: 200 (status: warning) 300 (status: critical), actual: 250).",
"sensu.io/output_metric_thresholds/test_metric.value/max/ok": "The value of test_metric.value is within the configured threshold (max: 200 (status: warning) 300 (status: critical), actual: 250).",
"sensu.io/output_metric_thresholds/test_metric.value/max/warning": "The value of test_metric.value exceeded the configured threshold (max: 200 (status: warning) 300 (status: critical), actual: 250).",
"sensu.io/output_metric_thresholds/test_metric.value/min/ok": "The value of test_metric.value is within the configured threshold (min: 50 (status: warning) 25 (status: critical), actual: 250)."
}
It may well require more deliberation, but for now, would it be worthwhile just to add to the annotation that the threshold monitoring is normal?
from sensu-go.
I have attempted to improve the output content of the threshold annotations.
(However I think this is a slight deviation from the purpose of the PR 😥 Changed Issue and PR titles.)
e17ae2c
threshold annotations output
root@c3fa6e172611:/sensu-go# ./sensuctl event list --format wrapped-json | jq '.metadata.annotations'
null
{
"sensu.io/notifications/critical": "The value of test_metric_for_status_max_crit.value exceeded the configured threshold; expected min: 50 - max: 200 (status: warning); expected min: 25 - max: 300 (status: critical); actual: 350",
"sensu.io/output_metric_thresholds/test_metric_for_status_max_crit.value/critical": "The value of test_metric_for_status_max_crit.value exceeded the configured threshold; expected min: 50 - max: 200 (status: warning); expected min: 25 - max: 300 (status: critical); actual: 350"
}
{
"sensu.io/notifications/warning": "The value of test_metric_for_status_max_warn.value is within the configured threshold; expected min: 50 - max: 200 (status: warning); expected min: 25 - max: 300 (status: critical); actual: 250",
"sensu.io/output_metric_thresholds/test_metric_for_status_max_warn.value/warning": "The value of test_metric_for_status_max_warn.value exceeded the configured threshold; expected min: 50 - max: 200 (status: warning); expected min: 25 - max: 300 (status: critical); actual: 250"
}
{
"sensu.io/notifications/critical": "The value of test_metric_for_status_min_crit.value exceeded the configured threshold; expected min: 50 - max: 200 (status: warning); expected min: 25 - max: 300 (status: critical); actual: 20",
"sensu.io/output_metric_thresholds/test_metric_for_status_min_crit.value/critical": "The value of test_metric_for_status_min_crit.value exceeded the configured threshold; expected min: 50 - max: 200 (status: warning); expected min: 25 - max: 300 (status: critical); actual: 20"
}
{
"sensu.io/notifications/warning": "The value of test_metric_for_status_min_warn.value is within the configured threshold; expected min: 50 - max: 200 (status: warning); expected min: 25 - max: 300 (status: critical); actual: 40",
"sensu.io/output_metric_thresholds/test_metric_for_status_min_warn.value/warning": "The value of test_metric_for_status_min_warn.value exceeded the configured threshold; expected min: 50 - max: 200 (status: warning); expected min: 25 - max: 300 (status: critical); actual: 40"
}
{
"sensu.io/notifications/critical": "CRITICAL : no metric matching \"test_metric_for_status_null.value\" was found; expected min: 50 - max: 200 (status: warning); expected min: 25 - max: 300 (status: critical)",
"sensu.io/output_metric_thresholds/test_metric_for_status_null.value/critical": "CRITICAL : no metric matching \"test_metric_for_status_null.value\" was found; expected min: 50 - max: 200 (status: warning); expected min: 25 - max: 300 (status: critical)"
}
{
"sensu.io/notifications/ok": "The value of test_metric_for_status_ok.value is within the configured threshold; expected min: 50 - max: 200 (status: warning); expected min: 25 - max: 300 (status: critical); actual: 100",
"sensu.io/output_metric_thresholds/test_metric_for_status_ok.value/ok": "The value of test_metric_for_status_ok.value is within the configured threshold; expected min: 50 - max: 200 (status: warning); expected min: 25 - max: 300 (status: critical); actual: 100"
}
I would like to hear someone's opinion about this one.
from sensu-go.
@c-kruse @echlebek @fguimond Is there any progress on this matter?
from sensu-go.
Hi @jadiunr, sorry for letting this lapse. I think we can accept the changes targeted at main, but not for 6.x as we have effectively frozen that branch now.
from sensu-go.
Understood.
Then I will withdraw the 6.x PR.
from sensu-go.
Oh, it was already all over.
Thank you for your response!
from sensu-go.
Related Issues (20)
- Backend Init support for jwt-private-key-file and jwt-public-key-file HOT 1
- Deleting an Entity should delete its associated events HOT 1
- Suspected 7.x agentd subscription change regression.
- Add functionality to allow for mutated events be stored by the backend and changes reflected on the webUI HOT 1
- Upgrade dependency "github.com/go-resty/resty"
- Add option to disable color for sensuctl output HOT 5
- Platform family not being populated on agents deployed on Alma linux. HOT 4
- [SPIKE] Determine the cost of adding support for Not-Modified and Created indicators with postgres HOT 1
- Remove the deprecated agent v1 socket API
- Manually executing check - no matching entities HOT 3
- Bug: cron checks are executed on backend startup regardless of schedule HOT 2
- Asset cache can lead to denial of service if asset database is deleted
- Resource wrapping in Sensu 7.x
- Remove round robin scheduler HOT 1
- sensuctl alway set default param http://127.0.0.1:8080 even different url specified MAC os
- Fix Adhoc Check Scheduling
- Debian Packages for Debian 12 (bookworm) HOT 3
- mTLS Agent Certificate Being Used As Backend API Certificate HOT 2
- Add support escape special characters in InfluxDB Line HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sensu-go.