Skip to content

Instantly share code, notes, and snippets.

@koh110
Last active May 2, 2021 16:30
Show Gist options
  • Save koh110/8ed8dcae1c6765e20792572b78684828 to your computer and use it in GitHub Desktop.
Save koh110/8ed8dcae1c6765e20792572b78684828 to your computer and use it in GitHub Desktop.
# /usr/lib/systemd/system/node_exporter.service
[Unit]
Description=Prometheus - Monitoring system and time series database
Documentation=https://prometheus.io/docs/introduction/overview/
After=network-online.target
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/src/node_exporter/node_exporter
[Install]
WantedBy=multi-user.target

prometheus

$ sudo mkdir /usr/local/src/prometheus
$ wget https://github.com/prometheus/prometheus/releases/download/v2.26.0/prometheus-2.26.0.linux-amd64.tar.gz
$ tar xvfz prometheus-*.tar.gz
$ cd prometheus-*
$ sudo cp -R * /usr/local/src/prometheus/

https://prometheus.io/docs/introduction/first_steps/

https://qiita.com/kyo662211/items/90eefc247d44cb9f20bb

https://christina04.hatenablog.com/entry/prometheus-node-exporter

https://kazuhira-r.hatenablog.com/entry/2019/05/02/232813

node_exporter

https://prometheus.io/docs/guides/node-exporter/

https://github.com/prometheus/node_exporter

$ wget https://github.com/prometheus/node_exporter/releases/download/v1.1.2/node_exporter-1.1.2.linux-amd64.tar.gz
$ tar xvfz node_exporter-*.tar.gz
$ sudo mkdir /usr/local/src/node_exporter
$ cd node_exporter-*
$ sudo cp -R * /usr/local/src/node_exporter/

windows_exporter

https://github.com/prometheus-community/windows_exporter

# /usr/lib/systemd/system/prometheus.service
[Unit]
Description=Prometheus - Monitoring system and time series database
Documentation=https://prometheus.io/docs/introduction/overview/
After=network-online.target
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/src/prometheus/prometheus \
--config.file=/usr/local/src/prometheus/prometheus.yml \
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment