da lanciare con: mongo mongo check_collection_size.js
permette di ottenere la size delle collection di tutti i db in modo da poterla monitorare con qualche app tipo jmeter o nagios.
il risultato:
[ {
"name" : "meteoArpa",
"collections" : [
{
"name" : "data",
"storageSize" : "680.00 KB",
"size" : "510.89 KB",
"count" : 519
},
{
"name" : "pluvio",
"storageSize" : "21.46 MB",
"size" : "19.97 MB",
"count" : 20779
},
{
"name" : "system.indexes",
"storageSize" : "8.00 KB",
"size" : "336 B",
"count" : 3
},
{
"name" : "temperature",
"storageSize" : "21.46 MB",
"size" : "20.00 MB",
"count" : 20807
}
]
},
{
"name" : "pcat",
"collections" : [
{
"name" : "products",
"storageSize" : "8.00 KB",
"size" : "3.58 KB",
"count" : 11
},
{
"name" : "system.indexes",
"storageSize" : "8.00 KB",
"size" : "112 B",
"count" : 1
}
]
},
{
"name" : "admin",
"collections" : [ ]
}
]
Nessun commento:
Posta un commento