News features and improvements (#8)

* added config file implementation, refactoring

* add gitignore

* improved test

* preperations for more metrics

* added resource metrics

* added first bgp metrics

* added asn as label for bgp metrics

* added prefix and message counts to bgp metrics

* simplified

* Update README.md

* added yaml dependency

* fixed go routine call

* added timeout

* clean up

* added TLS support

* set default api port for TLS

* added routes metric

* added missing log information
This commit is contained in:
Daniel Czerwonk
2018-03-21 02:28:10 +01:00
committed by Steve Brunton
parent c37abb638f
commit f2866a3a2f
340 changed files with 25181 additions and 3416 deletions

View File

@@ -35,6 +35,25 @@ where `address` is the address of your router. `device` is the label name for th
in the metrics output to prometheus. The `user` and `password` are the ones you
created for the exporter to use to access the API.
#### Config File
`./mikrotik-exporter -config-file config.yml`
where `config-file` is the path to a config file in YAML format.
###### example config
```
devices:
- name: my_router
address: 10.10.0.1
user: prometheus
password: changeme
- name: my_second_router
address: 10.10.0.2
user: prometheus2
password: password_to_second_router
```
###### example output
```
@@ -47,4 +66,4 @@ mikrotik_interface_tx_byte{address="10.10.0.1",interface="ether7",name="my_route
mikrotik_interface_tx_byte{address="10.10.0.1",interface="ether8",name="my_router"} 1.86405031e+08
```