-
Notifications
You must be signed in to change notification settings - Fork 579
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
Introduce Endpoint#seconds_{reading_messages,awaiting_semaphore,processing_messages} #10266
base: master
Are you sure you want to change the base?
Conversation
5d1b07f
to
92a4f45
Compare
ef2a7d3
to
3ebbfc6
Compare
|
||
[no_user_modify, no_storage] double seconds_processing_messages { | ||
get; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works! 👍
< HTTP/1.1 200 OK
< Server: Icinga/v2.14.0-375-gecea52568
< Content-Type: application/json
< Content-Length: 591
<
{
"results": [
{
"attrs": {
"seconds_processing_messages": 3.1292e-05,
"seconds_reading_messages": 0.000155709
},
"joins": {},
"meta": {},
"name": "dummy",
"type": "Endpoint"
},
{
"attrs": {
"seconds_processing_messages": 0,
"seconds_reading_messages": 0
},
"joins": {},
"meta": {},
"name": "ws-aklimov7777777.local",
"type": "Endpoint"
}
]
}
3ebbfc6
to
f845407
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also works! 👍
new PerfdataValue("sum_bytes_received_per_second", bytesReceivedPerSecond) | ||
new PerfdataValue("sum_bytes_received_per_second", bytesReceivedPerSecond), | ||
new PerfdataValue("sum_seconds_reading_messages", secondsReadingMessages), | ||
new PerfdataValue("sum_seconds_processing_messages", secondsProcessingMessages) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{
"counter": false,
"crit": null,
"label": "sum_seconds_reading_messages",
"max": null,
"min": null,
"type": "PerfdataValue",
"unit": "",
"value": 0.000787875,
"warn": null
},
{
"counter": false,
"crit": null,
"label": "sum_seconds_processing_messages",
"max": null,
"min": null,
"type": "PerfdataValue",
"unit": "",
"value": 3.45e-05,
"warn": null
}
@@ -148,6 +152,8 @@ void IcingaCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckRes | |||
perfdata->Add(new PerfdataValue("sum_messages_received_per_second", messagesReceivedPerSecond)); | |||
perfdata->Add(new PerfdataValue("sum_bytes_sent_per_second", bytesSentPerSecond)); | |||
perfdata->Add(new PerfdataValue("sum_bytes_received_per_second", bytesReceivedPerSecond)); | |||
perfdata->Add(new PerfdataValue("sum_seconds_reading_messages", secondsReadingMessages)); | |||
perfdata->Add(new PerfdataValue("sum_seconds_processing_messages", secondsProcessingMessages)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{
"counter": false,
"crit": null,
"label": "sum_seconds_reading_messages",
"max": null,
"min": null,
"type": "PerfdataValue",
"unit": "",
"value": 0.000264792,
"warn": null
},
{
"counter": false,
"crit": null,
"label": "sum_seconds_processing_messages",
"max": null,
"min": null,
"type": "PerfdataValue",
"unit": "",
"value": 5.2666e-05,
"warn": null
}
get; | ||
}; | ||
|
||
[no_user_modify, no_storage] double seconds_processing_messages { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Colleagues, addition we could also (just for the API) record seconds_processing_messages PER message. I.e. there should be also another attribute returning a dict like {"event::CheckResult":42.0,... saying that this endpoint e.g. spent 42 seconds handling (already read and decoded) event::CheckResult messages since program start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Yes, there's also Log HTTP/RPC message processing stats #10141, but it's debug log unless a singe message takes excessively long. So, unless combined with Logger#object_filter: restrict Logger to messages referring to specific objects #9844, it's pretty useless in a large env.
f845407
to
20460e6
Compare
20460e6
to
055c6b6
Compare
ref/NC/820479
Tests