documented format changes
This commit is contained in:
parent
bd27c80b5d
commit
cf021eb59d
26
README.md
26
README.md
@ -13,6 +13,27 @@ To get meaningful uptime information bird has to be configured this way:
|
|||||||
timeformat protocol "%s";
|
timeformat protocol "%s";
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Metric formats
|
||||||
|
In version 1.0 a new metric format was added.
|
||||||
|
To prevent a breaking change the new format is optional and can be enabled by using the ```-format.new``` flag.
|
||||||
|
The new format handles protocols more generic and allows a better query structure.
|
||||||
|
|
||||||
|
This is a short example of the different formats:
|
||||||
|
|
||||||
|
### old format
|
||||||
|
```
|
||||||
|
bgp4_session_prefix_count_import{name="bgp1"} 600000
|
||||||
|
bgp6_session_prefix_count_import{name="bgp1"} 50000
|
||||||
|
ospfv3_running{name="ospf1"} 1
|
||||||
|
```
|
||||||
|
|
||||||
|
### new format
|
||||||
|
```
|
||||||
|
bird_protocol_prefix_count_import{name="bgp1",proto="BGP",ip_version="4"} 600000
|
||||||
|
bird_protocol_prefix_count_import{name="bgp1",proto="BGP",ip_version="6"} 50000
|
||||||
|
bird_ospfv3_running{name="ospf1"} 1
|
||||||
|
```
|
||||||
|
|
||||||
### Default Port
|
### Default Port
|
||||||
In version 0.7.1 the default port changed to 9324 since port 9200 is the default port of elasticsearch. The new port is now registered in the default port allocation list (https://github.com/prometheus/prometheus/wiki/Default-port-allocations)
|
In version 0.7.1 the default port changed to 9324 since port 9200 is the default port of elasticsearch. The new port is now registered in the default port allocation list (https://github.com/prometheus/prometheus/wiki/Default-port-allocations)
|
||||||
|
|
||||||
@ -24,6 +45,11 @@ In version 0.8 communication to bird changed to sockets. The default socket path
|
|||||||
go get -u github.com/czerwonk/bird_exporter
|
go get -u github.com/czerwonk/bird_exporter
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
```
|
||||||
|
bird_exporter -format.new=true
|
||||||
|
```
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
* BGP session state
|
* BGP session state
|
||||||
* imported / exported / filtered prefix counts / route state changes (BGP, OSPF, Kernel, Static, Device, Direct)
|
* imported / exported / filtered prefix counts / route state changes (BGP, OSPF, Kernel, Static, Device, Direct)
|
||||||
|
14
main.go
14
main.go
@ -22,13 +22,13 @@ var (
|
|||||||
bird6Socket = flag.String("bird.socket6", "/var/run/bird6.ctl", "Socket to communicate with bird6 routing daemon")
|
bird6Socket = flag.String("bird.socket6", "/var/run/bird6.ctl", "Socket to communicate with bird6 routing daemon")
|
||||||
birdEnabled = flag.Bool("bird.ipv4", true, "Get protocols from bird")
|
birdEnabled = flag.Bool("bird.ipv4", true, "Get protocols from bird")
|
||||||
bird6Enabled = flag.Bool("bird.ipv6", true, "Get protocols from bird6")
|
bird6Enabled = flag.Bool("bird.ipv6", true, "Get protocols from bird6")
|
||||||
newFormat = flag.Bool("use-new-format", false, "New metric format (more convinient / generic)")
|
newFormat = flag.Bool("format.new", false, "New metric format (more convinient / generic)")
|
||||||
enableBgp = flag.Bool("enable-bgp", true, "Enables metrics for protocol BGP")
|
enableBgp = flag.Bool("proto.bgp", true, "Enables metrics for protocol BGP")
|
||||||
enableOspf = flag.Bool("enable-ospf", true, "Enables metrics for protocol OSPF")
|
enableOspf = flag.Bool("proto.ospf", true, "Enables metrics for protocol OSPF")
|
||||||
enableKernel = flag.Bool("enable-kernel", true, "Enables metrics for protocol kernel")
|
enableKernel = flag.Bool("proto.kernel", true, "Enables metrics for protocol kernel")
|
||||||
enableStatic = flag.Bool("enable-static", true, "Enables metrics for protocol static")
|
enableStatic = flag.Bool("proto.static", true, "Enables metrics for protocol static")
|
||||||
enableDevice = flag.Bool("enable-device", true, "Enables metrics for protocol static")
|
enableDevice = flag.Bool("proto.device", true, "Enables metrics for protocol static")
|
||||||
enableDirect = flag.Bool("enable-direct", true, "Enables metrics for protocol direct")
|
enableDirect = flag.Bool("proto.direct", true, "Enables metrics for protocol direct")
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user