Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mloginfo --clients misses driver connections with embedded quotes in platform metadata #803

Closed
niccottrell opened this issue Jun 15, 2020 · 1 comment
Assignees
Milestone

Comments

@niccottrell
Copy link

Looks like the --clients regex is not matching the mongoc driver

Expected behavior

Log includes this and mongoc shows up in the clients list with IP 1.2.3.4

2020-06-15T18:31:17.615+0000 I NETWORK  [conn60] received client metadata from 1.2.3.4:44280 conn60: { driver: { name: "mongoc / ext-mongodb:PHP", version: "1.13.0 / 1.5.3" }, os: { type: "Linux", name: "Alpine Linux", version: "3.10.4", architecture: "x86_64" }, platform: "cfg=0x521620c9 posix=200809 stdc=201710 CC=GCC 8.3.0 CFLAGS="-g -O2" LDFLAGS="" / PHP 7.2.29" }

--
 

Actual/current behavior

That connection and driver is not listed

Steps to reproduce the actual/current behavior

run mloginfo --clients file.log containing that entry

Environment

Software Version
mtools 1.6.2
Python 3.7.6
MongoDB server 3.6.18
@stennie stennie changed the title --clients missing C driver connection --clients misses PHP driver connection Jun 15, 2020
@stennie stennie added bug and removed question labels Jun 15, 2020
@stennie
Copy link
Collaborator

stennie commented Jun 15, 2020

Sample log line is from the PHP driver.

The platform field includes quoted strings which causes JSON parsing of metadata to fail:

"platform" : "cfg=0x521620c9 posix=200809 stdc=201710 CC=GCC 8.3.0 CFLAGS="-g -O2" LDFLAGS="" / PHP 7.2.29"

@stennie stennie self-assigned this Jun 15, 2020
@stennie stennie added this to the 1.6.4 milestone Jun 15, 2020
@stennie stennie changed the title --clients misses PHP driver connection mloginfo --clients misses PHP driver connection Jun 15, 2020
@stennie stennie changed the title mloginfo --clients misses PHP driver connection mloginfo --clients misses driver connections with embedded quotes in platform metadata Jun 15, 2020
stennie added a commit to stennie/mtools that referenced this issue Jun 15, 2020
with embedded quotes in platform metadata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants