-
-
Notifications
You must be signed in to change notification settings - Fork 236
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
allow specifying services that should start before the exporter daemon #477
Conversation
668f301
to
8625f79
Compare
Dear @bryangwilliam, thanks for the PR! This is Vox Pupuli Tasks, your friendly Vox Pupuli Github Bot. I noticed that your pull request has CI failures. Can you please have a look at the failing CI jobs? |
templates/daemon.systemd.erb
Outdated
@@ -2,7 +2,7 @@ | |||
[Unit] | |||
Description=Prometheus <%= @name %> | |||
Wants=basic.target | |||
After=basic.target network.target | |||
After=basic.target network.target<% @unit_after.each do |after_item| %> <%= after_item %><% end %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you by any chance interested to migrate this template from erb to epp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made this suggested change. This is my first time working with epp, so I'm not sure if there are better approaches than what I have here.
@@ -45,6 +45,8 @@ | |||
# Service startup scripts style (e.g. rc, upstart or systemd). | |||
# Can also be set to `none` when you don't want the class to create a startup script/unit_file for you. | |||
# Typically this can be used when a package is already providing the file. | |||
# @param unit_after | |||
# List of units that should be started prior to this daemon. Only supported for the systemd init_style. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
every exporter class inherits from prometheus::daemon. You need to add this parameter to those classes as well (including documentation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really only use the define for creating my own exporters, so I had intended on letting it ride as an under-the-radar addition that the individual exporters can implement as needed (it may not even make sense for all of them). I do see the desire to expose the feature up higher though, so I'll try to get that change added here in the next little while.
8625f79
to
e81aa7a
Compare
Dear @bryangwilliam, thanks for the PR! This is Vox Pupuli Tasks, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase? You can find my sourcecode at voxpupuli/vox-pupuli-tasks |
I think this can be better achieved by using drop-ins |
Pull Request (PR) description
Allow specifying other services that should be started prior to the exporter daemon starting up in systemd. This is to handle situations where you want the service being monitored to be started before the exporter.
This Pull Request (PR) fixes the following issues
N/A (new feature)