[10:00:41] <thapakazi> I am learning by doing the ssl configuration setup for mongodb, till now I am happy with generating and starting mongod with ssl config enabled, following this: https://docs.mongodb.com/manual/tutorial/configure-ssl/ and I am stucked, how do I configure ssl like generating client.pem (if I should do it)... In my instinct, I should be putting some client.pem stuffs (I don't know how to generate one) to my mongoid.yml
[10:00:42] <thapakazi> config. I am trying requireSSL
[10:05:58] <kurushiyama> thapakazi Out of my scope, usually I have closed networks for MongoDB.
[10:10:19] <thapakazi> hey kurushiyama, what does your name implies, its so unique 😄
[12:31:15] <alexandernst> I have 2 collections and I want to get some documents that should contains fields from both collections. That's why I'm using $lookup
[12:31:51] <alexandernst> $lookup by itself works fine, it returns all the objects from both collections, but as soon as I add another stage to the pipeline, I get only 1 object in the result. Why is that?
[12:36:02] <obiwahn> kurushiyama: i wonder if i have to reset the cursor every-time manually.
[12:38:51] <kurushiyama> obiwahn Why would you? A query returns a cursor. This cursor always refers to the same result set. So yes, if you want to (re)iterate over the same _result_ set, you need to reset it. If you want to include all changed/added and exclude all deleted documents, you should start a new query.
[12:43:38] <obiwahn> so the position of the cursor has no effect on the set key?
[12:57:42] <Derick> jayjo: or perhaps ssl_certfile
[12:57:57] <Derick> jayjo: AFAIK, you can use all the ones that the PyMongo string understands: https://api.mongodb.com/python/current/examples/tls.html
[13:02:18] <jayjo> I'm running this exact command: mongobiuser create domouser mongodb://<user>:<password>@<db_url>:<port>/<dbName>?authSource=admin&ssl=true&ssl_certfile=/etc/ssl/mongodb.pem and get the output "Enter password: " and when I enter it it says command not found
[13:03:06] <Derick> jayjo: you did fill in the <user> bits with your own, right?
[13:03:23] <jayjo> yes I did - so I guess not *exact*
[13:05:36] <Derick> jayjo: I don't have it installed
[13:17:08] <jayjo> Ok I will pivot away from the bi connector for a little bit until I can get a hold of someone at mongo. I have a quick question about the pipeline aggregation... the "_id" field is required in the $group. What is its purpose?
[13:19:00] <jayjo> not yet - I wanted to be sure it wasn't found elsewhere first
[13:19:27] <Derick> jayjo: the _id field is the value you are grouping on. It's the name of the "bucket" you're collecting results in.
[13:31:55] <jayjo> so it is kind of the BY in GROUP BY. I'm trying to group this on "_t", it looks like "_id" is telling it _how_ to group it, but there's no reference to any of the fields.
[13:33:44] <Derick> but your input data's fields doesn't link into the aggregation
[13:58:18] <jayjo> Derick: sorry I lost my connection - the field I'm trying to group on is "_t", but I want to group each day, and it is an epoch timestamp
[14:25:19] <jayjo> Trying to convert the field to an ISODate, and modified some code that kurushiyama provided as a template. Here is this bpaste: https://bpaste.net/show/72a15d3a8fae But using the mongo shell and specifying the js file doesn't run anything and provides no output (from the console.log() statement)
[14:25:36] <jayjo> I thought using the shell would pass the db variable automatically, is that correct?
[14:26:13] <Derick> jayjo: they are not numbers, they were strings (in your original paste)
[14:26:38] <kurushiyama> jayjo well, I would not trust that. nothing easier than adding a "use <dbname>"
[14:27:55] <Derick> jayjo: as for your db issue: https://docs.mongodb.com/v3.2/tutorial/write-scripts-for-the-mongo-shell/#differences-between-interactive-and-scripted-mongo
[14:28:18] <Derick> kurushiyama: use "name" doesn't work in scripts
[14:28:35] <kurushiyama> @Derick Uhm, I usually c&p those oneshots
[14:28:54] <Derick> kurushiyama: copy and paste, yues
[14:29:06] <Derick> but not when you give the script as argument to the command line
[14:29:31] <kurushiyama> @Derick Aye. Did not really read that part ;)
[14:44:22] <edrocks> kurushiyama: do you know if wired tiger is supposed to use lots of virtual memory?
[14:44:58] <cheeser> the preference is to keep as much in memory as possible
[14:45:23] <edrocks> like using 250GB when I only have around 100GB in data+indexes?
[14:45:28] <kurushiyama> iirc, up to 85% of physical, and as much virtual as possible.
[14:45:33] <kurushiyama> edrocks Depends on your indices
[14:46:05] <edrocks> kurushiyama: at least I'm getting some use out of my ram :)
[14:46:29] <kurushiyama> edrocks A text index over all fields can become quite fast. And yes, that is the idea – there is no good reason to have unused RAM.
[16:25:07] <jayjo> so I've found an error here - quite unfortunate. ISODate(doc["_t"]*1000) is giving February 25, 1389 6:00 PM. for example. Using new Date(doc["_t"]) gives 'Tue Jul 12 2016 11:11:48 GMT-0500 (CDT)'
[16:27:05] <jayjo> should I not use ISODate() and just use the javascript Date()
[18:40:14] <jfhbrook> so, uhh, funny question: I need to test what happens with my app when mongo starts rejecting reads/writes, like what would happen during a reelection process. Is there a good way to duplicate this on my local without too much heartache (ie, not creating a cluster)?
[20:40:57] <rangergord> I have a question about the AGPL license. I'm selling an embedded device that internally runs MongoDB for storage (the whole thing runs Ubuntu). Is this allowed under the AGPL, without requiring me to open-source my application code?
[20:42:29] <rangergord> a copyright notice would explain the MongoDB license (and other FOSS tools), and include an offer to distribute source code. This is enough for normal GPL, but I don't know about AGPL.
[20:42:40] <cheeser> 1. you really should have a lawyer if you're selling things. 2. you can *use* mongodb however you'd. however, if you're modifying it or extending it in any way, that'd potentially be a licensing issue.
[20:43:25] <rangergord> cheeser: no mongo modification whatsoever. But the one difference compared to most scenarios, is that instead of the *user* installing Mongo, I did it ahead of time, and it's part of the OS image of the device
[20:43:51] <rangergord> device that I then sell to them (while clearly stating FOSS usage and providing source code for that)
[20:43:52] <cheeser> ianal, but that should be fine. honestly, hire legal counsel.
[20:44:10] <cheeser> a few hundred dollars and you should have the answers you need.
[20:45:32] <rangergord> is there a particular FOSS-savvy lawyer you recommend I contact? since it's a general question, not specific to any jurisdiction