Skip to content
This repository has been archived by the owner on Feb 7, 2021. It is now read-only.

whitespace in probe string #173

Closed
marme660 opened this issue Sep 7, 2016 · 1 comment
Closed

whitespace in probe string #173

marme660 opened this issue Sep 7, 2016 · 1 comment
Labels

Comments

@marme660
Copy link

marme660 commented Sep 7, 2016

This is more like a question:
@aondio I query /backendjson in agent and I am curious what the space in is "probe": " Healthy (no probe)"

{
 "backends" : [
        {
            "name": "default(127.0.0.1,,80)",
            "ref": "1",
            "admin": "probe",
            "probe": "     Healthy (no probe)"
        }
]
}

edit from @Dridi: turned the json snippet into a block of code for better rendering.

@marme660 marme660 changed the title white space in probe string whitespace in probe string Sep 7, 2016
@aondio
Copy link
Contributor

aondio commented Sep 14, 2016

Hi,
the extra whitespaces are due to the way the json output is generated.

From varnishstat we get a string that looks like this:
"default(127.0.0.1,,80) 1 probe Healthy (no probe)"
to generate a json output we chunk the string into 4 parts and we take the last one as it is including spaces.

If you want further info on this, please pop in my office and I'll give the proper explanation. (pointers and strings are involved)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants