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

RediSearch module metrics collection #942

Closed
1 of 2 tasks
nantiferov opened this issue Sep 3, 2024 · 2 comments · Fixed by #953
Closed
1 of 2 tasks

RediSearch module metrics collection #942

nantiferov opened this issue Sep 3, 2024 · 2 comments · Fixed by #953
Assignees
Labels

Comments

@nantiferov
Copy link
Contributor

nantiferov commented Sep 3, 2024

Describe the problem
Hi,

I recently started testing RediSearch module for redis and noticed that there is no support for its metrics collection.

So I found these info commands which shows useful information about module stats:

$ redis-cli -p 36379 info modules
# Modules
module:name=RedisCompat,ver=1,api=1,filters=0,usedby=[],using=[],options=[]
module:name=redisgears_2,ver=20020,api=1,filters=0,usedby=[],using=[],options=[]
module:name=search,ver=21005,api=1,filters=0,usedby=[],using=[ReJSON],options=[handle-io-errors]
module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors]
module:name=timeseries,ver=11202,api=1,filters=0,usedby=[],using=[],options=[]
module:name=bf,ver=20802,api=1,filters=0,usedby=[],using=[],options=[]

# redisgears_2_UninitialisedBackends
redisgears_2_backend_name:js

# search_version
search_version:2.10.5
search_redis_version:7.4.0 - oss

# search_index
search_number_of_indexes:2

# search_fields_statistics
search_fields_text:Text=5,Sortable=1
search_fields_numeric:Numeric=2,Sortable=1
search_fields_tag:Tag=1

# search_memory
search_used_memory_indexes:7052
search_used_memory_indexes_human:0.006725311279296875
search_total_indexing_time:5.9800000190734863

# search_cursors
search_global_idle:0
search_global_total:0

# search_gc
search_bytes_collected:0
search_total_cycles:0
search_total_ms_run:0

# search_dialect_statistics
search_dialect_1:1
search_dialect_2:0
search_dialect_3:0
search_dialect_4:0

# search_runtime_configurations
search_enableGC:ON
search_minimal_term_prefix:2
search_minimal_stem_length:4
search_maximal_prefix_expansions:200
search_query_timeout_ms:500
search_timeout_policy:return
search_cursor_read_size:1000
search_cursor_max_idle_time:300000
search_max_doc_table_size:1000000
search_max_search_results:10000
search_max_aggregate_results:10000
search_gc_scan_size:100
search_min_phonetic_term_length:3

I'm thinking would be good to add these metrics collection:

  • search_version
  • search_number_of_indexes
  • search_used_memory_indexes
  • search_total_indexing_time
  • search_global_idle
  • search_global_total
  • search_bytes_collected
  • search_total_cycles
  • search_total_ms_run

What version of redis_exporter are you running?
Please run redis_exporter --version if you're not sure what version you're running.

  • 0.3x.x
  • 1.x.x

Running the exporter

Not relevant, feature request.

Screenshots

Not relevant, feature request.

Additional context

I think I can implement this in a week or so by adding flag named like check-search-module, defaults disabled.

In the future, as next step, should be possible to add per index metrics collection, where FT._list shows available indexes, and FT.info <index> shows quite a lot of useful information about index stats and performance.

@oliver006
Copy link
Owner

Thanks for checking, I think that makes sense!

Happy to review a PR once you're ready.

nantiferov added a commit to nantiferov/redis_exporter that referenced this issue Sep 10, 2024
nantiferov added a commit to nantiferov/redis_exporter that referenced this issue Sep 11, 2024
@nantiferov
Copy link
Contributor Author

nantiferov commented Sep 11, 2024

I think PR is ready for review.
Added new docker image and tests for new feature. Looks like working fine to me.

Tested it manually too.

nantiferov added a commit to nantiferov/redis_exporter that referenced this issue Sep 19, 2024
nantiferov added a commit to nantiferov/redis_exporter that referenced this issue Oct 29, 2024
Initially added in oliver006#953 as gauges, but usage shows that they're counters.

Related: oliver006#942
oliver006 pushed a commit that referenced this issue Oct 31, 2024
#962)

Initially added in #953 as gauges, but usage shows that they're counters.

Related: #942
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants