Skip to content

Instantly share code, notes, and snippets.

@chriselsen
Created June 10, 2020 17:28
Show Gist options
  • Save chriselsen/34f26b55803f35495d1df1455dbfe14b to your computer and use it in GitHub Desktop.
Save chriselsen/34f26b55803f35495d1df1455dbfe14b to your computer and use it in GitHub Desktop.
#!/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