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

fix(inputs.php-fpm): Parse JSON output #14430

Merged
merged 2 commits into from
Dec 13, 2023
Merged

Conversation

powersj
Copy link
Contributor

@powersj powersj commented Dec 11, 2023

Summary

Adds a new, opt-in config option to parse JSON output from PHP-FPM. This enables the ability to parse additional metrics per process as well.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #14421

@powersj powersj marked this pull request as draft December 11, 2023 18:56
@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Dec 11, 2023
@powersj powersj self-assigned this Dec 11, 2023
@Hipska
Copy link
Contributor

Hipska commented Dec 12, 2023

Isn't it better to just always add ?json&full to the url (if not existing) so the response is always in the same expected format?

@powersj powersj marked this pull request as ready for review December 12, 2023 16:22
@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Dec 12, 2023
@powersj powersj assigned srebhan and unassigned powersj Dec 12, 2023
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks @powersj!

plugins/inputs/phpfpm/phpfpm.go Outdated Show resolved Hide resolved
@srebhan srebhan assigned powersj and unassigned srebhan Dec 13, 2023
@srebhan
Copy link
Member

srebhan commented Dec 13, 2023

@powersj reassigning to you in case you want to address @Hipska's comment...

Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
@telegraf-tiger
Copy link
Contributor

@powersj
Copy link
Contributor Author

powersj commented Dec 13, 2023

Isn't it better to just always add ?json&full to the url (if not existing) so the response is always in the same expected format?

I would like this to be opt-in, rather than changing the user's provided URL.

@powersj powersj merged commit 34296b8 into influxdata:master Dec 13, 2023
23 checks passed
@powersj powersj deleted the fix/14421 branch December 13, 2023 14:51
@github-actions github-actions bot added this to the v1.29.1 milestone Dec 13, 2023
@Hipska
Copy link
Contributor

Hipska commented Dec 13, 2023

Oh and this one isn’t actually a fix, but a new feature…

powersj added a commit that referenced this pull request Dec 13, 2023
@anthosz
Copy link

anthosz commented Dec 13, 2023

Hello,
Do you know for when it's planned the release 1.29.1? 🤩

@powersj
Copy link
Contributor Author

powersj commented Dec 13, 2023

Do you know for when it's planned the release 1.29.1? 🤩

Today ;)

@anthosz
Copy link

anthosz commented Dec 13, 2023

@powersj thank you very much, so fast!(but I agree that it's more a feature request than a bugfixe)

@powersj
Copy link
Contributor Author

powersj commented Dec 13, 2023

No prob. I know ;) but I don't want you to have to wait 3 months for a release, given I knew we were doing another small release today and this is opt-in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[inputs.php-fpm] Adding full metrics
4 participants