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] Migrate php_fpm to ECS #10366

Merged
merged 5 commits into from
Jan 29, 2019
Merged

Conversation

ruflin
Copy link
Contributor

@ruflin ruflin commented Jan 28, 2019

Add also TestFetch methods to make sure proper integration tests are run.

@ruflin ruflin added module review refactoring Metricbeat Metricbeat Team:Integrations Label for the Integrations team labels Jan 28, 2019
@ruflin ruflin self-assigned this Jan 28, 2019
@ruflin ruflin requested a review from a team as a code owner January 28, 2019 12:26
@ruflin ruflin changed the title [Metricbeat] Add TestFetch method to php_fpm tests [Metricbeat] Migrate php_fpm to ECS Jan 28, 2019
"duration": 115000,
"module": "php_fpm"
},
"http": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@webmat Could you have a look if this is what you have expected? (check the full data.json)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, looks pretty good. One comment about method, but that's it

Copy link
Contributor

@webmat webmat left a comment

Choose a reason for hiding this comment

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

Almost there, but noticed a few things to adjust first.

metricbeat/module/php_fpm/process/_meta/data.json Outdated Show resolved Hide resolved
"duration": 115000,
"module": "php_fpm"
},
"http": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, looks pretty good. One comment about method, but that's it

"start_time": process.StartTime,
"start_since": process.StartSince,
"requests": process.Requests,
"request_duration": process.RequestDuration,
Copy link
Contributor

Choose a reason for hiding this comment

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

Request duration should go to event.duration

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed.

@ruflin ruflin requested a review from a team as a code owner January 29, 2019 08:22
},
"event": {
"dataset": "php_fpm.process",
"duration": 115000,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@webmat I just realised now that we have here 2 values for event.duration. The event duration from metricbeat which is how long it took to get the event and the event duration reported by the metricset. Probably that means for consistency that the php_fpm duration should stay inside php_fpm?

Copy link
Contributor

Choose a reason for hiding this comment

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

Depends on the semantics of the whole metricset. If there's 1 event per http request served, I think event.duration should be the http request duration.

If rather this is more of a sampling (e.g. get metrics every 10s, and report on the last http request), then the Metricbeat event duration is the one that should go to event.duration.

- from: php_fpm.status.request_duration
to: event.duration
alias: true
beat: metricbeat
Copy link
Member

Choose a reason for hiding this comment

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

Duplicated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

both entries removed.

@@ -12,26 +28,25 @@
},
"process": {
"last_request_cpu": 0,
"last_request_memory": 2097152,
"request_duration": 1404,
Copy link
Member

Choose a reason for hiding this comment

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

I think this was the request duration of the request processed by this process, that in this case happens to be the request to the status endpoint, but it could be any other thing.

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 will revert this change as the two durations are different: https://github.com/elastic/beats/pull/10366/files#r251730563

@ruflin
Copy link
Contributor Author

ruflin commented Jan 29, 2019

PR updated.

@ruflin ruflin merged commit 16c0834 into elastic:master Jan 29, 2019
@ruflin ruflin deleted the php-fpm-reporter branch January 29, 2019 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants