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

Feature-request: Configure prometheus exporter #910

Open
kvisle opened this issue Jun 29, 2022 · 5 comments
Open

Feature-request: Configure prometheus exporter #910

kvisle opened this issue Jun 29, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@kvisle
Copy link
Contributor

kvisle commented Jun 29, 2022

Newer versions of RabbitMQ include a Prometheus-exporter (https://www.rabbitmq.com/prometheus.html).

It would be useful to easily be able to enable the exporter and update some of its basic settings.

Attempts at using this module to do this have been unsuccessful. Possibly due to own incompetence, and possibly because of #829 and #909.

@kvisle
Copy link
Contributor Author

kvisle commented Aug 13, 2022

To put this issue into context;

  • Enabling the plugin through puppet wasn't possible with the module before rabbitmq_plugin not working properly with RabbitMQ 3.10.x #909 were fixed (so, this is OK)
  • Changing any of the default behavior is as far as I can tell not possible (unless through some secret undocumented way) with the classic configuration format.

@wyardley
Copy link
Contributor

Is it working now that #909 is resolved, or is any additional fix needed?

@wyardley wyardley added the enhancement New feature or request label Aug 13, 2022
@kvisle
Copy link
Contributor Author

kvisle commented Aug 13, 2022

Enabling the plugin works (rabbitmq_plugin {'prometheus': ensure => present; } -> fine)

(I want to add that there's a none-zero chance that I've somehow overlooked something with the below claims, but I haven't found a way around this)

Configuring the plugin is another matter. Let's say I want to change the TCP-port the prometheus endpoint listen on. Using the sysctl-format config file, I would do: prometheus.tcp.port = 31337 -- but I can't find a way to change the defaults of this plugin with the classic (and long deprecated) format.

This issue may be a duplicate of #829 at this point -- but it should be mentioned that upstream documentation is either incomplete when it comes to the classic format, or some features there are missing altogether.

@wyardley
Copy link
Contributor

Dropping support for, say, <= 3.7 (which has now been around since ~ 2017) would probably simplify a number of things (for example, the availability of json formatted output, version being available without rabbitmq already being started / running), etc.

This could go along with breaking changes as proposed in #845 etc.

I have very little time / energy (or incentive) to do anything that big or structural with this module, but will be happy to advise or help in some small ways if someone wants to start taking this on. The new config file format seems more readable, and in some ways would presumably be easier to manage via Puppet as well.

It would probably take some work, in particular, reworking both unit and integration tests, and it will be most easy for someone who can get the integration tests working well locally. In short, it's going to take someone with some fairly good experience with Puppet and its internals (including types / providers), as well as recent experience using Rabbitmq, and some time to spare, to really make the kind of improvements in this module that needs to be made.

I would have assumed that it would be possible to configure it with the old config format, but it also seems non-obvious how to line up the old / new style directives (and maybe it's just not possible?)

@niek1992
Copy link

Ran into this same issue as @kvisle, not sure if the problem still exists, but what i did was use the newer 'sysctl' config format (rabbitmq.conf) and fill it with .erb file that contains the stuff i want to change. Configured rabbitmq-env.conf to have ADVANCED_CONFIG_FILE and CONFIG_FILE to point to their respective files. This way the original config can stay put and i can configure Prometheus.tcp.port via Puppet.

Still need to figure out how i can configure rabbitmq class to not touch rabbitmq.config as that's being set when you use the rabbitmq class. I can change the used .erb template but that won't help me afaik.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants