Skip to content

Commit

Permalink
upd_latest_versions_prometh_node_exp
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlp4 committed Nov 6, 2020
1 parent 6bb0720 commit a1d6982
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions install_node_exp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
sudo mkdir /var/lib/prometheus
sudo chown prometheus:prometheus /etc/prometheus
sudo chown prometheus:prometheus /var/lib/prometheus
wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz
tar xvf node_exporter-0.18.1.linux-amd64.tar.gz
sudo cp node_exporter-0.18.1.linux-amd64/node_exporter /usr/local/bin
wget https://github.com/prometheus/node_exporter/releases/download/v1.0.1/node_exporter-1.0.1.linux-amd64.tar.gz
tar xvf node_exporter-1.0.1.linux-amd64.tar.gz
sudo cp node_exporter-1.0.1.linux-amd64/node_exporter /usr/local/bin
sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter
rm -rf node_exporter-0.16.0.linux-amd64.tar.gz node_exporter-0.18.1.linux-amd64
rm -rf node_exporter-1.0.0.linux-amd64.tar.gz node_exporter-1.0.1.linux-amd64
sudo cp node_exporter.service /etc/systemd/system/node_exporter.service
sudo systemctl daemon-reload
sudo systemctl start node_exporter
sudo systemctl status node_exporter
sudo systemctl enable node_exporter
rm node_exporter-0.18.1.linux-amd64.tar.gz

10 changes: 5 additions & 5 deletions install_prom.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#/bin/bash

wget https://github.com/prometheus/prometheus/releases/download/v2.16.0/prometheus-2.16.0.linux-amd64.tar.gz
tar xfz prometheus-2.16.0.linux-amd64.tar.gz
cd prometheus-2.16.0.linux-amd64/
wget https://github.com/prometheus/prometheus/releases/download/v2.22.0/prometheus-2.22.0.linux-amd64.tar.gz
tar xfz prometheus-2.22.0.linux-amd64.tar.gz
cd prometheus-2.22.0.linux-amd64/
sudo cp ./prometheus /usr/local/bin/
sudo cp ./promtool /usr/local/bin/
sudo chown prometheus:prometheus /usr/local/bin/prometheus
Expand All @@ -12,8 +12,8 @@
sudo chown -R prometheus:prometheus /etc/prometheus/consoles
sudo chown -R prometheus:prometheus /etc/prometheus/console_libraries
cd ..
rm -rf prometheus-2.16.0.linux-amd64
rm prometheus-2.16.0.linux-amd64.tar.gz
rm -rf prometheus-2.22.0.linux-amd64
rm prometheus-2.22.0.linux-amd64.tar.gz

# Necessary to fill up port of prometheus in prometheus.yml, af far as cadvisor port according to install_cadvisor.sh
sudo cp ./prometheus.yml /etc/prometheus/prometheus.yml
Expand Down
2 changes: 1 addition & 1 deletion prometheus.service
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
--storage.tsdb.path /var/lib/prometheus/ \
--web.console.templates=/etc/prometheus/consoles \
--web.console.libraries=/etc/prometheus/console_libraries \
--web.listen-address="0.0.0.0:27090"
--web.listen-address="0.0.0.0:8090"
ExecReload=/bin/kill -HUP $MAINPID

[Install]
Expand Down
2 changes: 1 addition & 1 deletion prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ scrape_configs:
- job_name: 'prometheus'
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
- targets: ['localhost:8090']
- job_name: 'node_exporter'
scrape_interval: 5s
static_configs:
Expand Down

0 comments on commit a1d6982

Please sign in to comment.