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

check for unexpected values due to changed json output #35

Merged
merged 1 commit into from
Nov 23, 2021

Conversation

dloucasfx
Copy link

serverStatus is returning this output

        "opcounters" : {
                "insert" : NumberLong(1105),
                "query" : NumberLong(212776),
                "update" : NumberLong(228522),
                "delete" : NumberLong(105),
                "getmore" : NumberLong(14),
                "command" : NumberLong(11096372),
                "deprecated" : {
                        "total" : NumberLong(22),
                        "insert" : NumberLong(0),
                        "query" : NumberLong(22),
                        "update" : NumberLong(0),
                        "delete" : NumberLong(0),
                        "getmore" : NumberLong(0),
                        "killcursors" : NumberLong(0)
                }
        }

which is resulting of this error

python/python.go:164        Could not handle message from Python        {"kind": "receiver", "name": "smartagent/mongodb", "error": "parse error: expected number near offset 29 of 'values'"

The changes skips the known bad element deprecated and further checks to make sure we don't submit a list or dict

Signed-off-by: Dani Louca dlouca@splunk.com

Signed-off-by: Dani Louca <dlouca@splunk.com>
Copy link

@keitwb keitwb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@dloucasfx dloucasfx merged commit f364a54 into master Nov 23, 2021
@dloucasfx dloucasfx deleted the SWAT-3991 branch November 23, 2021 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants