The aodh.storage.impl_mongodb Module

MongoDB storage backend

class aodh.storage.impl_mongodb.Connection(conf, url)[source]

Bases: aodh.storage.pymongo_base.Connection

Put the alarm data into a MongoDB database.

clear()[source]
clear_expired_alarm_history_data(alarm_history_ttl)[source]

Clear expired alarm history data from the backend storage system.

Clearing occurs according to the time-to-live.

Parameters:alarm_history_ttl – Number of seconds to keep alarm history records for.
static update_ttl(ttl, ttl_index_name, index_field, coll)[source]

Update or ensure time_to_live indexes.

Parameters:
  • ttl – time to live in seconds.
  • ttl_index_name – name of the index we want to update or ensure.
  • index_field – field with the index that we need to update.
  • coll – collection which indexes need to be updated.
upgrade()[source]