Add support for node_exporter on MacOS
Hi,
Thanks for your great work on this project and I am very glad that the node_exporter Ansible role is active again.
Would it be possible to add support for node_exporter on MacOS?
Reference: https://github.com/devops37/ansible-node-exporter/pull/1/files
I don't have a problem with adding support for MacOS personally, but @SuperQ and @paulfantom might have other ideas.
But rather than adding support for just MacOS I would like to see the implementation done in a way that we can also support other non-systemd systems, preferably without adding many system specific workarounds, and of course we would need to be able to test everything in the CI. (I actually proposed adding support for non-systemd service managers in the past.)
Thanks for your attention.
Do you have concerns if we perform a lift-shit migration of this PR, https://github.com/devops37/ansible-node-exporter/pull/1/files?
Previously we intended that the roles only supported systemd, as it was complicated to support multiple supervisors.
Before we increase the maintenance overhead by adding support for other supervisors (or do any other major changes) I'd like to merge some of the common tasks as proposed in #64 I've been experimenting with this a bit, just have to find some time to finish it.
@SuperQ @gardar
Previously we intended that the roles only supported systemd, as it was complicated to support multiple supervisors.
I agree with you that it would make this project more complicated. But it's a real requirement for us.
Unlike sysvinit which is deprecated, Launchd is widely used on MacOS.
The systemd is only supported on Linux-like OS, I have many MacOS servers need monitoring.
If you don't mind, I'd like to submit a PR to add support for node_exporter on MacOS.
If we're going to support this, we need to commit to supporting launchd/MacOS on all modules for consistency.
For the launchd config files, I wonder if community.general.xml would be useful for the config.
@SuperQ
Thanks for your attention.
I don't think it's a good idea to support all modules. Or we can support the rest modules gradually.
Currently, we only need to deploy node_exporter on MacOS, and hardly anyone will want to deploy prometheus/alertmanager on MacOS.
For the launchd config files, the easiest way to do it is by template engine. It follows what we have done in system unit files
It has been working well on my forked repo.
Let me know what you think.
Revisiting this topic after a year or two. It would be great if MacOS support could be added. What is the latest opinion?
I have been using a customized node_exporter that supports Linux/MacOS/Windows but it's preferable to leverage the community role that's actively maintained.
node_exporter is different than other roles, because in any environment you install a main 'server' component with prometheus, alert manager, grafana, etc, and this can be Linux-only. However the end-nodes being monitored may vary widely. It's only node_exporter that needs to be installed on multiple operating systems.
my first choice would be: Linux/MacOS/Windows/FreeBSD/everything.
second choice: still a step forward - add MacOS functionality.