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

redis input doesn't return keyspace info #205

Closed
aodj opened this issue Sep 17, 2015 · 6 comments
Closed

redis input doesn't return keyspace info #205

aodj opened this issue Sep 17, 2015 · 6 comments

Comments

@aodj
Copy link

aodj commented Sep 17, 2015

Looking at the fields parsed from Redis it doesn't include any of the per-database keyspace metrics. Given that it's querying the INFO command the data is available, and it would be good to include it in the dataset.

It should look something like this:

# Keyspace
db0:keys=1215407,expires=1215399,avg_ttl=2498971

Please note that this isn't referring to the keyspace_hits and keyspace_misses fields which are included.

@sparrc
Copy link
Contributor

sparrc commented Sep 17, 2015

Thanks for reporting that, I may not have time to get to this for a bit, but if you have time to submit a PR I would appreciate it immensely

sparrc added a commit that referenced this issue Sep 23, 2015
sparrc added a commit that referenced this issue Sep 23, 2015
sparrc added a commit that referenced this issue Sep 23, 2015
sparrc added a commit that referenced this issue Sep 23, 2015
@sparrc sparrc closed this as completed in f8d64a7 Sep 23, 2015
@ericuldall
Copy link

ericuldall commented Jun 28, 2017

Was this feature added in some version of telegraf? If so, which version has it?
I'm currently using Telegraf v1.1.2 (git: release-1.1.0 3da3a22)

Specifically looking for total keys @ host.

@danielnelson
Copy link
Contributor

Looks like it was added in v0.1.10. Should be part of the redis_keyspace measurement.

@ericuldall
Copy link

ericuldall commented Jun 28, 2017

Here's a list of everything getting exported in my case...

SELECT * FROM redis WHERE $timeFilter:

redis.aof_base_size
redis.aof_buffer_length
redis.aof_current_rewrite_time_sec
redis.aof_current_size
redis.aof_delayed_fsync
redis.aof_enabled
redis.aof_last_bgrewrite_status
redis.aof_last_rewrite_time_sec
redis.aof_last_write_status
redis.aof_pending_bio_fsync
redis.aof_pending_rewrite
redis.aof_rewrite_buffer_length
redis.aof_rewrite_in_progress
redis.aof_rewrite_scheduled
redis.blocked_clients
redis.client_biggest_input_buf
redis.client_longest_output_list
redis.clients
redis.cluster
redis.cluster_enabled
redis.connected_slaves
redis.evicted_keys
redis.expired_keys
redis.host
redis.instantaneous_input_kbps
redis.instantaneous_ops_per_sec
redis.instantaneous_output_kbps
redis.keyspace_hitrate
redis.keyspace_hits
redis.keyspace_misses
redis.latest_fork_usec
redis.loading
redis.loading_eta_seconds
redis.loading_loaded_bytes
redis.loading_loaded_perc
redis.loading_start_time
redis.loading_total_bytes
redis.lru_clock
redis.master_host
redis.master_last_io_seconds_ago
redis.master_link_down_since_seconds
redis.master_link_status
redis.master_port
redis.master_repl_offset
redis.master_sync_in_progress
redis.master_sync_last_io_seconds_ago
redis.master_sync_left_bytes
redis.maxmemory
redis.maxmemory_policy
redis.mem_fragmentation_ratio
redis.migrate_cached_sockets
redis.port
redis.project
redis.pubsub_channels
redis.pubsub_patterns
redis.rdb_bgsave_in_progress
redis.rdb_changes_since_last_save
redis.rdb_current_bgsave_time_sec
redis.rdb_last_bgsave_status
redis.rdb_last_bgsave_time_sec
redis.rdb_last_save_time
redis.rdb_last_save_time_elapsed
redis.rejected_connections
redis.repl_backlog_active
redis.repl_backlog_first_byte_offset
redis.repl_backlog_histlen
redis.repl_backlog_size
redis.replication_role
redis.server
redis.slave0
redis.slave1
redis.slave_priority
redis.slave_read_only
redis.slave_repl_offset
redis.sync_full
redis.sync_partial_err
redis.sync_partial_ok
redis.total_commands_processed
redis.total_connections_received
redis.total_net_input_bytes
redis.total_net_output_bytes
redis.total_system_memory
redis.type
redis.uptime
redis.used_cpu_sys
redis.used_cpu_sys_children
redis.used_cpu_user
redis.used_cpu_user_children
redis.used_memory
redis.used_memory_lua
redis.used_memory_peak
redis.used_memory_rss
redis.zone

Is there some configuration I need to change perhaps?

Using:


[[inputs.redis]]
  ## specify servers via a url matching:
  ##  [protocol://][:password]@address[:port]
  ##  e.g.
  ##    tcp://localhost:6379
  ##    tcp://:password@192.168.99.100
  ##
  ## If no servers are specified, then localhost is used as the host.
  ## If no port is specified, 6379 is used
  servers = ["tcp://localhost:6379"]

@danielnelson
Copy link
Contributor

Try SELECT * FROM redis_keyspace WHERE $timeFilter

@ericuldall
Copy link

Yep, that did it. Thank you!

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

No branches or pull requests

4 participants