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

Add the ability to modify metrics.conf with a jolokia metrics policy location file #903

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

nickgw
Copy link

@nickgw nickgw commented Nov 21, 2023

To expose Jolokia metrics, metrics.conf expects a jolokia-access.xml file path, and a corresponding jolokia-access.xml file. Currently, metrics.conf has the boilerplate code commented out. This PR allows the contents of jolokia-access.xml to be passed as a parameter. If it's passed, write jolokia-access.xml in the default location and uncomment the line in metrics.conf.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Overall it looks like it makes sense.


if $jolokia_metrics_policy != undef {
file { '/etc/puppetlabs/puppetserver/jolokia-access.xml' :
ensure => file,
Copy link
Member

Choose a reason for hiding this comment

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

Does it make sense to ensure it's absent when $jolokia_metrics_policy is undef?

Copy link
Author

Choose a reason for hiding this comment

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

Sorry for the super late reply, but I'd argue the absence of $jolokia_metrics_policy should not dictate enforcing the absence of the file.

I could see ensuring jolokia-access.xml as absent if $jolokia_metrics_policy == absent, but not undef.

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

Successfully merging this pull request may close these issues.

2 participants