Updating metadata in meter collection

Asked by visharma

Hi,

My grizzly-2 collector instance pushes data in mongodb. From the mongodb database, I need to publish the records in a particular format to a stomp message queue. To mark the records as published, I can add a "published" key in metadata table, and set it to 1, after publishing the record in the queue.

So, is there a way to selectively update one/ more values in the metadata field of the meter collection ? I went through the code in ceilometer.storage.impl_mongodb.py, but most of the methods mentioned there are get_ i.e. they read the data from the mongo database.

Is this possible to update the metadata key-values ? If not, is it planned for a later release?

Regards,
Vineet Sharma

Question information

Language:
English Edit question
Status:
Solved
For:
Ceilometer Edit question
Assignee:
No assignee Edit question
Solved by:
Doug Hellmann
Solved:
Last query:
Last reply:
Revision history for this message
Best Doug Hellmann (doug-hellmann) said :
#1

I'm not sure it's a good idea for outside apps to be modifying the data stored and used by ceilometer. Would it work to create a separate collection and record the ids of samples that have been republished there? Alternately, you could look into creating another publisher plugin that knows how to take the meter messages and publish them directly to stomp (bypassing, or augmenting, ceilometer's storage layer).

Revision history for this message
visharma (thevineet) said :
#2

Ok, I will have to try something else. May be recording ids in a separate collection or publishing simultaneously to ceilometer as well as stomp.
Thanks...

Revision history for this message
visharma (thevineet) said :
#3

Thanks Doug Hellmann, that solved my question.