-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add fields to info metricset of Redis module #7695
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
info
metricset of Redis moduleThere 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.
Thanks for these improvements! 🙂
- name: used.rss | ||
type: long | ||
format: bytes | ||
description: > | ||
Used memory rss. | ||
|
||
Number of bytes that Redis allocated as seen by the operating system (a.k.a resident set size). |
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.
Thanks for these improvements in the descriptions! 🙂
"priority": c.Int("slave_priority", s.Optional), | ||
"is_readonly": c.Bool("slave_read_only", s.Optional), | ||
}, | ||
// ToDo find a way to add dynamic object of slaves: "slaves": s.Str("slaveXXX") |
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.
Maybe slaves data could be in a specific metricset.
But something interesting we could add here are some aggregated metrics obtained from this list of slaves, like number of slaves in each state, average/min/max lag, min/max offset...
This can be left for another PR in any case.
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.
Here and in some other scenarios, I need a dynamic array in the schema. Is there any way to do so? Something like this JSON:
{
"slaves": [
{
"host": "localhost:6380",
"lag": 2
},
{
"host": "localhost:6381",
"lag": 0
},
]
}
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.
This kind of structure can be problematic metric-wise, to make it useful, slaves should be a nested object, if not the event would be indexed as something like:
{
"slaves": {
"host": ["localhost:6380", "localhost:6381"]
"lag": [2, 0],
}
}
With this it is not possible, or very difficult, to make proper queries with filters or aggregations.
The problem with nested objects is that we are not using them in beats and they would require some additional support, as well as some performance tests. Kibana would also need better support for queries and visualizations on these kind of fields.
This is why I proposed to have an additional metricset, that could have events with fields like:
"slave": {
"host": "localhost:6380",
"lag": 2
}
Or to have by now aggregations directly on the existing metricset.
jenkins, test this |
@a3dho3yn you will need to update the branch and resolve the conflicts. |
}, | ||
}, | ||
"slowlog": s.Object{ | ||
"count": c.Int("slowlog_len"), |
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.
Don't forget to add this to the fields.yml
file 🙂
I don't know why test_template (from test_base.py) fails :( |
description: > | ||
Ratio between used_memory_rss and used_memory | ||
- name: fragmentation.bytes | ||
type: bytes |
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.
@a3dho3yn I have run the failing test locally, and it seems that the failure is caused by this, bytes
can be used as format
, but not as type
.
|
||
- name: master_offset | ||
type: long | ||
description: | ||
|
||
deprecated: true |
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.
After merging #7779 today, deprecated
needs to be set to the version the field is going to be deprecated on, in this case set it to 6.5.
@a3dho3yn run |
I've run |
Oh yes, sorry, you also need to update your branch with master. |
jenkins, test this please |
@a3dho3yn merged, thanks a lot for this contribution and the others you are working on 😃 Just curious, are you using the provided dashboards for redis and rabbitmq? We'd be happy to accept contributions also there if you have any proposal 🙂 |
Thank you very much for all the help to complete these PRs. |
Add memory fragmentation ratio, active defragmentation stats, slave status and some other fields that were missing from info metricset. (cherry picked from commit ce9048c)
Memory fragmentation ratio, active defragmentation stats, slave status and some other fields was missing from
info
metricset.