Giter VIP home page Giter VIP logo

mongotail's People

Contributors

alextitanium avatar chrismckee avatar davidcaste avatar fgribreau avatar mrsarm avatar shaneharvey avatar sharma-abhishek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mongotail's Issues

Doesn't show sort properties

This is a great tool. Unfortunately I'm trying to inspect my sort criteria, but it's not being displayed alongside the query.

Could I request to display the sort criteria too?

Thanks for this!

Add support for tailing oplog

It would be great to add support for tailing the oplog as an alternative to using system profile data.

For a deployment with the oplog enabled (i.e. a replica set, although this can be enabled on a standalone node):

  • there's no extra write overhead to view all insert/update/remove operations (as compared to system profiling level 2)
  • write operations can be tracked across multiple databases with a single tail command

CPU runaway using `-f` option

I get around 150% CPU running the docker image on Mac with level 2 logging. I think it worked better the other day so maybe something that comes after a while. Hard to debug for me… Will try to use the python version natively instead now…

No support of bytes/binary data coming from MongDB

Hello @mrsarm!

Looks like mongotail does not support bytes (i.e. binary data) coming from MongoDB. Please consider the following details regarding found bug:

Mongotail

screenshot_2017-11-28_00-47-23

(venv) resurtm@resurtm-desktop:~/dev/mongotail$ mongotail task_tracker -f
2017-11-27 18:34:41.777 COUNT     [users] : {"$or": [{"username": "resurtm"}, {"email": "[email protected]"}]}
Traceback (most recent call last):
  File "/home/resurtm/dev/mongotail/venv/lib/python3.5/site-packages/mongotail/out.py", line 60, in print_obj
    query += ', ' + json_encoder.encode(obj['updateobj'])
  File "/home/resurtm/dev/mongotail/venv/lib/python3.5/site-packages/mongotail/jsondec.py", line 57, in encode
    result = super(JSONEncoder, self).encode(o)
  File "/usr/lib/python3.5/json/encoder.py", line 198, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.5/json/encoder.py", line 256, in iterencode
    return _iterencode(o, 0)
  File "/home/resurtm/dev/mongotail/venv/lib/python3.5/site-packages/mongotail/jsondec.py", line 54, in default
    return json.JSONEncoder.default(self, o)
  File "/usr/lib/python3.5/json/encoder.py", line 179, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: b'$2b$12$d3Kr8DL2nvhCyzvbgUTbROhCS.RqUO0R/wmw7DdXbhvOgqk5Ql2vC' is not JSON serializable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/resurtm/dev/mongotail/venv/bin/mongotail", line 11, in <module>
    sys.exit(main())
  File "/home/resurtm/dev/mongotail/venv/lib/python3.5/site-packages/mongotail/mongotail.py", line 237, in main
    tail(client, db, args.n, args.follow, args.verbose, args.metadata)
  File "/home/resurtm/dev/mongotail/venv/lib/python3.5/site-packages/mongotail/mongotail.py", line 83, in tail
    print_obj(result, verbose, metadata, server_version)
  File "/home/resurtm/dev/mongotail/venv/lib/python3.5/site-packages/mongotail/out.py", line 168, in print_obj
    warn('Unknown registry\nDump: %s' % json_encoder.encode(obj))
  File "/home/resurtm/dev/mongotail/venv/lib/python3.5/site-packages/mongotail/jsondec.py", line 57, in encode
    result = super(JSONEncoder, self).encode(o)
  File "/usr/lib/python3.5/json/encoder.py", line 198, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.5/json/encoder.py", line 256, in iterencode
    return _iterencode(o, 0)
  File "/home/resurtm/dev/mongotail/venv/lib/python3.5/site-packages/mongotail/jsondec.py", line 54, in default
    return json.JSONEncoder.default(self, o)
  File "/usr/lib/python3.5/json/encoder.py", line 179, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: b'$2b$12$d3Kr8DL2nvhCyzvbgUTbROhCS.RqUO0R/wmw7DdXbhvOgqk5Ql2vC' is not JSON serializable
(venv) resurtm@resurtm-desktop:~/dev/mongotail$ 

MongoDB

Data in MongoDB:

image

image

{
    "_id" : ObjectId("5a1bf2658a23bfeed32e7dde"),
    "first_name" : "Timur",
    "username" : "resurtm",
    "email" : "[email protected]",
    "password" : { "$binary" : "JDJiJDEyJGZnZ0QzdkRoVVRlRVhvMmdqQUNIeE9scEhSZHk5bGpXL01IOFRXUVhCdjN0RWs4QzlJaFRL", "$type" : "00" },
    "last_name" : "Ruziev"
}

Let me know if you need more details or I'm missing something.

Thank you for such a nice project as mongotail! πŸ‘

Cheers,
@resurtm

TypeError: UUID('3ef7273b-cc4d-4b11-9237-d766c18db028') is not JSON serializable

We use mongo with the c# driver and store the UUID's in .net format GUID.
I installed mongotail on ubuntu 14 LTS and ran the command to set the profile level with no issues. Starting mongo tail instantly blew up with this error though.

Traceback (most recent call last):
  File "/usr/local/bin/mongotail", line 9, in <module>
    load_entry_point('mongotail==1.0.1', 'console_scripts', 'mongotail')()
  File "/usr/local/lib/python2.7/dist-packages/mongotail/mongotail.py", line 159, in main
    tail(client, db, args.n, args.follow)
  File "/usr/local/lib/python2.7/dist-packages/mongotail/mongotail.py", line 68, in tail
    print_obj(result)
  File "/usr/local/lib/python2.7/dist-packages/mongotail/out.py", line 42, in print_obj
    query = json_encoder.encode(obj['query'])
  File "/usr/local/lib/python2.7/dist-packages/mongotail/jsondec.py", line 45, in encode
    result = super(JSONEncoder, self).encode(o)
  File "/usr/lib/python2.7/json/encoder.py", line 207, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python2.7/json/encoder.py", line 270, in iterencode
    return _iterencode(o, 0)
  File "/usr/local/lib/python2.7/dist-packages/mongotail/jsondec.py", line 42, in default
    return json.JSONEncoder.default(self, o)
  File "/usr/lib/python2.7/json/encoder.py", line 184, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: UUID('3ef7273b-cc4d-4b11-9237-d766c18db028') is not JSON serializable

The encoder doesn't seem to like UUIDs 😒

`Mongotail EXCEPTION - Unknown command operation` when list collection indexes

Listing indexes from a collection with this: db.foo.getIndexKeys(), Mongotail gets this:

Mongotail EXCEPTION - Unknown command operation
Dump: {"ns": "test.foo", "command": {"listIndexes": "foo"}, "ts": ISODate("2016-09-29T12:39:39.280Z"), "op": "command"}
Mongotail EXCEPTION - Unknown registry
Dump: {"ns": "test.foo", "command": {"listIndexes": "foo"}, "ts": ISODate("2016-09-29T12:39:39.280Z"), "op": "command"}

Crash for queries containing `MaxKey` / `MinKey`

  • when running the tool (watch mode), a query having a MaxKey looks problematic
  • I'm using the bin from the docker image
db.users.find({value: new MaxKey()})

This will break the

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/mongotail/out.py", line 57, in print_obj
    query = json_encoder.encode(cmd['filter']) if 'filter' in cmd else "{}"
  File "/usr/local/lib/python3.8/site-packages/mongotail/jsondec.py", line 63, in encode
    result = super(JSONEncoder, self).encode(o)
  File "/usr/local/lib/python3.8/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/local/lib/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/local/lib/python3.8/site-packages/mongotail/jsondec.py", line 60, in default
    return json.JSONEncoder.default(self, o)
  File "/usr/local/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type MaxKey is not JSON serializable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/mongotail", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/mongotail/mongotail.py", line 239, in main
    tail(client, db, args.n, args.follow, args.verbose, args.metadata)
  File "/usr/local/lib/python3.8/site-packages/mongotail/mongotail.py", line 83, in tail
    print_obj(result, verbose, metadata, server_version)
  File "/usr/local/lib/python3.8/site-packages/mongotail/out.py", line 200, in print_obj
    warn('Unknown registry\nDump: %s' % json_encoder.encode(obj))
  File "/usr/local/lib/python3.8/site-packages/mongotail/jsondec.py", line 63, in encode
    result = super(JSONEncoder, self).encode(o)
  File "/usr/local/lib/python3.8/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/local/lib/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/local/lib/python3.8/site-packages/mongotail/jsondec.py", line 60, in default
    return json.JSONEncoder.default(self, o)
  File "/usr/local/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type MaxKey is not JSON serializable

Note I did not tried with all 20+ Mongodb types https://docs.mongodb.com/manual/reference/operator/query/type/

mongotail 3.0.0 not compatible with res-address 2.0.0

image

res-address 2.0.0:
def get_res_address(address): """ <REDACTED> :return: a tuple with ``(scheme, host, port, resource, query, username, password)``. <REDACTED> """

mongotail 3.0.0:

def connect(address, args):
    ...
    try:
        host,  port, dbname = get_res_address(address)

it appears issue started in commit 1ef2c825984050ad5d296d9be55831f312fb625f of the res-address project, in which get_res_address began returning more than 3 values

Cannot get queries to log; only DROP and INSERT show in the log

Is there special configuration required to get queries to log? I don't ever see any QUERY entries in the log, which is what I'm most interested in looking at. I can only see inserts and drops (the setup of my test case, but not my test case).

$ mongotail myserver/mydb -l 2
Profiling level set to level 2

$ mongotail myserver/mydb -f
2021-01-06 23:53:08.418 DROP      [mycoll] :
2021-01-06 23:53:08.559 INSERT    [mycoll] : 1 inserted.
2021-01-06 23:53:08.624 INSERT    [mycoll] : 1 inserted.

I'm using a Mongo 4.4.2 standalone server on Linux.

MongoDB Timestamp type is not supported

If a log entry is written where a MongoDB timestamp is included, the logger fails with an exception:

Traceback (most recent call last):
  File "/usr/local/bin/mongotail", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/mongotail/mongotail.py", line 238, in main
    tail(client, db, args.n, args.follow, args.verbose, args.metadata)
  File "/usr/local/lib/python2.7/site-packages/mongotail/mongotail.py", line 83, in tail
    print_obj(result, verbose, metadata, server_version)
  File "/usr/local/lib/python2.7/site-packages/mongotail/out.py", line 196, in print_obj
    warn('Unknown registry\nDump: %s' % json_encoder.encode(obj))
  File "/usr/local/lib/python2.7/site-packages/mongotail/jsondec.py", line 60, in encode
    result = super(JSONEncoder, self).encode(o)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 207, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 270, in iterencode
    return _iterencode(o, 0)
  File "/usr/local/lib/python2.7/site-packages/mongotail/jsondec.py", line 57, in default
    return json.JSONEncoder.default(self, o)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 184, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: Timestamp(1548943026, 1) is not JSON serializable

I'm using:

mongotail --version
mongotail 2.2.0 <https://github.com/mrsarm/mongotail> (python 2.7.15)

Command values cased as findAndModify or mapReduce cause errors

Discovered via the nodeJS mongo native driver issuing findOneAndDelete() commands where the 'command' was cased as findAndModify, instead of the findandmodify currently expected by the text matching in mongotail.

Additional testing showed that it is possible to generate a similar failure with Map-Reduce commands as Mongo similarly will honor casing of 'mapreduce' or 'mapReduce' as the command.


Repro example - findAndModify vs findandmodify:

Working Mongo client invocations:

> db.test.findOneAndDelete({"somefield": 1});

OR

> db.runCommand({"findandmodify": "test", "query": {"somefield":  1 }, "remove": true,"new": false,"upsert": false});

Failing Mongo client invocation (also as issued by JS driver):

> db.runCommand({"findAndModify": "test", "query": {"somefield":  1 }, "remove": true,"new": false,"upsert": false});

mongotail output:

Mongotail EXCEPTION - Unknown command operation
Dump: {"op": "command", "ns": "calypso.test", "command": {"findAndModify": "test", "query": {"somefield": 1.0}, "remove": true, "new": false, "upsert": false, "lsid": {"id": BinData(0,"ASV1ww3RQ3ebaPD8AlXihA==")}, "$db": "calypso"}, "ndeleted": 0, "ts": ISODate("2023-04-01T22:06:59.223Z")}
Mongotail EXCEPTION - Unknown registry
Dump: {"op": "command", "ns": "calypso.test", "command": {"findAndModify": "test", "query": {"somefield": 1.0}, "remove": true, "new": false, "upsert": false, "lsid": {"id": BinData(0,"ASV1ww3RQ3ebaPD8AlXihA==")}, "$db": "calypso"}, "ndeleted": 0, "ts": ISODate("2023-04-01T22:06:59.223Z")}


Repro example - mapReduce vs mapreduce:

Working Mongo client invocations:

> db.orders.mapReduce(    mapFunction1,    reduceFunction1,    { out: "map_reduce_example" } )

OR

> db.runCommand({"mapreduce": "orders", map: mapFunction1, reduce: reduceFunction1, out: "map_reduce_example"});

Failing Mongo client invocation

> db.runCommand({"mapReduce": "orders", map: mapFunction1, reduce: reduceFunction1, out: "map_reduce_example"});

mongotail output:

Mongotail EXCEPTION - Unknown registry
Dump: {"op": "command", "ns": "calypso.orders", "command": {"mapReduce": "orders", "map": "function() {\n   emit(this.cust_id, this.price);\n}", "reduce": "function(keyCustId, valuesPrices) {\n   return Array.sum(valuesPrices);\n}", "out": "map_reduce_example", "lsid": {"id": BinData(0,"CNpTo5aTR6eohBp38syUxg==")}, "$db": "calypso"}, "ts": ISODate("2023-04-02T00:54:21.137Z")}

`mongotail [db] --follow` exits after 1 second

I installed the tool and am running mongotail [db] --follow. I expect that the command will block until I kill it with ctrl+c. Instead, it exits after 1 second, without printing anything.

It would be good if it warned that you needed to run with --level=2, if --level=2 was the default mode, or otherwise displayed a warning or error, instead of exiting without displaying any messages.

Mongotail EXCEPTION - Unknown registry

MongoDB shell version v4.1.13
git version: 441714bc4c70699950f3ac51a5cac41dcd413eaa
OpenSSL version: OpenSSL 1.1.1  11 Sep 2018
allocator: tcmalloc
modules: none
build environment:
    distmod: ubuntu1804
    distarch: x86_64
    target_arch: x86_64

I carried out the order

docker run -it --rm fgribreau/mongotail ip:27017/db -uroot -p123456123 -f

When I execute query

Mongotail EXCEPTION - Unknown registry
Dump: {"op": "query", "ns": "merchant.platform", "command": {"limit": 1, "skip": 0, "find": "platform", "$db": "db", "filter": {"_id": ObjectId("5e884cde0c708488b0ddf486")}, "singleBatch": true, "batchSize": 1}, "nreturned": 1, "ts": ISODate("2020-04-06T12:11:19.450Z")}

help me

Mongotail EXCEPTION - Unknown registry

when i execute mongotail - f show this:

Mongotail EXCEPTION - Unknown registry
Dump: {"ns": "usersSantander.usersSantander", "command": {"filter": {"username": "uid1"}, "$db": "usersSantander", "lsid": {"id": UUID("f9b97a39-221c-45dc-9532-e3165186c53b")}, "find": "usersSantander"}, "ts": ISODate("2018-01-22T20:43:06.721Z"), "nreturned": 1, "op": "query"}
Mongotail EXCEPTION - Unknown registry
Dump: {"ns": "usersSantander.usersSantander", "command": {"filter": {"username": "uid2"}, "$db": "usersSantander", "lsid": {"id": UUID("f9b97a39-221c-45dc-9532-e3165186c53b")}, "find": "usersSantander"}, "ts": ISODate("2018-01-22T20:56:20.817Z"), "nreturned": 1, "op": "query"}
Mongotail EXCEPTION - Unknown registry
Dump: {"ns": "usersSantander.usersSantander", "command": {"filter": {"username": "uid3"}, "$db": "usersSantander", "lsid": {"id": UUID("f9b97a39-221c-45dc-9532-e3165186c53b")}, "find": "usersSantander"}, "ts": ISODate("2018-01-22T21:01:32.228Z"), "nreturned": 1, "op": "query"}
Mongotail EXCEPTION - Unknown registry
Dump: {"ns": "usersSantander.usersSantander", "command": {"filter": {"username": "uid4"}, "$db": "usersSantander", "lsid": {"id": UUID("f9b97a39-221c-45dc-9532-e3165186c53b")}, "find": "usersSantander"}, "ts": ISODate("2018-01-22T21:02:57.218Z"), "nreturned": 0, "op": "query"}

in centos 7

Error: 'utf8' codec can't decode byte 0x80 (binary field)

When i try to connect mongo tail, explode some erros:

PS: One field is a binary value

Traceback (most recent call last): File "/usr/local/bin/mongotail", line 11, in <module> load_entry_point('mongotail==2.2.0', 'console_scripts', 'mongotail')() File "/usr/local/lib/python2.7/site-packages/mongotail-2.2.0-py2.7.egg/mongotail/mongotail.py", line 238, in main tail(client, db, args.n, args.follow, args.verbose, args.metadata) File "/usr/local/lib/python2.7/site-packages/mongotail-2.2.0-py2.7.egg/mongotail/mongotail.py", line 83, in tail print_obj(result, verbose, metadata, server_version) File "/usr/local/lib/python2.7/site-packages/mongotail-2.2.0-py2.7.egg/mongotail/out.py", line 65, in print_obj query += ', ' + json_encoder.encode(obj['updateobj']) File "/usr/local/lib/python2.7/site-packages/mongotail-2.2.0-py2.7.egg/mongotail/jsondec.py", line 60, in encode result = super(JSONEncoder, self).encode(o) File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 207, in encode chunks = self.iterencode(o, _one_shot=True) File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 270, in iterencode return _iterencode(o, 0) UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 0: invalid start byte

Unknown command operation, unknown registry?

When I run Mongotail (which is very helpful, BTW!), sometimes I get lines like this:

Mongotail EXCEPTION - Unknown command operation
Dump: {"ns": "dbname.$cmd", "command": {"createIndexes": "collectionname", "indexes": [{"key": {"fieldname": 1}, "unique": true, "sparse": false, "background": false, "name": "fieldname_1"}]}, "ts": ISODate("2015-09-21T20:47:21.719Z"), "op": "command"}
Mongotail EXCEPTION - Unknown registry
Dump: {"ns": "dbname.$cmd", "command": {"createIndexes": "collectionname", "indexes": [{"key": {"fieldname": 1}, "unique": true, "sparse": false, "background": false, "name": "fieldname_1"}]}, "ts": ISODate("2015-09-21T20:47:21.719Z"), "op": "command"}

I think they're from my framework ensuring that the proper indexes exist in my Mongo database.

Looking at issue #5, I suspect this might be as simple as adding a new entry for operation "createIndexes" in out.py, but I haven't tried it yet.

Mongotail EXCEPTION with $out operator in aggregation operation

Executing a $lookup operation with the $out operator like this:

db.orders.aggregate([
  {
    $lookup: {
      from: "products",
      localField: "item",
      foreignField: "_id",
      as: "products"
    }
  },
  {  $out: "orders_report" }
]);

Mongotail gets this:

Mongotail EXCEPTION - Unknown command operation
Dump: {"ns": "orders.tmp.agg_out.12", "command": {"create": "tmp.agg_out.12", "temp": true}, "ts": ISODate("2016-09-28T14:25:45.733Z"), "op": "command"}
Mongotail EXCEPTION - Unknown registry
Dump: {"ns": "orders.tmp.agg_out.12", "command": {"create": "tmp.agg_out.12", "temp": true}, "ts": ISODate("2016-09-28T14:25:45.733Z"), "op": "command"}
Mongotail EXCEPTION - Unknown command operation
Dump: {"ns": "orders.orders_report", "command": {"cursor": {}, "listIndexes": "orders_report"}, "ts": ISODate("2016-09-28T14:25:45.733Z"), "op": "command"}
Mongotail EXCEPTION - Unknown registry
Dump: {"ns": "orders.orders_report", "command": {"cursor": {}, "listIndexes": "orders_report"}, "ts": ISODate("2016-09-28T14:25:45.733Z"), "op": "command"}
2016-09-28 14:25:45.734 QUERY     [products] : {"_id": {"$eq": ObjectId("57ebc2c6ef7c92105f8cb036")}}. 1 returned.
2016-09-28 14:25:45.734 QUERY     [products] : {"_id": {"$eq": ObjectId("57ebc2c6ef7c92105f8cb036")}}. 1 returned.
2016-09-28 14:25:45.734 QUERY     [products] : {"_id": {"$eq": ObjectId("57ebc2c7ef7c92105f8cb037")}}. 1 returned.
2016-09-28 14:25:45.734 QUERY     [products] : {"_id": {"$eq": ObjectId("57ebc2c7ef7c92105f8cb037")}}. 1 returned.
2016-09-28 14:25:45.735 QUERY     [products] : {"_id": {"$eq": ObjectId("57ebc2c7ef7c92105f8cb037")}}. 1 returned.
2016-09-28 14:25:45.735 QUERY     [products] : {"_id": {"$eq": ObjectId("57ebc2c7ef7c92105f8cb039")}}. 1 returned.
Mongotail EXCEPTION - Unknown registry
Dump: {"ns": "orders.tmp.agg_out.12", "ninserted": 6, "ts": ISODate("2016-09-28T14:25:45.735Z"), "op": "insert"}
Mongotail EXCEPTION - Unknown command operation
Dump: {"ns": "orders.tmp.agg_out.12", "command": {"to": "orders.orders_report", "dropTarget": true, "renameCollection": "orders.tmp.agg_out.12"}, "ts": ISODate("2016-09-28T14:25:45.739Z"), "op": "command"}
Mongotail EXCEPTION - Unknown registry
Dump: {"ns": "orders.tmp.agg_out.12", "command": {"to": "orders.orders_report", "dropTarget": true, "renameCollection": "orders.tmp.agg_out.12"}, "ts": ISODate("2016-09-28T14:25:45.739Z"), "op": "command"}
2016-09-28 14:25:45.739 AGGREGATE [orders] : [{"$lookup": {"foreignField": "_id", "as": "products", "from": "products", "localField": "item"}}, {"$out": "orders_report"}]

Add support for authentication against another database

Mongotail by default authenticates against the database specified in the db address. But MongoDB allows too to authenticate against a different database, e.g. via the --authenticationDatabase option in
the mongo shell client.

It would be great that mongotail allowed to authenticate against a different database than the specified in the db address.

Error when explore the database collections in MongoChef

The error happens when you expand at first time the collections of a database with MongoChef. Tested with Mongotail 2.0.0, MongoChef 3.5.1, and MongoDB versions 2.6 and 3.2.

$ mongotail test -f
Mongotail EXCEPTION - Unknown command operation
Dump: {"ns": "test.$cmd", "command": {"scale": 1, "dbStats": 1}, "ts": ISODate("2016-08-10T10:39:57.572Z"), "op": "command"}

Connection to mongodb atlas not possible

Hi,

I'd love to use the tool, but I can't connect to the mongodb atlas instance:

docker run -it --rm mrsarm/mongotail 'mongodb+srv://somename-pl-0.foo.mongodb.net/bar-service' -u mytmpuser -b admin
Error parsing command line: Invalid address "mongodb+srv://somename-pl-0.foo.mongodb.net/bar-service"
try 'mongotail --help' for more information

How can I fix the connection or get a proper error message?
This also happens with pip installed version on Mac.

BR
Alex

mongotail just closes

Hello,
I installed mongotail and run it like:

mongotail myDbName

but nothing happens, the program just closes after less than a second. It's a local db, it has no password or anything. I don't know if mongotail logs anything, I did a quick search and found no logs.

Unknown operation "killcursors"

2015-07-26 11:06:07.347 QUERY     [person] : {"type": {"$in": [2]}, "short_id": "3000000"}
2015-07-26 11:06:07.347 QUERY     [tag] : {}
2015-07-26 11:06:07.349 QUERY     [category] : {}
2015-07-26 11:06:07.351 QUERY     [size_chart] : {"deviser_id": "3000000", "type": 1}
2015-07-26 11:06:07.366 QUERY     [category] : {"$orderby": {"name.en-US": 1}, "$query": {"path": "/"}}
2015-07-26 11:06:08.799 QUERY     [size_chart] : {"type": 0, "categories": {"$in": ["fb3d0"]}}
2015-07-26 11:26:50.240 QUERY     [category] : {}
Mongotail EXCEPTION - Unknown operation "killcursors"
Dump: {"ns": "", "ts": ISODate("2015-07-26T11:26:50.240Z"), "op": "killcursors"}
Traceback (most recent call last):
  File "/usr/local/bin/mongotail", line 9, in <module>
    load_entry_point('mongotail==0.3.2', 'console_scripts', 'mongotail')()
  File "/usr/local/lib/python2.7/dist-packages/mongotail/mongotail.py", line 156, in main
    tail(client, db, args.n, args.follow)
  File "/usr/local/lib/python2.7/dist-packages/mongotail/mongotail.py", line 68, in tail
    print_obj(result)
  File "/usr/local/lib/python2.7/dist-packages/mongotail/out.py", line 129, in print_obj
    operation.upper().ljust(9), doc, query))
UnboundLocalError: local variable 'query' referenced before assignment

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.