bbonnin / zeppelin-mongodb-interpreter

MongoDB interpreter for Apache Zeppelin
Apache License 2.0
47 stars 22 forks source link

Ignore mongo shell stdout/stderr #27

Open bjg2 opened 5 years ago

bjg2 commented 5 years ago

Can I somehow ignore mongo shell output? This is the output of the run, and I only want to see the chart, I don't want to see connection debug messages...

image

bbonnin commented 5 years ago

Hi, The mongo shell is started with --quiet option to avoid this kind of messages. Can you provide the script and the version of mongo ? Thanks !

bjg2 commented 5 years ago

Yes I noticed the quiet option is on, but mongo is ignoring it for the logs connecting to the replica set (the same thing happens in the shell as well). Mongo version is 3.6 by the way. This makes reports very ugly, it would be nice if these could be just ignored somehow, even manually....

PS. Connecting to the replica set through the interpreter is very hard as well (I guess it was not built to do so). I had to go around the params to make it connect to the replica set and not just single instance (take a look at the mongo.server.database param)...

json
{
    "mongo.shell.path": {
        "name": "mongo.shell.path",
        "value": "mongo",
        "type": "string"
    },
    "mongo.server.port": {
        "name": "mongo.server.port",
        "value": "27017",
        "type": "string"
    },
    "mongo.shell.command.table.limit": {
        "name": "mongo.shell.command.table.limit",
        "value": "1000000",
        "type": "string"
    },
    "mongo.server.username": {
        "name": "mongo.server.username",
        "value": "",
        "type": "string"
    },
    "mongo.server.authentdatabase": {
        "name": "mongo.server.authentdatabase",
        "value": "",
        "type": "string"
    },
    "mongo.server.host": {
        "name": "mongo.server.host",
        "value": "mongodb://logdb-mongodb-replicaset",
        "type": "string"
    },
    "mongo.shell.command.timeout": {
        "name": "mongo.shell.command.timeout",
        "value": "60000",
        "type": "string"
    },
    "mongo.server.database": {
        "name": "mongo.server.database",
        "value": "logs?replicaSet=rs0",
        "type": "string"
    },
    "mongo.server.password": {
        "name": "mongo.server.password",
        "value": "",
        "type": "string"
    }
}

PPS. Thanks for making this interpreter! It made our reports possible. :)