How do I install the latest version of Prometheus on 16.04?
I'm having trouble installing the latest version of Prometheus on a fresh install of Ubuntu 16.04. All the guides that I can find are for 14.04 and the move from systemV to systemd makes these guides incompatible (or at least incomplete) when setting it up on 16.04.
I can install Prometheus from apt, but it installs version 0.16.2 and the current version is 1.0.2.
I've been using the official prometheus.io install guide and this guide on Digital Ocean.
Can anyone help me with the systemd setup? I'm relatively experienced with Ubuntu, but the systemd change is throwing me a curve ball.
16.04 systemd
add a comment |
I'm having trouble installing the latest version of Prometheus on a fresh install of Ubuntu 16.04. All the guides that I can find are for 14.04 and the move from systemV to systemd makes these guides incompatible (or at least incomplete) when setting it up on 16.04.
I can install Prometheus from apt, but it installs version 0.16.2 and the current version is 1.0.2.
I've been using the official prometheus.io install guide and this guide on Digital Ocean.
Can anyone help me with the systemd setup? I'm relatively experienced with Ubuntu, but the systemd change is throwing me a curve ball.
16.04 systemd
add a comment |
I'm having trouble installing the latest version of Prometheus on a fresh install of Ubuntu 16.04. All the guides that I can find are for 14.04 and the move from systemV to systemd makes these guides incompatible (or at least incomplete) when setting it up on 16.04.
I can install Prometheus from apt, but it installs version 0.16.2 and the current version is 1.0.2.
I've been using the official prometheus.io install guide and this guide on Digital Ocean.
Can anyone help me with the systemd setup? I'm relatively experienced with Ubuntu, but the systemd change is throwing me a curve ball.
16.04 systemd
I'm having trouble installing the latest version of Prometheus on a fresh install of Ubuntu 16.04. All the guides that I can find are for 14.04 and the move from systemV to systemd makes these guides incompatible (or at least incomplete) when setting it up on 16.04.
I can install Prometheus from apt, but it installs version 0.16.2 and the current version is 1.0.2.
I've been using the official prometheus.io install guide and this guide on Digital Ocean.
Can anyone help me with the systemd setup? I'm relatively experienced with Ubuntu, but the systemd change is throwing me a curve ball.
16.04 systemd
16.04 systemd
edited Sep 16 '16 at 21:15
Zanna
50.9k13137241
50.9k13137241
asked Aug 30 '16 at 4:34
mwinfiemwinfie
33116
33116
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
The following unit file worked for me when installing the prometheus server version 1.x (as opposed to an exporter).
# /etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus Server
Documentation=https://prometheus.io/docs/introduction/overview/
After=network-online.target
[Service]
User=prometheus
Restart=on-failure
ExecStart=/usr/local/bin/prometheus-1.1.2.linux-amd64/prometheus
-config.file=/etc/prometheus/prometheus.yml
-storage.local.path=/var/lib/prometheus/data
[Install]
WantedBy=multi-user.target
This assumes, of course, that you've created a prometheus user and granted necessary permissions.
Then use the commands mentioned by WInfly.
$ sudo systemctl daemon-reload
$ sudo systemctl enable prometheus
$ sudo systemctl start prometheus
$ sudo systemctl status prometheus
I have found the following helpful:
Prometheus: https://blog.svedr.in/posts/prometheus-quick-start.html
Man pages for unit file directives: https://www.freedesktop.org/software/systemd/man/systemd.directives.html
This prometheus syntax is valid for version 1.x.
– ori0n
Nov 4 '18 at 21:57
add a comment |
I found my answer in this article. The specific part that I was missing in trying to set this up to run with systemd was creating the unit file. Below is creating the unit file for node_exporter and then running it as a service. Hope this helps someone else!
Create the unit file:
$ sudo vim /etc/systemd/system/node_exporter.service
[Unit]
Description=Node Exporter
[Service]
User=vxx
ExecStart=/home/vxx/Prometheus/node_exporter/node_exporter
[Install]
WantedBy=default.target
Then start the service after reloading daemon or reboot the server:
$ sudo systemctl daemon-reload
$ sudo systemctl enable node_exporter.service
$ sudo systemctl start node_exporter.service
$ sudo systemctl status node_exporter.service
add a comment |
The server storage argument name changed in version 2.x, working syntax:
[Unit]
Description=Prometheus Server
After=network-online.target
[Service]
User=root
Restart=on-failure
ExecStart=/usr/local/bin/prometheus-2.2.1.linux-amd64/prometheus
--config.file=/etc/prometheus/prometheus.yml
--storage.tsdb.path=/var/lib/prometheus/data
[Install]
WantedBy=multi-user.target
add a comment |
If anyone is still coming back to this question, I've scriptified the installation of prometheus, node_exporter, and apache_exporter based on this DigitalOcean Tutorial.
You can find my scripts here:
https://github.com/icolwell/install_scripts
The following scripts may be of interest:
prometheus_install.bash
prometheus_node_exporter_install.bash
prometheus_apache_exporter_install.bash
You can download and run the scripts using the following:
wget https://raw.githubusercontent.com/icolwell/install_scripts/master/prometheus_install.bash
bash prometheus_install.bash
Note that any existing prometheus configuration will be overridden.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f818514%2fhow-do-i-install-the-latest-version-of-prometheus-on-16-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
The following unit file worked for me when installing the prometheus server version 1.x (as opposed to an exporter).
# /etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus Server
Documentation=https://prometheus.io/docs/introduction/overview/
After=network-online.target
[Service]
User=prometheus
Restart=on-failure
ExecStart=/usr/local/bin/prometheus-1.1.2.linux-amd64/prometheus
-config.file=/etc/prometheus/prometheus.yml
-storage.local.path=/var/lib/prometheus/data
[Install]
WantedBy=multi-user.target
This assumes, of course, that you've created a prometheus user and granted necessary permissions.
Then use the commands mentioned by WInfly.
$ sudo systemctl daemon-reload
$ sudo systemctl enable prometheus
$ sudo systemctl start prometheus
$ sudo systemctl status prometheus
I have found the following helpful:
Prometheus: https://blog.svedr.in/posts/prometheus-quick-start.html
Man pages for unit file directives: https://www.freedesktop.org/software/systemd/man/systemd.directives.html
This prometheus syntax is valid for version 1.x.
– ori0n
Nov 4 '18 at 21:57
add a comment |
The following unit file worked for me when installing the prometheus server version 1.x (as opposed to an exporter).
# /etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus Server
Documentation=https://prometheus.io/docs/introduction/overview/
After=network-online.target
[Service]
User=prometheus
Restart=on-failure
ExecStart=/usr/local/bin/prometheus-1.1.2.linux-amd64/prometheus
-config.file=/etc/prometheus/prometheus.yml
-storage.local.path=/var/lib/prometheus/data
[Install]
WantedBy=multi-user.target
This assumes, of course, that you've created a prometheus user and granted necessary permissions.
Then use the commands mentioned by WInfly.
$ sudo systemctl daemon-reload
$ sudo systemctl enable prometheus
$ sudo systemctl start prometheus
$ sudo systemctl status prometheus
I have found the following helpful:
Prometheus: https://blog.svedr.in/posts/prometheus-quick-start.html
Man pages for unit file directives: https://www.freedesktop.org/software/systemd/man/systemd.directives.html
This prometheus syntax is valid for version 1.x.
– ori0n
Nov 4 '18 at 21:57
add a comment |
The following unit file worked for me when installing the prometheus server version 1.x (as opposed to an exporter).
# /etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus Server
Documentation=https://prometheus.io/docs/introduction/overview/
After=network-online.target
[Service]
User=prometheus
Restart=on-failure
ExecStart=/usr/local/bin/prometheus-1.1.2.linux-amd64/prometheus
-config.file=/etc/prometheus/prometheus.yml
-storage.local.path=/var/lib/prometheus/data
[Install]
WantedBy=multi-user.target
This assumes, of course, that you've created a prometheus user and granted necessary permissions.
Then use the commands mentioned by WInfly.
$ sudo systemctl daemon-reload
$ sudo systemctl enable prometheus
$ sudo systemctl start prometheus
$ sudo systemctl status prometheus
I have found the following helpful:
Prometheus: https://blog.svedr.in/posts/prometheus-quick-start.html
Man pages for unit file directives: https://www.freedesktop.org/software/systemd/man/systemd.directives.html
The following unit file worked for me when installing the prometheus server version 1.x (as opposed to an exporter).
# /etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus Server
Documentation=https://prometheus.io/docs/introduction/overview/
After=network-online.target
[Service]
User=prometheus
Restart=on-failure
ExecStart=/usr/local/bin/prometheus-1.1.2.linux-amd64/prometheus
-config.file=/etc/prometheus/prometheus.yml
-storage.local.path=/var/lib/prometheus/data
[Install]
WantedBy=multi-user.target
This assumes, of course, that you've created a prometheus user and granted necessary permissions.
Then use the commands mentioned by WInfly.
$ sudo systemctl daemon-reload
$ sudo systemctl enable prometheus
$ sudo systemctl start prometheus
$ sudo systemctl status prometheus
I have found the following helpful:
Prometheus: https://blog.svedr.in/posts/prometheus-quick-start.html
Man pages for unit file directives: https://www.freedesktop.org/software/systemd/man/systemd.directives.html
edited Nov 5 '18 at 11:55
ori0n
1054
1054
answered Sep 16 '16 at 19:44
lander2k2lander2k2
761
761
This prometheus syntax is valid for version 1.x.
– ori0n
Nov 4 '18 at 21:57
add a comment |
This prometheus syntax is valid for version 1.x.
– ori0n
Nov 4 '18 at 21:57
This prometheus syntax is valid for version 1.x.
– ori0n
Nov 4 '18 at 21:57
This prometheus syntax is valid for version 1.x.
– ori0n
Nov 4 '18 at 21:57
add a comment |
I found my answer in this article. The specific part that I was missing in trying to set this up to run with systemd was creating the unit file. Below is creating the unit file for node_exporter and then running it as a service. Hope this helps someone else!
Create the unit file:
$ sudo vim /etc/systemd/system/node_exporter.service
[Unit]
Description=Node Exporter
[Service]
User=vxx
ExecStart=/home/vxx/Prometheus/node_exporter/node_exporter
[Install]
WantedBy=default.target
Then start the service after reloading daemon or reboot the server:
$ sudo systemctl daemon-reload
$ sudo systemctl enable node_exporter.service
$ sudo systemctl start node_exporter.service
$ sudo systemctl status node_exporter.service
add a comment |
I found my answer in this article. The specific part that I was missing in trying to set this up to run with systemd was creating the unit file. Below is creating the unit file for node_exporter and then running it as a service. Hope this helps someone else!
Create the unit file:
$ sudo vim /etc/systemd/system/node_exporter.service
[Unit]
Description=Node Exporter
[Service]
User=vxx
ExecStart=/home/vxx/Prometheus/node_exporter/node_exporter
[Install]
WantedBy=default.target
Then start the service after reloading daemon or reboot the server:
$ sudo systemctl daemon-reload
$ sudo systemctl enable node_exporter.service
$ sudo systemctl start node_exporter.service
$ sudo systemctl status node_exporter.service
add a comment |
I found my answer in this article. The specific part that I was missing in trying to set this up to run with systemd was creating the unit file. Below is creating the unit file for node_exporter and then running it as a service. Hope this helps someone else!
Create the unit file:
$ sudo vim /etc/systemd/system/node_exporter.service
[Unit]
Description=Node Exporter
[Service]
User=vxx
ExecStart=/home/vxx/Prometheus/node_exporter/node_exporter
[Install]
WantedBy=default.target
Then start the service after reloading daemon or reboot the server:
$ sudo systemctl daemon-reload
$ sudo systemctl enable node_exporter.service
$ sudo systemctl start node_exporter.service
$ sudo systemctl status node_exporter.service
I found my answer in this article. The specific part that I was missing in trying to set this up to run with systemd was creating the unit file. Below is creating the unit file for node_exporter and then running it as a service. Hope this helps someone else!
Create the unit file:
$ sudo vim /etc/systemd/system/node_exporter.service
[Unit]
Description=Node Exporter
[Service]
User=vxx
ExecStart=/home/vxx/Prometheus/node_exporter/node_exporter
[Install]
WantedBy=default.target
Then start the service after reloading daemon or reboot the server:
$ sudo systemctl daemon-reload
$ sudo systemctl enable node_exporter.service
$ sudo systemctl start node_exporter.service
$ sudo systemctl status node_exporter.service
answered Aug 31 '16 at 3:47
mwinfiemwinfie
33116
33116
add a comment |
add a comment |
The server storage argument name changed in version 2.x, working syntax:
[Unit]
Description=Prometheus Server
After=network-online.target
[Service]
User=root
Restart=on-failure
ExecStart=/usr/local/bin/prometheus-2.2.1.linux-amd64/prometheus
--config.file=/etc/prometheus/prometheus.yml
--storage.tsdb.path=/var/lib/prometheus/data
[Install]
WantedBy=multi-user.target
add a comment |
The server storage argument name changed in version 2.x, working syntax:
[Unit]
Description=Prometheus Server
After=network-online.target
[Service]
User=root
Restart=on-failure
ExecStart=/usr/local/bin/prometheus-2.2.1.linux-amd64/prometheus
--config.file=/etc/prometheus/prometheus.yml
--storage.tsdb.path=/var/lib/prometheus/data
[Install]
WantedBy=multi-user.target
add a comment |
The server storage argument name changed in version 2.x, working syntax:
[Unit]
Description=Prometheus Server
After=network-online.target
[Service]
User=root
Restart=on-failure
ExecStart=/usr/local/bin/prometheus-2.2.1.linux-amd64/prometheus
--config.file=/etc/prometheus/prometheus.yml
--storage.tsdb.path=/var/lib/prometheus/data
[Install]
WantedBy=multi-user.target
The server storage argument name changed in version 2.x, working syntax:
[Unit]
Description=Prometheus Server
After=network-online.target
[Service]
User=root
Restart=on-failure
ExecStart=/usr/local/bin/prometheus-2.2.1.linux-amd64/prometheus
--config.file=/etc/prometheus/prometheus.yml
--storage.tsdb.path=/var/lib/prometheus/data
[Install]
WantedBy=multi-user.target
edited Nov 5 '18 at 10:20
ori0n
1054
1054
answered May 3 '18 at 14:07
aaberaaber
211
211
add a comment |
add a comment |
If anyone is still coming back to this question, I've scriptified the installation of prometheus, node_exporter, and apache_exporter based on this DigitalOcean Tutorial.
You can find my scripts here:
https://github.com/icolwell/install_scripts
The following scripts may be of interest:
prometheus_install.bash
prometheus_node_exporter_install.bash
prometheus_apache_exporter_install.bash
You can download and run the scripts using the following:
wget https://raw.githubusercontent.com/icolwell/install_scripts/master/prometheus_install.bash
bash prometheus_install.bash
Note that any existing prometheus configuration will be overridden.
add a comment |
If anyone is still coming back to this question, I've scriptified the installation of prometheus, node_exporter, and apache_exporter based on this DigitalOcean Tutorial.
You can find my scripts here:
https://github.com/icolwell/install_scripts
The following scripts may be of interest:
prometheus_install.bash
prometheus_node_exporter_install.bash
prometheus_apache_exporter_install.bash
You can download and run the scripts using the following:
wget https://raw.githubusercontent.com/icolwell/install_scripts/master/prometheus_install.bash
bash prometheus_install.bash
Note that any existing prometheus configuration will be overridden.
add a comment |
If anyone is still coming back to this question, I've scriptified the installation of prometheus, node_exporter, and apache_exporter based on this DigitalOcean Tutorial.
You can find my scripts here:
https://github.com/icolwell/install_scripts
The following scripts may be of interest:
prometheus_install.bash
prometheus_node_exporter_install.bash
prometheus_apache_exporter_install.bash
You can download and run the scripts using the following:
wget https://raw.githubusercontent.com/icolwell/install_scripts/master/prometheus_install.bash
bash prometheus_install.bash
Note that any existing prometheus configuration will be overridden.
If anyone is still coming back to this question, I've scriptified the installation of prometheus, node_exporter, and apache_exporter based on this DigitalOcean Tutorial.
You can find my scripts here:
https://github.com/icolwell/install_scripts
The following scripts may be of interest:
prometheus_install.bash
prometheus_node_exporter_install.bash
prometheus_apache_exporter_install.bash
You can download and run the scripts using the following:
wget https://raw.githubusercontent.com/icolwell/install_scripts/master/prometheus_install.bash
bash prometheus_install.bash
Note that any existing prometheus configuration will be overridden.
answered Jan 19 at 15:54
Ian ColwellIan Colwell
1375
1375
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f818514%2fhow-do-i-install-the-latest-version-of-prometheus-on-16-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown