willixix / naglio-plugins

Monitoring Plugins by William Leibzon
http://william.leibzon.org/nagios/
77 stars 54 forks source link

redis 2.6 memory_utilization data is missing #38

Open supergrilo opened 11 years ago

supergrilo commented 11 years ago

Hello! :)

dpkg -l |grep redis

ii libredis-perl 2:1.9510-2 all persistent key-value database with network interface (Perl client library) ii redis-server 2:2.6.15-1 amd64 Persistent key-value database with network interface

./check_redis.pl -H localhost -m88,90 -M2048M -v Processing memory utilization thresholds: 88,90 check_redis.pl plugin version 0.73 Alarm at 15 connecting to localhost:6379 [SEND] PING $VAR1 = []; [SEND RAW] 1 $4 PING [RECV RAW] '+PONG' at /usr/share/perl5/Redis.pm line 522, chunk 1. [RECV] PING $VAR1 = 'PONG'; $VAR2 = undef; [SEND] INFO $VAR1 = []; [SEND RAW] 1 $4 INFO [RECV RAW] '$1660' at /usr/share/perl5/Redis.pm line 522, chunk 2. [RECV RAW] '# Server redis_version:2.6.15 redis_git_sha1:00000000 redis_git_dirty:0 redis_mode:standalone os:Linux 3.2.0-4-amd64 x86_64 arch_bits:64 multiplexing_api:epoll gcc_version:4.7.2 process_id:31623 run_id:8a72e1fb0f2337acaac81cf21eb560931e9f72c3 tcp_port:6379 uptime_in_seconds:1346 uptime_in_days:0 hz:10 lru_clock:1405428

Clients

connected_clients:2 client_longest_output_list:0 client_biggest_input_buf:0 blocked_clients:0

Memory

used_memory:1625944 used_memory_human:1.55M used_memory_rss:3092480 used_memory_peak:1703840 used_memory_peak_human:1.62M used_memory_lua:31744 mem_fragmentation_ratio:1.90 mem_allocator:jemalloc-3.0.0

Persistence

loading:0 rdb_changes_since_last_save:1141 rdb_bgsave_in_progress:0 rdb_last_save_time:1377201742 rdb_last_bgsave_status:ok rdb_last_bgsave_time_sec:-1 rdb_current_bgsave_time_sec:-1 aof_enabled:0 aof_rewrite_in_progress:0 aof_rewrite_scheduled:0 aof_last_rewrite_time_sec:-1 aof_current_rewrite_time_sec:-1 aof_last_bgrewrite_status:ok

Stats

total_connections_received:63 total_commands_processed:2018 instantaneous_ops_per_sec:0 rejected_connections:0 expired_keys:0 evicted_keys:0 keyspace_hits:493 keyspace_misses:166 pubsub_channels:0 pubsub_patterns:0 latest_fork_usec:0

Replication

role:slave master_host:192.168.1.62 master_port:6379 master_link_status:up master_last_io_seconds_ago:8 master_sync_in_progress:0 slave_priority:100 slave_read_only:1 connected_slaves:0

CPU

used_cpu_sys:0.60 used_cpu_user:0.08 used_cpu_sys_children:0.00 used_cpu_user_children:0.00

Keyspace

db0:keys=329,expires=329,avg_ttl=0 ' at /usr/share/perl5/Redis.pm line 545, chunk 2. [RECV] INFO $VAR1 = '# Server redis_version:2.6.15 redis_git_sha1:00000000 redis_git_dirty:0 redis_mode:standalone os:Linux 3.2.0-4-amd64 x86_64 arch_bits:64 multiplexing_api:epoll gcc_version:4.7.2 process_id:31623 run_id:8a72e1fb0f2337acaac81cf21eb560931e9f72c3 tcp_port:6379 uptime_in_seconds:1346 uptime_in_days:0 hz:10 lru_clock:1405428

Clients

connected_clients:2 client_longest_output_list:0 client_biggest_input_buf:0 blocked_clients:0

Memory

used_memory:1625944 used_memory_human:1.55M used_memory_rss:3092480 used_memory_peak:1703840 used_memory_peak_human:1.62M used_memory_lua:31744 mem_fragmentation_ratio:1.90 mem_allocator:jemalloc-3.0.0

Persistence

loading:0 rdb_changes_since_last_save:1141 rdb_bgsave_in_progress:0 rdb_last_save_time:1377201742 rdb_last_bgsave_status:ok rdb_last_bgsave_time_sec:-1 rdb_current_bgsave_time_sec:-1 aof_enabled:0 aof_rewrite_in_progress:0 aof_rewrite_scheduled:0 aof_last_rewrite_time_sec:-1 aof_current_rewrite_time_sec:-1 aof_last_bgrewrite_status:ok

Stats

total_connections_received:63 total_commands_processed:2018 instantaneous_ops_per_sec:0 rejected_connections:0 expired_keys:0 evicted_keys:0 keyspace_hits:493 keyspace_misses:166 pubsub_channels:0 pubsub_patterns:0 latest_fork_usec:0

Replication

role:slave master_host:192.168.1.62 master_port:6379 master_link_status:up master_last_io_seconds_ago:8 master_sync_in_progress:0 slave_priority:100 slave_read_only:1 connected_slaves:0

CPU

used_cpu_sys:0.60 used_cpu_user:0.08 used_cpu_sys_children:0.00 used_cpu_user_children:0.00

Keyspace

db0:keys=329,expires=329,avg_ttl=0 '; $VAR2 = undef; [SEND] QUIT $VAR1 = []; [SEND RAW] *1 $4 QUIT Stats Line: slave_priority = 100 Stats Line: 63 = total_commands_processed Stats Line: Linux 3.2.0-4-amd64 x86_64 = arch_bits Stats Line: 1346 = uptime_in_days Stats Line: 1.90 = mem_allocator Stats Line: 1703840 = used_memory_peak_human Stats Line: 166 = pubsub_channels Stats Line: 8a72e1fb0f2337acaac81cf21eb560931e9f72c3 = tcp_port Stats Line: master_link_status = up Stats Line: 1.55M = used_memory_rss Stats Line: loading = 0 Stats Line: 1625944 = used_memory_human Stats Line: # Stats = total_connections_received Stats Line: rdb_last_bgsave_time_sec = -1 Stats Line: connected_clients = 2 Stats Line: 0.60 = used_cpu_user Stats Line: 31744 = mem_fragmentation_ratio Stats Line: 1405428 = # Clients Stats Line: rdb_last_bgsave_status = ok Stats Line: master_host = 192.168.1.62 Stats Line: 1.62M = used_memory_lua Stats Line: client_biggest_input_buf = 0 Stats Line: aof_rewrite_scheduled = 0 Stats Line: master_last_io_seconds_ago = 8 Stats Line: rdb_last_save_time = 1377201742 Stats Line: standalone = os Stats Line: 10 = lru_clock Stats Line: role = slave Stats Line: rdb_changes_since_last_save = 1141 Stats Line: db0 = keys=329,expires=329,avg_ttl=0

willixix commented 11 years ago

This is not an issue with the plugin but with your redis perl library that has not been updated to properly support 2.6. This is the same problem discussed in: https://github.com/willixix/WL-NagiosPlugins/issues/16

ynezz commented 10 years ago

Hi,

I was bitten by this issue also and spent some time on it. Maybe it would be more userfriendly to detect this corner case and show some warning instead of an error message which is wrong, missleading and doesn't help at all? :-)

Indeed, installing new version of Redis Perl library fixed it. Thanks.

Petr