Lets use a shared connection and database instance from MongoMapper and the configuration file here instead of having them manually setup one just for this background task. I would imagine there will be additional background tasks in this project and it doesn't make much sense to have it create it's own connection and database on disk here each time.

In a standard deployment for this, there would be two database connections total. One for the database/cluster we're monitoring and one for the local database we're storing this information in. You'll need to configure MongoMapper for both database connections so that they can be re-used throughout the entire project but managed in a single location.