naparuba/shinken — pull request #1365 by lermit (2014-11-05 16:12:50+00:00)
Title: Fix : get_retention_data function in order to allow retention module to work

Hi,

When the mongodb retention module try to store data there is an error :

```
[1415143588] ERROR: [Shinken] The instance retention-mongodb raise an exception 'prop'. I disable it and set it to restart it later
[1415143588] ERROR: [Shinken] Exception trace follows: Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/shinken/scheduler.py", line 374, in hook_point
f(self)
File "/var/lib/shinken/modules/retention-mongodb/module.py", line 192, in hook_save_retention
all_data = daemon.get_retention_data()
File "/usr/local/lib/python2.6/dist-packages/shinken/scheduler.py", line 1010, in get_retention_data
if entry.retention and DICT_MODATTR['prop'].value & s.modified_attributes:
KeyError: 'prop'
```

I think the 'prop' variable should not be enclosed by quote.

If you do that you have an other error :

```
[1415199934] ERROR: [Shinken] The instance retention-mongodb raise an exception 'process_perf_data'. I disable it and set it to restart it later
[1415199934] ERROR: [Shinken] Exception trace follows: Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/shinken/scheduler.py", line 374, in hook_point
f(self)
File "/var/lib/shinken/modules/retention-mongodb/module.py", line 192, in hook_save_retention
all_data = daemon.get_retention_data()
File "/usr/local/lib/python2.6/dist-packages/shinken/scheduler.py", line 1012, in get_retention_data
if entry.retention and DICT_MODATTR[prop].value & s.modified_attributes:
KeyError: 'process_perf_data'
```

This is due to the configuration in the ```misc/common.py``` file. The process_perf_data service argument is named process_performance_data.

Fill free to discuss this PR :).

Regards