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

IBM MQ Filebeat module #8782

Merged
merged 43 commits into from
Jul 29, 2019
Merged

IBM MQ Filebeat module #8782

merged 43 commits into from
Jul 29, 2019

Conversation

felix-lessoer
Copy link
Contributor

This module is able to read errorlogs from IBM MQ.

@ruflin supporting this.

@ruflin
Copy link
Contributor

ruflin commented Oct 29, 2018

Still need to have a closer look. Two things so far:

  • Could you add an entry to the changelog?
  • Could you add some example logs to the tests directory?

@ruflin ruflin removed Team:Integrations Label for the Integrations team labels Nov 27, 2018
@ruflin ruflin added the Team:Integrations Label for the Integrations team label May 10, 2019
@felix-lessoer felix-lessoer requested a review from a team as a code owner May 21, 2019 19:46
filebeat/docs/modules/ibmmq.asciidoc Outdated Show resolved Hide resolved
type: group
fields:
- name: process
description: Please add description
Copy link
Contributor

Choose a reason for hiding this comment

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

@felix-lessoer Help on describing these fields from your side would be super helpful as you know more about these then I do.

x-pack/filebeat/module/ibmmq/errorlog/_meta/fields.yml Outdated Show resolved Hide resolved
x-pack/filebeat/module/ibmmq/errorlog/_meta/fields.yml Outdated Show resolved Hide resolved
x-pack/filebeat/module/ibmmq/errorlog/_meta/fields.yml Outdated Show resolved Hide resolved
x-pack/filebeat/module/ibmmq/errorlog/_meta/fields.yml Outdated Show resolved Hide resolved
@webmat
Copy link
Contributor

webmat commented May 22, 2019

@ruflin Thanks for pinging me on this!

Don't wait for me for a review of the PR. But I'll definitely be coming back to this module, to see patterns for doing structured logging

Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

@exekias @felix-lessoer I pushed quite a few changes to the module around the fields and some docs cleanup. I left some comments where I still need more details on the fields to have a proper description and for the arithinsert* and commentinsert* we need to decide on how to handle it.

@@ -162,8 +162,8 @@ def run_on_file(self, module, fileset, test_file, cfgfile):
assert obj["event"]["module"] == module, "expected event.module={} but got {}".format(
module, obj["event"]["module"])

assert "error" not in obj, "not error expected but got: {}".format(
obj)
#assert "error" not in obj, "not error expected but got: {}".format(
Copy link
Contributor

Choose a reason for hiding this comment

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

This is currently commented out to allow for error.id. But not sure we should store it into this value, it depends a bit on what we want to use it for long term in the context of ECS. @webmat

[float]
=== Compatibility

TODO: document with what versions of the software is this tested
Copy link
Contributor

Choose a reason for hiding this comment

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

@felix-lessoer Can you provide these details here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tested in v 9.1.0.0 .. But the logs are the same in older versions

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can just write that, it's good to explain what versions have we tested against, even if it's expected to work with others

@@ -0,0 +1,814 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

This dashboard will probably need an update as soon as we finished the field renaming.

type: group
fields:
- name: installation
description: Please add description
Copy link
Contributor

Choose a reason for hiding this comment

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

@felix-lessoer I need some details here on the description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the installation name which can be given at installation time. Default: Installation 1

From IBM documentation

Each installation of IBM® MQ on UNIX, Linux, and Windows, has a unique identifier known as an installation name. The installation name is used to associate things such as queue managers and configuration files with an installation.

Copy link
Contributor

Choose a reason for hiding this comment

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

updated. I wonder if we should in some cases even provide links to the docs.

"remove": {
"field": [
"log_timestamp",
"message"
Copy link
Contributor

Choose a reason for hiding this comment

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

Note for myself: Should we really fully remove message or keep at least something inside?

@ruflin
Copy link
Contributor

ruflin commented Jun 13, 2019

@felix-lessoer I have a more high level question: We call this fileset errorlog. Are there also other logs from ibmmq that we should add in the future? Or is this the only log and should just be ibmmq.log?

@felix-lessoer
Copy link
Contributor Author

felix-lessoer commented Jun 19, 2019

Thats fine. Lets call it log for now

@felix-lessoer
Copy link
Contributor Author

felix-lessoer commented Jul 19, 2019

I updated the pipeline to handle error when fields are missing. I also added the @timestamp and message field to be able to use the default configuration of the Logs UI .
I also updated to sample Dashboard to fit to ECS . The Dashboard Import JSON looks the same as the others. But when I run filebeat setup I run into an error. No sure why.
@exekias Can you check on this??

@exekias
Copy link
Contributor

exekias commented Jul 24, 2019

Checked the dashboard and it's now loading properly, we need to add filters to make sure that showed metrics and saved search only apply to data coming out of this module (event.dataset: ibmmq.errorlog).

@exekias
Copy link
Contributor

exekias commented Jul 25, 2019

I've updated expected files, let's wait for CI 🤞

@exekias
Copy link
Contributor

exekias commented Jul 25, 2019

Tests are failing, it seems arithinsert1 doesn't get removed for the sample log AMQERR01.log. @felix-lessoer I guess the pipeline is failing for that one?

@exekias
Copy link
Contributor

exekias commented Jul 26, 2019

failing tests are unrelated

@exekias exekias merged commit 68519cb into elastic:master Jul 29, 2019
@ruflin
Copy link
Contributor

ruflin commented Jul 29, 2019

🎉 Thanks @felix-lessoer and @exekias for pushing this through!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Filebeat Filebeat module review Team:Integrations Label for the Integrations team v7.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants