28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# File 'lib/cloudscale/plugins/mongo/mongo_db_status.rb', line 28
def collect(agentInstanceId)
log.info("Calling Collect on MongoDbStatus")
stats = @db.stats
registry.metrics["mongo.status.objects"] = metrics.gauge :status_objects do
{ :value => stats['objects'] }
end
report(indexMetric, , stats['indexes'], false, agentInstanceId, "dbIndexChart",
"Indexes in database", "Total number of indexes in the database" , "area", "Time", "Count", "c", nil)
report(dataSizeMetric, , stats['dataSize'], false, agentInstanceId, "dbDataSizeChart",
"Data size of database", "Total data size of the database" , "area", "Time", "MB", "MB", nil)
report(indexSizeMetric, , stats['indexSize'], false, agentInstanceId, "dbStorageSizeChart",
"Storage size of database", "Total storage size of the database", "area", "Time", "MB", "MB", nil)
report(storageSizeMetric, , stats['storageSize'], false, agentInstanceId, "dbIndexSizeChart",
"Index size of database", "Total index size of the database" , "area", "Time", "MB", "MB", nil)
report(collectionsMetric, , stats['collections'], false, agentInstanceId, "dbCollectionsChart",
"Collections in database", "Total number of collections in the database" , "area", "Time", "Count", "c", nil)
report(avgObjSizeMetric, , stats['avgObjSize'], false, agentInstanceId, "dbAvgObjSizeChart",
"Average object size in database", "The average object size across all collections in the database" , "area", "Time", "MB", "MB", nil)
end
|