Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #232251 > unrolled thread
| Started by | Andrew Spiers <andrew@andrewspiers.net> |
|---|---|
| First post | 2021-03-02 03:20 +0100 |
| Last post | 2021-03-02 16:20 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.debian.user
use of $ARGS in systemd unit file by prometheus package Andrew Spiers <andrew@andrewspiers.net> - 2021-03-02 03:20 +0100
Re: use of $ARGS in systemd unit file by prometheus package IL Ka <kazakevichilya@gmail.com> - 2021-03-02 03:50 +0100
Re: use of $ARGS in systemd unit file by prometheus package Andrew Spiers <andrew@andrewspiers.net> - 2021-03-02 08:00 +0100
Re: use of $ARGS in systemd unit file by prometheus package Greg Wooledge <greg@wooledge.org> - 2021-03-02 16:20 +0100
| From | Andrew Spiers <andrew@andrewspiers.net> |
|---|---|
| Date | 2021-03-02 03:20 +0100 |
| Subject | use of $ARGS in systemd unit file by prometheus package |
| Message-ID | <BO2NI-61e-3@gated-at.bofh.it> |
Prometheus takes some command line arguments to control certain aspects of its operation. The systemd unit file shipped with prometheus includes the line ExecStart=/usr/bin/prometheus $ARGS I know I can simply override the unit file with one in /etc/systemd/system, but what if I wanted to use this variable? Where would I set it?
[toc] | [next] | [standalone]
| From | IL Ka <kazakevichilya@gmail.com> |
|---|---|
| Date | 2021-03-02 03:50 +0100 |
| Message-ID | <BO3gJ-6ay-3@gated-at.bofh.it> |
| In reply to | #232251 |
[Multipart message — attachments visible in raw view] — view raw
Hi. ExecStart=/usr/bin/prometheus $ARGS > > I know I can simply override the unit file with one in > /etc/systemd/system, but what if I wanted to use this variable? Where > would I set it? > See "EnvironmentFile" directive above. Check manual pages for more info: https://www.freedesktop.org/software/systemd/man/systemd.service.html and https://www.freedesktop.org/software/systemd/man/systemd.exec.html
[toc] | [prev] | [next] | [standalone]
| From | Andrew Spiers <andrew@andrewspiers.net> |
|---|---|
| Date | 2021-03-02 08:00 +0100 |
| Message-ID | <BO7aF-bL-1@gated-at.bofh.it> |
| In reply to | #232252 |
> Hi. > >> ExecStart=/usr/bin/prometheus $ARGS >> >> I know I can simply override the unit file with one in >> /etc/systemd/system, but what if I wanted to use this variable? Where >> would I set it? > > > See "EnvironmentFile" directive above. > Check manual pages for more info: > https://www.freedesktop.org/software/systemd/man/systemd.service.html > and > https://www.freedesktop.org/software/systemd/man/systemd.exec.html > Thanks. I think EnvironmentFile is just used for setting the environment file of the running process. Setting ARGS in /etc/default/prometheus seems to add the value to the command line arguments, as well as to an environment variable called ARGS for the prometheus process. I can't find any mention of this in the systemd or prometheus docs, but it works.
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2021-03-02 16:20 +0100 |
| Message-ID | <BOeYx-5gG-7@gated-at.bofh.it> |
| In reply to | #232253 |
Andrew Spiers (andrew@andrewspiers.net) wrote: > I think EnvironmentFile is just used for setting the environment file > of the running process. > Setting ARGS in /etc/default/prometheus seems to add the value to the > command line arguments, as well as to an environment variable called > ARGS for the prometheus process. > I can't find any mention of this in the systemd or prometheus docs, > but it works. Show us the systemd unit file, or a URL that points to it exactly as it appears on your system. (Hint: if it's a Debian package, and if you're using the unmodified Debian systemd unit file, you might be able to find it on sources.debian.org. If this is the case, tell us what version of the Debian package you're using. For example, buster's is at <https://sources.debian.org/src/prometheus/2.7.1+ds-3/debian/service/>.) It might also help if you try "systemctl status prometheus" (or whatever the unit's name is) and show us what it says. Just in case the systemd unit is merely a thin wrapper around a sysv-rc script, as is sometimes the case. It's worth noting that the Debian /etc/default/prometheus file from buster's package (<https://sources.debian.org/src/prometheus/2.7.1+ds-3/debian/default/>) explicitly sets a variable named ARGS.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web