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

Metricbeat cannot read beat expose metric via npipe #15938

Closed
ph opened this issue Jan 29, 2020 · 5 comments · Fixed by #15997
Closed

Metricbeat cannot read beat expose metric via npipe #15938

ph opened this issue Jan 29, 2020 · 5 comments · Fixed by #15997
Assignees

Comments

@ph
Copy link
Contributor

ph commented Jan 29, 2020

When doing the QA for the 7.6 releases we discovered an issue with the Metricbeat beat module. When the monitoring information of beat was exposed via windows named pipe. Metricbeat refused to connect and collect metrics.

Please include configurations and logs if available.

For confirmed bugs, please report:

  • Version: 7.6
  • Operating System: Windows

cc @fearful-symmetry

@fearful-symmetry
Copy link
Contributor

So we're not calling this a blocker? Do we have a workaround?

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest (Project:fleet)

@ph
Copy link
Contributor Author

ph commented Jan 29, 2020

I've marked it as a blocker, starting to work on it. I don't expect the fix to be too long. I am trying to get a workaround with that.

@ph
Copy link
Contributor Author

ph commented Jan 29, 2020

Note, that It might not be considered a blocker, because collecting data via HTTP TCP socket still work.

@ph
Copy link
Contributor Author

ph commented Jan 29, 2020

@andresrc @urso Just you keep you in the loop.

@ph ph self-assigned this Jan 29, 2020
ph added a commit to ph/beats that referenced this issue Jan 31, 2020
This is not a fix for elastic#15832 this will be tackle in another PR.
When http+npipe:// scheme were initially parsed by the url parser of
metric the generated PATH wasn't correctly setup up. So I've fixed the
parsing and the tests.

Now to test the behavior on Windows you will need a beat that expose metrics over
npipes, you can do so with a configuration like this.

```yaml
metricbeat.modules:
  - module: system

output.console: ~

http.enabled: true
http.host: \\.\pipe\custom
```yaml

After you can start a Metricbeat instance with the beat modules to
collect the metric information.

```yaml
metricbeat.modules:
- module: beat
  hosts: http+npipe://./pipe/custom
  metricsets:
  - stats
  - state
output.console: ~
```

If you start metricbeat with the `-e -d "*"` flags this will output any
metrics fetched from the running beat instance.

Fixes: elastic#15938
@ph ph closed this as completed in #15997 Feb 4, 2020
ph added a commit that referenced this issue Feb 4, 2020
This is not a fix for #15832 this will be tackle in another PR.
When http+npipe:// scheme were initially parsed by the url parser of
metric the generated PATH wasn't correctly setup up. So I've fixed the
parsing and the tests.

Now to test the behavior on Windows you will need a beat that expose metrics over
npipes, you can do so with a configuration like this.

```yaml
metricbeat.modules:
  - module: system

output.console: ~

http.enabled: true
http.host: \\.\pipe\custom
```yaml

After you can start a Metricbeat instance with the beat modules to
collect the metric information.

```yaml
metricbeat.modules:
- module: beat
  hosts: http+npipe://./pipe/custom
  metricsets:
  - stats
  - state
output.console: ~
```

If you start metricbeat with the `-e -d "*"` flags this will output any
metrics fetched from the running beat instance.

Fixes: #15938
ph added a commit to ph/beats that referenced this issue Feb 4, 2020
This is not a fix for elastic#15832 this will be tackle in another PR.
When http+npipe:// scheme were initially parsed by the url parser of
metric the generated PATH wasn't correctly setup up. So I've fixed the
parsing and the tests.

Now to test the behavior on Windows you will need a beat that expose metrics over
npipes, you can do so with a configuration like this.

```yaml
metricbeat.modules:
  - module: system

output.console: ~

http.enabled: true
http.host: \\.\pipe\custom
```yaml

After you can start a Metricbeat instance with the beat modules to
collect the metric information.

```yaml
metricbeat.modules:
- module: beat
  hosts: http+npipe://./pipe/custom
  metricsets:
  - stats
  - state
output.console: ~
```

If you start metricbeat with the `-e -d "*"` flags this will output any
metrics fetched from the running beat instance.

Fixes: elastic#15938
(cherry picked from commit 75ddc22)
ph added a commit to ph/beats that referenced this issue Feb 4, 2020
This is not a fix for elastic#15832 this will be tackle in another PR.
When http+npipe:// scheme were initially parsed by the url parser of
metric the generated PATH wasn't correctly setup up. So I've fixed the
parsing and the tests.

Now to test the behavior on Windows you will need a beat that expose metrics over
npipes, you can do so with a configuration like this.

```yaml
metricbeat.modules:
  - module: system

output.console: ~

http.enabled: true
http.host: \\.\pipe\custom
```yaml

After you can start a Metricbeat instance with the beat modules to
collect the metric information.

```yaml
metricbeat.modules:
- module: beat
  hosts: http+npipe://./pipe/custom
  metricsets:
  - stats
  - state
output.console: ~
```

If you start metricbeat with the `-e -d "*"` flags this will output any
metrics fetched from the running beat instance.

Fixes: elastic#15938
(cherry picked from commit 75ddc22)
ph added a commit that referenced this issue Feb 4, 2020
This is not a fix for #15832 this will be tackle in another PR.
When http+npipe:// scheme were initially parsed by the url parser of
metric the generated PATH wasn't correctly setup up. So I've fixed the
parsing and the tests.

Now to test the behavior on Windows you will need a beat that expose metrics over
npipes, you can do so with a configuration like this.

```yaml
metricbeat.modules:
  - module: system

output.console: ~

http.enabled: true
http.host: \\.\pipe\custom
```yaml

After you can start a Metricbeat instance with the beat modules to
collect the metric information.

```yaml
metricbeat.modules:
- module: beat
  hosts: http+npipe://./pipe/custom
  metricsets:
  - stats
  - state
output.console: ~
```

If you start metricbeat with the `-e -d "*"` flags this will output any
metrics fetched from the running beat instance.

Fixes: #15938
(cherry picked from commit 75ddc22)
ph added a commit that referenced this issue Feb 4, 2020
This is not a fix for #15832 this will be tackle in another PR.
When http+npipe:// scheme were initially parsed by the url parser of
metric the generated PATH wasn't correctly setup up. So I've fixed the
parsing and the tests.

Now to test the behavior on Windows you will need a beat that expose metrics over
npipes, you can do so with a configuration like this.

```yaml
metricbeat.modules:
  - module: system

output.console: ~

http.enabled: true
http.host: \\.\pipe\custom
```yaml

After you can start a Metricbeat instance with the beat modules to
collect the metric information.

```yaml
metricbeat.modules:
- module: beat
  hosts: http+npipe://./pipe/custom
  metricsets:
  - stats
  - state
output.console: ~
```

If you start metricbeat with the `-e -d "*"` flags this will output any
metrics fetched from the running beat instance.

Fixes: #15938
(cherry picked from commit 75ddc22)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants