powdahound/redis-collectd-plugin — pull request #3 by gvalkov (2012-11-05 02:30:03+00:00)
Title: suppress bad format warnings

Using your script with `redis-2.6.2` results in numerous `Bad format for info line:` warnings. This patch suppresses them. Example warnings and partial info output:

```
...
mem_fragmentation_ratio:1.86
mem_allocator:jemalloc-3.0.0

# Persistence
loading:0
rdb_changes_since_last_save:0
...

[2012-11-05 02:24:38] redis_info plugin: Bad format for info line: # Server
[2012-11-05 02:24:38] redis_info plugin: Bad format for info line:
[2012-11-05 02:24:38] redis_info plugin: Bad format for info line: # Clients
[2012-11-05 02:24:38] redis_info plugin: Bad format for info line:
[2012-11-05 02:24:38] redis_info plugin: Bad format for info line: # Memory
[2012-11-05 02:24:38] redis_info plugin: Bad format for info line:
[2012-11-05 02:24:38] redis_info plugin: Bad format for info line: # Persistence
[2012-11-05 02:24:38] redis_info plugin: Bad format for info line:
[2012-11-05 02:24:38] redis_info plugin: Bad format for info line: # Stats
[2012-11-05 02:24:38] redis_info plugin: Bad format for info line:
[2012-11-05 02:24:38] redis_info plugin: Bad format for info line: # Replication
[2012-11-05 02:24:38] redis_info plugin: Bad format for info line:
[2012-11-05 02:24:38] redis_info plugin: Bad format for info line: # CPU
[2012-11-05 02:24:38] redis_info plugin: Bad format for info line:
[2012-11-05 02:24:38] redis_info plugin: Bad format for info line: # Keyspace
```

The empty lines are actually `\r` characters. I don't know if that what the case was in previous versions, but the current redis [protocol spec](http://redis.io/topics/protocol) states that CLRF line endings should be used. Cheers.