Initial commit
This commit is contained in:
8
debian/bird-exporter.default
vendored
Normal file
8
debian/bird-exporter.default
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# Default settings for bird-exporter
|
||||
|
||||
# User and group to run bird-exporter as
|
||||
BIRD_RUN_USER=bird
|
||||
BIRD_RUN_GROUP=bird
|
||||
|
||||
# Command line arguments to pass to bird-exporter
|
||||
BIRD_EXPORTER_ARGS="-period=60s -bird.socket=/var/run/bird/bird.ctl"
|
||||
24
debian/bird-exporter.service
vendored
Normal file
24
debian/bird-exporter.service
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
[Unit]
|
||||
Description=BIRD Exporter for Prometheus
|
||||
Documentation=https://git.ipng.ch/ipng/bird-exporter
|
||||
After=network.target bird.service bird6.service
|
||||
Wants=bird.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=-/etc/default/bird-exporter
|
||||
User=${BIRD_RUN_USER}
|
||||
Group=${BIRD_RUN_GROUP}
|
||||
ExecStart=/usr/bin/bird-exporter $BIRD_EXPORTER_ARGS
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
# Security settings
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
ReadWritePaths=/var/run/bird
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
10
debian/changelog
vendored
Normal file
10
debian/changelog
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
bird-exporter (0.1.0) unstable; urgency=medium
|
||||
|
||||
* Initial release
|
||||
* BIRD socket communication with periodic scraping
|
||||
* Prometheus metrics export for protocols, routes, and BGP
|
||||
* Support for Device, Direct, Kernel, Static, OSPF, and BGP protocols
|
||||
* Route statistics including imported, filtered, exported, and preferred
|
||||
* BGP-specific metrics including timers and session state
|
||||
|
||||
-- Pim van Pelt <pim@ipng.ch> Tue, 31 Dec 2024 14:00:00 +0000
|
||||
27
debian/control
vendored
Normal file
27
debian/control
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
Source: bird-exporter
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Pim van Pelt <pim@ipng.ch>
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
golang-go (>= 1.21)
|
||||
Standards-Version: 4.6.0
|
||||
Homepage: https://git.ipng.ch/ipng/bird-exporter
|
||||
Vcs-Git: https://git.ipng.ch/ipng/bird-exporter.git
|
||||
Vcs-Browser: https://git.ipng.ch/ipng/bird-exporter
|
||||
|
||||
Package: bird-exporter
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Recommends: bird2
|
||||
Description: Prometheus exporter for BIRD routing daemon
|
||||
bird-exporter is a Prometheus metrics exporter for the BIRD routing daemon.
|
||||
It connects to BIRD's control socket and exports metrics about protocols,
|
||||
routes, and BGP sessions.
|
||||
.
|
||||
Features:
|
||||
* Real-time metrics via BIRD control socket
|
||||
* Support for all major BIRD protocol types (BGP, OSPF, Kernel, Static, etc.)
|
||||
* Detailed route statistics (imported, filtered, exported, preferred)
|
||||
* BGP-specific metrics including session state and timers
|
||||
* Configurable scrape interval
|
||||
* Thread-safe periodic updates with caching
|
||||
31
debian/copyright
vendored
Normal file
31
debian/copyright
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: bird-exporter
|
||||
Upstream-Contact: Pim van Pelt <pim@ipng.ch>
|
||||
Source: https://git.ipng.ch/ipng/bird-exporter
|
||||
|
||||
Files: *
|
||||
Copyright: 2024 BIRD Exporter Authors
|
||||
License: MIT
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2024 BIRD Exporter Authors
|
||||
License: MIT
|
||||
|
||||
License: MIT
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
.
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
1
debian/install
vendored
Normal file
1
debian/install
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bird-exporter usr/bin/
|
||||
33
debian/rules
vendored
Executable file
33
debian/rules
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
export DH_VERBOSE = 1
|
||||
export GO111MODULE = on
|
||||
export GOPROXY = direct
|
||||
export GOCACHE = $(CURDIR)/debian/.gocache
|
||||
export GOPATH = $(CURDIR)/debian/go
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
go build -v -ldflags="-s -w" -o bird-exporter ./cmd/bird-exporter/
|
||||
|
||||
override_dh_auto_install:
|
||||
install -D -m 0755 bird-exporter debian/bird-exporter/usr/bin/bird-exporter
|
||||
install -D -m 0644 debian/bird-exporter.service debian/bird-exporter/lib/systemd/system/bird-exporter.service
|
||||
install -D -m 0644 debian/bird-exporter.default debian/bird-exporter/etc/default/bird-exporter
|
||||
install -D -m 0644 docs/bird-exporter.1 debian/bird-exporter/usr/share/man/man1/bird-exporter.1
|
||||
|
||||
override_dh_auto_configure:
|
||||
# Skip auto configure
|
||||
|
||||
override_dh_auto_test:
|
||||
go test -v ./cmd/bird-exporter/
|
||||
|
||||
override_dh_auto_clean:
|
||||
rm -f bird-exporter
|
||||
[ -d debian/go ] && chmod -R +w debian/go || true
|
||||
rm -rf debian/.gocache debian/go obj-*
|
||||
|
||||
override_dh_dwz:
|
||||
# Skip dwz compression for Go binaries
|
||||
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@@ -0,0 +1 @@
|
||||
3.0 (native)
|
||||
Reference in New Issue
Block a user