Skip to content

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