Hola,
he emigrado 3 nodos con éxito a AWS, en el estado abajo no veo cualquier *lags que es bien, pero cómo valido cada miembro así que lo
puedo comparar con el miembro más viejo para hacer seguro todos los datos es en *sync .
Me gustaría para comprobar el número de Colecciones en cada miembro y el
número de registros en cada colección, pero no quiero ir *thru cada
colección y contar, podría tener sobre 500 colecciones.. Me preguntaba
si hay guión puedo utilizar para generar tal informe..
Sé puedo correr las órdenes abajo, pero que sólo lista todas las colecciones.
Estoy intentando conseguir CUENTA de colecciones en cambio, y *no quiero ir
*thru una colección un el tiempo*.. Si mi *database es llamado HR, quiero cuenta
de todas colecciones de HR & cuentan de todos los registros de cada colección de HR por utilizar
un guión *hopefully..
*Algo similar a este informe:*
*Número de DB *
del HR de colecciones => 500
*nómina*
de Colecciones => 200,000 *Doc
empleados => 150,000 *Doc
*Dept => 50 *Doc
*NewHire => 10,000 *Doc
*db.*collectionName.Encuentra()
*db.*getCollectionNames()
Colecciones de espectáculo
*rs0:PRIMARIO> *rs.Estado()
"#nom" : "*rs0",
"fecha" : *ISODate("2015-09-27*T01:26:18*Z"),
"*myState" : 1,
"miembros" : [
"_#unknown{^*id" : 8,
"nombre" : "**server-1-*aws.*com*:27017",
"salud" : 1,
"estado" : 2,
"*stateStr" : "SECUNDARIO",
"*uptime" : 3092,
"*optime" : *Timestamp(1443314263, 1),
"*optimeDate" : *ISODate("*2015-09-27**T00:37:43*Z"),
"*lastHeartbeat" : *ISODate("2015-09-27*T01:26:18*Z"),
"*lastHeartbeatRecv" :
*ISODate("2015-09-27*T01:26:17*Z"),
"*pingMs" : 1,
"*syncingTo" : "*server-2-*aws.*com:27017"
},
"_#unknown{^*id" : 9,
"nombre" : "**server-2-*aws.*com*:27017",
"salud" : 1,
"estado" : 1,
"*stateStr" : "PRIMARIO",
"*uptime" : 448311,
"*optime" : *Timestamp(1443314263, 1),
"*optimeDate" : *ISODate("*2015-09-27**T00:37:43*Z"),
"*electionTime" : *Timestamp(1443313454, 1),
"*electionDate" : *ISODate("2015-09-27*T00:24:14*Z"),
"*self" : cierto
},
"_#unknown{^*id" : 10,
"nombre" : "**server-3-*aws.*com*:27017",
"salud" : 1,
"estado" : 2,
"*stateStr" : "SECUNDARIO",
"*uptime" : 2915,
"*optime" : *Timestamp(1443314263, 1),
"*optimeDate" : *ISODate("*2015-09-27**T00:37:43*Z"),
"*lastHeartbeat" : *ISODate("2015-09-27*T01:26:18*Z"),
"*lastHeartbeatRecv" :
*ISODate("2015-09-27*T01:26:17*Z"),
"*pingMs" : 1,
"*syncingTo" : "*server-2-*aws.*com:27017"
}
],
"*ok" : 1
}
**Thank te !*
@AJ
--
recibiste este mensaje porque eres *subscribed al *Google Grupos "*mongodb-grupo"
de usuario.
Para otro *MongoDB opciones de apoyo técnico, ve: *http://www.mongodb.org/sobre/apoyo/.
---
Recibiste este mensaje porque eres *subscribed al *Google Grupos "*mongodb-grupo" de usuario.
A *unsubscribe de este grupo y la parón que recibe *emails de él, enviar un *email a *mongodb-usuario+unsubscribe@xxxxxxxxxxxxxxxx.
A correo a este grupo, envía *email a *mongodb-user@xxxxxxxxxxxxxxxx.
Visita este grupo en *http://grupos.*google.*com/Grupo/*mongodb-usuario.
Para ver esta discusión en la visita de web *https://grupos.*google.*com/*d/*msgid/*mongodb-Usuario/75156*b22-*b957-4*f15-*b526-8*ab926*c0*fb6*d%40*googlegroups.*com.
Para más opciones, visita *https://grupos.*google.*com/*d/*optout.
| Hello,
I have migrated 3 nodes successfully to AWS, on the status below I don't
see any lags which is good, but how do I validate each member so I can
compare it with the older member to make sure all data is in sync .
I would like to check the number of Collections in each member and the
number of records in each collection, but I don't want to go thru each
collection and count, I might have over 500 collections.. I was wondering
if there is script I can use to generate such a report..
I know I can run the commands below, but that only lists all collections.
I am trying to get COUNTS of collections instead, and *I don't want to go
thru one collection a the time*.. If my database is called HR, I want count
of all HR collections & count of all records of each HR collection by using
a script hopefully..
*Something similar to this report:*
*HR DB *
Number of collections => 500
*Collections*
payroll => 200,000 Doc
employees => 150,000 Doc
Dept => 50 Doc
NewHire => 10,000 Doc
db.collectionName.find()
db.getCollectionNames()
show collections
rs0:PRIMARY> rs.status()
{
"set" : "rs0",
"date" : ISODate("2015-09-27T01:26:18Z"),
"myState" : 1,
"members" : [
{
"_id" : 8,
"name" : "*server-1-aws.com*:27017",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 3092,
"optime" : Timestamp(1443314263, 1),
"optimeDate" : ISODate("*2015-09-27*T00:37:43Z"),
"lastHeartbeat" : ISODate("2015-09-27T01:26:18Z"),
"lastHeartbeatRecv" :
ISODate("2015-09-27T01:26:17Z"),
"pingMs" : 1,
"syncingTo" : "server-2-aws.com:27017"
},
{
"_id" : 9,
"name" : "*server-2-aws.com*:27017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"uptime" : 448311,
"optime" : Timestamp(1443314263, 1),
"optimeDate" : ISODate("*2015-09-27*T00:37:43Z"),
"electionTime" : Timestamp(1443313454, 1),
"electionDate" : ISODate("2015-09-27T00:24:14Z"),
"self" : true
},
{
"_id" : 10,
"name" : "*server-3-aws.com*:27017",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 2915,
"optime" : Timestamp(1443314263, 1),
"optimeDate" : ISODate("*2015-09-27*T00:37:43Z"),
"lastHeartbeat" : ISODate("2015-09-27T01:26:18Z"),
"lastHeartbeatRecv" :
ISODate("2015-09-27T01:26:17Z"),
"pingMs" : 1,
"syncingTo" : "server-2-aws.com:27017"
}
],
"ok" : 1
}
*Thank you !*
@AJ
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/75156b22-b957-4f15-b526-8ab926c0fb6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
|