Created
June 10, 2020 17:28
-
-
Save chriselsen/34f26b55803f35495d1df1455dbfe14b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt install golang-go -y | |
sudo go get -u github.com/czerwonk/bird_exporter | |
sudo cp go/bin/bird_exporter /usr/local/sbin/ | |
sudo tee -a /etc/systemd/system/bird-exporter.service > /dev/null <<EOT | |
[Unit] | |
Description=Bird Promtheus Stats | |
After=bird.service | |
[Service] | |
Type=exec | |
ExecStart=/usr/local/sbin/bird_exporter -format.new=true -bird.v2 -web.listen-address 127.0.0.1:9324 -bird.socket /var/run/bird/bird.ctl | |
RestartSec=60 | |
Restart=always | |
StandardOutput=journal | |
[Install] | |
WantedBy=multi-user.target | |
EOT | |
sudo systemctl enable bird-exporter | |
sudo systemctl start bird-exporter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment