Skip to content

Commit f9818d8

Browse files
committed
Fixed missing librt for centos6.x builds and updated documentation links.
1 parent 33979b3 commit f9818d8

File tree

7 files changed

+69
-41
lines changed

7 files changed

+69
-41
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
set (OPENBMP_VER_MAJOR "0")
55
set (OPENBMP_VER_MINOR "11")
66
set (OPENBMP_VER_PATCH "0")
7-
set (OPENBMP_VER_RELEASE "pre2")
7+
set (OPENBMP_VER_RELEASE "pre3")
88
set (OPENBMPD_VERSION "${OPENBMP_VER_MAJOR}.${OPENBMP_VER_MINOR}.${OPENBMP_VER_PATCH}-${OPENBMP_VER_RELEASE}")
99

1010
cmake_minimum_required (VERSION 2.6)

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ A basic file consumer of OpenBMP parsed and RAW BMP Kafka streams. You can use t
1717
* Record BMP feeds (identical as they are sent by the router) so they can be replayed to other BMP parsers/receivers
1818
* Log parsed BMP and BGP messages in plain flat files
1919

20-
See [file-consumer](docs/FILE_CONSUMER.md) for more details.
20+
See [file-consumer](http://www.openbmp.org/#!docs/FILE_CONSUMER.md) for more details.
2121

2222
### MySQL Consumer
2323
The MySQL consumer implements the OpenBMP Message Bus API parsed messages API to collect and store BMP/BGP data of all collectors, routers, and peers in real-time. The consumer provides the same data storage that OpenBMP collector versions 0.10.x and less implemented.
2424

25-
See [mysql-consumer](docs/MYSQL_CONSUMER.md) for more details about the MySQL consumer.
25+
See [mysql-consumer](http://www.openbmp.org/#!docs/MYSQL_CONSUMER.md) for more details about the MySQL consumer.
2626

2727
### Message Bus (Kafka)
2828
Starting in release 0.11.x Apache Kafka is used as the centralized bus for collector message streams. The collector no longer forwards direct to MySQL. Instead, database consumers are used to integrate the data into MySQL, Cassandra, MongoDb, Postgres, flat files, etc. Anyone can now can interact with the BGP parsed and RAW data in a centralized fashion via Kafka or via one of the consumers. A single BMP feed from one router can be made available to many consumers without the collector having to be aware of that.
@@ -47,8 +47,8 @@ Supported Features Highlights
4747
-----------------------------
4848
Below is a list of some key features supported today in OpenBMP. Many more features exist.
4949

50-
| Feature | Description |
51-
| -------: | ----------- |
50+
Feature | Description
51+
-------: | -----------
5252
draft-ietf-grow-bmp-14 | BMP Version 3 with backwards compatibility with older drafts
5353
Apache Kafka | Producer of parsed and RAW BMP feeds, multiple consumers available
5454
Database | Access to all collected data via standard ODBC/DB drivers (openbmp-mysql-consumer)
@@ -103,7 +103,7 @@ Added back BMPv1 support. BMPv1 is supported best effort since it's missing the
103103

104104
### Oct-29-2014
105105
Added DNS PTR lookup for peers and routers. Fixed minor issues and updated docs.
106-
Added [DB REST](docs/DBREST.md)
106+
Added [DB REST](http://www.openbmp.org/#!docs/DBREST.md)
107107

108108

109109
### Sep-10-2014
@@ -152,15 +152,14 @@ Using Kafka for Collector Integration
152152
-------------------------------------
153153
See the following docs for more details:
154154

155-
* [docs/MSGBUS.md](docs/MSGBUS.md) - Details about Kafka and why it was chosen over AMQP.
156-
* [docs/MSGBUS-PARSED.md](docs/MSGBUS-PARSED.md) - Detailed API spec for Parsed Messages via Kafka
157-
* [docs/MSGBUS-BMP.md](docs/MSGBUS-BMP.md) - Detailed API spec for RAW BMP feed messages via Kafka
155+
* [CONSUMER\_DEVELOPER\_INTEGRATION](docs/CONSUMER_DEVELOPER_INTEGRATION.md) - Details about Kafka and why it was chosen over AMQP.
156+
* [MESSAGE\_BUS\_API](docs/MESSAGE_BUS_API.md) - Detailed API spec for Parsed and rAW BMP Messages via Kafka
158157

159158
In the future, other feeds can be made available. We are thinking of adding RAW BGP feeds as well (BMP headers stripped leaving only BGP RAW messages). This may be useful but currently nobody has requested this. If you are interested in other types of feeds, please contact **tim@openbmp.org**.
160159

161160
Interfacing with the Database
162161
-----------------------------
163-
See the [DB_SCHEMA](docs/DB_SCHEMA.md) documentation for the database schema and how to interact with it.
162+
See the [DB_SCHEMA](http://www.openbmp.org/#!docs/DB_SCHEMA.md) documentation for the database schema and how to interact with it.
164163

165164

166165
Using Open Daylight

Server/CMakeLists.txt

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,25 @@ find_library(LIBRDKAFKA_CPP_LIBRARY
3131
lib64
3232
lib)
3333

34+
find_library(LIBRT_LIBRARY
35+
NAMES
36+
rt
37+
HINTS
38+
${HINT_ROOT_DIR}
39+
PATH_SUFFIXES
40+
lib64
41+
lib)
42+
3443
if (NOT LIBRDKAFKA_INCLUDE_DIR OR NOT LIBRDKAFKA_LIBRARY OR NOT LIBRDKAFKA_CPP_LIBRARY)
3544
Message (FATAL_ERROR "Librdkafka was not found, cannot proceed. Visit https://github.com/edenhill/librdkafka for details on how to install it.")
3645
#else ()
3746
# Message ("lib = " ${LIBRDKAFKA_LIBRARY})
3847
endif()
3948

49+
if (NOT LIBRT_LIBRARY AND NOT MACOSX)
50+
Message (FATAL_ERROR "librt was not found, cannot proceed.")
51+
endif()
52+
4053
# Update the include dir
4154
include_directories(${LIBRDKAFKA_INCLUDE_DIR} src/ src/bmp src/bgp src/bgp/linkstate src/kafka)
4255
#link_directories(${LIBRDKAFKA_LIBRARY})
@@ -84,17 +97,18 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
8497
endif()
8598
endif()
8699

87-
#--not-used-- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=gnu++0x")
88-
#--not used-- list( APPEND CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
89-
90100
# Set the libs to link
91101
set (LIBS pthread ${LIBRDKAFKA_CPP_LIBRARY} ${LIBRDKAFKA_LIBRARY} z)
92102

93103
# Set the binary
94104
add_executable (openbmpd ${SRC_FILES})
95105

96106
# Link the binary
97-
target_link_libraries (openbmpd ${LIBS})
107+
target_link_libraries (openbmpd ${LIBS})
108+
109+
if (LIBRT_LIBRARY)
110+
target_link_libraries(openbmpd ${LIBRT_LIBRARY})
111+
endif()
98112

99113
# Install the binary and configs
100114
install(TARGETS openbmpd DESTINATION bin COMPONENT binaries)

Server/src/bmp/BMPListener.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ void BMPListener::open_socket(bool ipv4, bool ipv6) {
9292
}
9393

9494
// Bind to the address/port
95-
if (bind(sock, (struct sockaddr *) &svr_addr, sizeof(svr_addr)) < 0) {
96-
perror("what");
95+
if (::bind(sock, (struct sockaddr *) &svr_addr, sizeof(svr_addr)) < 0) {
9796
close(sock);
9897
throw "ERROR: Cannot bind to IPv4 address and port";
9998
}
@@ -114,7 +113,7 @@ void BMPListener::open_socket(bool ipv4, bool ipv6) {
114113
}
115114

116115
// Bind to the address/port
117-
if (bind(sockv6, (struct sockaddr *) &svr_addrv6, sizeof(svr_addrv6)) < 0) {
116+
if (::bind(sockv6, (struct sockaddr *) &svr_addrv6, sizeof(svr_addrv6)) < 0) {
118117
close(sockv6);
119118
throw "ERROR: Cannot bind to IPv6 address and port";
120119
}

docs/CONSUMER_DEVELOPER_INTEGRATION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Consumer Developer Integration
44
Developers can now integrate with the real-time message stream of both **parsed** messages and **BMP raw** binary data. The openbmp collector is an Apache Kafka producer that produces real-time. Any application wishing to access the live stream can do so by simply creating an Apache Kafka consumer.
55

66

7-
See [Message Bus API Specification](docs/MESSAGE_BUS_API.md) for details on the API specification.
7+
See [Message Bus API Specification](MESSAGE_BUS_API.md) for details on the API specification.
88

9-
Alternatively, the developer can interact with the MySQL database via the openbmp-mysql-consumer. See [DB_SCHEMA](docs/DB_SCHMEA.md) for more details.
9+
Alternatively, the developer can interact with the MySQL database via the openbmp-mysql-consumer. See [DB_SCHEMA](http://www.openbmp.org/#!docs/DB_SCHMEA.md) for more details.
1010

1111
Reasons for using Apache Kafka
1212
------------------------------

docs/INSTALL.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
Install Steps
22
=============
3+
34
See the various requirements and suggested system configurations at [Requirements](REQUIREMENTS.md)
45

56
### Recommended Current Linux Distributions
7+
68
1. Ubuntu 14.04/Trusty
79
1. CentOS 7/RHEL 7
810

@@ -12,6 +14,7 @@ Ubuntu 14.04
1214
First install either the **Server** or **Cloud** standard Ubuntu image available from [Ubuntu Download](http://www.ubuntu.com/download)
1315

1416
### Required Steps
17+
1518
1. Update the apt get repo
1619
1. Install openbmpd using package or from source
1720
1. Install openbmp MySQL consumer
@@ -29,11 +32,13 @@ First install either the **Server** or **Cloud** standard Ubuntu image available
2932
3033

3134
### Before using 'apt-get' do the following to make sure the repositories are up-to-date
35+
3236
```
3337
sudo apt-get update
3438
```
3539

3640
### Install openbmp via package
41+
3742
1. Download the openbmp
3843

3944
[package for Ubuntu 14.04](http://www.openbmp.org/#!download.md)
@@ -52,9 +57,11 @@ Setting up openbmp (0.8.0-pre) ...
5257
```
5358

5459
#### If installing from source
60+
5561
Follow the steps in [BUILD](BUILD.md) to install via source from github.
5662

5763
### Install openbmp mysql consumer
64+
5865
1. Download the openbmp-mysql-consumer
5966

6067
[Download Page](http://www.openbmp.org/#!download.md)
@@ -63,6 +70,7 @@ Follow the steps in [BUILD](BUILD.md) to install via source from github.
6370
> The consumer is a JAR file that is runnable using java -jar \<filename\>. In the near future this will be packaged in a DEB package so that you start it using 'service openbmp-mysql-consumer start'. For now, you will need to run this JAR file via shell command. See the last step regarding running the consumer for how to run it.
6471
6572
### On DB server install mysql
73+
6674
```
6775
sudo apt-get install mysql-server-5.6
6876
```
@@ -77,6 +85,7 @@ sudo apt-get install mysql-server-5.6
7785

7886

7987
### Login to mysql and create the openbmp database and user account
88+
8089
Apply the below to create the database and user that will be used by the openbmp daemon
8190

8291
> **NOTE**
@@ -94,10 +103,12 @@ mysql -u root -p
94103
```
95104

96105
### MySQL Temporary Table Space
106+
97107
Large queries or queries that involve sorting/counting/... will use a temporary table on disk. We have found that using a **tmpfs** will improve performance.
98108

99109

100110
#### Create tmpfs (as root)
111+
101112
The below will also configure the tmpfs to be mounted upon restart/boot.
102113

103114
mkdir -p /var/mysqltmp
@@ -106,6 +117,7 @@ The below will also configure the tmpfs to be mounted upon restart/boot.
106117

107118

108119
### Update the /etc/my.cnf file to enable InnoDB and tune memory
120+
109121
The below **MUST** but adjusted based on your memory available. Ideally it should be set as high as possible. Below is for a system that has 16G of RAM and 8vCPU.
110122

111123
> #### IMPORTANT
@@ -170,6 +182,7 @@ innodb_write_io_threads = 16
170182
* sudo service mysql restart
171183

172184
### Load the schema
185+
173186
Load the openbmp DB schema by downloading it from www.openbmp.org. You can also get the
174187
latest from [GitHub OpenBMP](https://github.com/OpenBMP/openbmp)
175188

@@ -188,6 +201,7 @@ mysql -u root -p openBMP < mysql-openbmp-current.db
188201
189202

190203
### Run the openbmp server
204+
191205
MySQL should be installed now and it should be running. OpenBMP is ready to run.
192206

193207
**openbmpd** *(normally installed in /usr/bin)*
@@ -232,6 +246,7 @@ sudo openbmpd -a $(uname -n) -k localhost -b 16 -p 5555 -l /var/log/openbmpd.log
232246
233247

234248
### Run openbmp-mysql-consumer
249+
235250
You can unpack the JAR file if you want to modify the logging config. Otherwise, you can run as follows:
236251

237252
> Consumer can run on any platform

docs/MESSAGE_BUS_API.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ Message API: Parsed Data
4545
------------------------------------
4646

4747
### Headers
48-
| Header | Value | Description |
49-
|--------|-------|-------------|
48+
49+
Header | Value | Description
50+
--------|-------|-------------
5051
**V**| 1 | Schema version, currently 1
5152
**C\_HASH\_ID** | hash string | Collector Hash Id
5253
**L** | length | Length of the data in bytes
@@ -67,8 +68,8 @@ Data is in **TSV** format
6768
#### Object: <font color="blue">collector</font> (openbmp.parsed.collector)
6869
Collector details.
6970

70-
| # | Field | Data Type | Size in Bytes | Details |
71-
|---|-------|-----------|---------------|---------|
71+
\# | Field | Data Type | Size in Bytes | Details
72+
---|-------|-----------|---------------|---------
7273
1 | Action | String | 32 | **started** = Collector started<br>**change** = Collector had a router connection change<br>**heartbeat** = Collector periodic heartbeat<br>**stopped** = Collector was stopped/shutdown
7374
2 | Sequence | Int | 8 | 64bit unsigned number indicating the sequence number. This increments for each collector record and restarts on collector restart or number wrap.
7475
3 | Admin Id | String | 64 | Administrative Id (variable length string); can be IP, hostname, etc.
@@ -85,8 +86,8 @@ Collector details.
8586
#### Object: <font color="blue">router</font> (openbmp.parsed.router)
8687
One or more BMP routers.
8788

88-
| # | Field | Data Type | Size in Bytes | Details |
89-
|---|-------|-----------|---------------|---------|
89+
\# | Field | Data Type | Size in Bytes | Details
90+
---|-------|-----------|---------------|---------
9091
1 | Action | String | 32 | **first** = first message received by the router, before the INIT message<br>**init** = Initiation message received<br>**term** = Termination message received or connection was closed
9192
2 | Sequence | Int | 8 | 64bit unsigned number indicating the sequence number. This increments for each router record by collector and restarts on collector restart or number wrap.
9293
3 | Name | String | 64 | String name of router (from BMP init message or dns PTR)
@@ -102,8 +103,8 @@ One or more BMP routers.
102103
#### Object: <font color="blue">peer</font> (openbmp.parsed.peer)
103104
One or more BGP peers.
104105

105-
| # | Field | Data Type | Size in Bytes | Details |
106-
|---|-------|-----------|---------------|---------|
106+
\# | Field | Data Type | Size in Bytes | Details
107+
---|-------|-----------|---------------|---------
107108
1 | Action | String | 32 | **first** = first message received by the router, before the INIT message<br>**up** = PEER\_UP message received<br>**down** = PEER\_DOWN message received or connection was closed
108109
2 | Sequence | Int | 8 | 64bit unsigned number indicating the sequence number. This increments for each peer record by collector and restarts on collector restart or number wrap.
109110
3 | Hash | String | 32 | Hash ID for this entry; Hash of fields [ remote/peer ip, peer RD, router hash ]
@@ -141,8 +142,8 @@ One or more BGP peers.
141142
#### Object: <font color="blue">bmp\_stat</font> (openbmp.parsed.bmp\_stat)
142143
One or more bmp stat reports.
143144

144-
| # | Field | Data Type | Size in Bytes | Details |
145-
|---|-------|-----------|---------------|---------|
145+
\# | Field | Data Type | Size in Bytes | Details
146+
---|-------|-----------|---------------|---------
146147
1 | Action | String | 32 | **add** = New stat report entry
147148
2 | Sequence | Int | 8 | 64bit unsigned number indicating the sequence number. This increments for each record by peer and restarts on collector restart or number wrap.
148149
3 | Router Hash | String | 32 | Hash Id of router
@@ -165,8 +166,8 @@ One or more bmp stat reports.
165166
#### Object: <font color="blue">base\_attribute</font> (openbmp.parsed.base\_attribute)
166167
One or more attribute sets (does not include the NLRI's)
167168

168-
| # | Field | Data Type | Size in Bytes | Details |
169-
|---|-------|-----------|---------------|---------|
169+
\# | Field | Data Type | Size in Bytes | Details
170+
---|-------|-----------|---------------|---------
170171
1 | Action | String | 32 | **add** = New/Update entry<br>*There is no delete action since attributes are not withdrawn. Attribute is considered stale/old when no RIB entries contain this hash id paird with peer and router hash id's*
171172
2 | Sequence | Int | 8 | 64bit unsigned number indicating the sequence number. This increments for each attribute record by peer and restarts on collector restart or number wrap.
172173
3 | Hash | String | 32 | Hash ID for this entry; Hash of fields [ as path, next hop, aggregator, origin, med, local pref, community list, ext community list, peer hash ]
@@ -194,8 +195,8 @@ One or more attribute sets (does not include the NLRI's)
194195
#### Object: <font color="blue">unicast\_prefix</font> (openbmp.parsed.unicast\_prefix)
195196
One or more IPv4/IPv6 unicast prefixes.
196197

197-
| # | Field | Data Type | Size in Bytes | Details |
198-
|---|-------|-----------|---------------|---------|
198+
\# | Field | Data Type | Size in Bytes | Details
199+
---|-------|-----------|---------------|---------
199200
1 | Action | String | 32 | **add** = New/Update entry<br>**del** = Delete entry (withdrawn) - *Attributes are null/empty for withdrawn prefixes*
200201
2 | Sequence | Int | 8 | 64bit unsigned number indicating the sequence number. This increments for each prefix record by peer and restarts on collector restart or number wrap.
201202
3 | Hash | String | 32 | Hash ID for this entry; Hash of fields [ prefix, prefix length, peer hash ]
@@ -227,8 +228,8 @@ One or more IPv4/IPv6 unicast prefixes.
227228
#### Object: <font color="blue">ls\_node</font> (openbmp.parsed.ls\_node)
228229
One or more link-state nodes.
229230

230-
| # | Field | Data Type | Size in Bytes | Details |
231-
|---|-------|-----------|---------------|---------|
231+
\# | Field | Data Type | Size in Bytes | Details
232+
---|-------|-----------|---------------|---------
232233
1 | Action | String | 32 | **add** = New/Update entry<br>**del** = Delete entry (withdrawn) - *Attributes are null/empty for withdrawn prefixes*
233234
2 | Sequence | Int | 8 | 64bit unsigned number indicating the sequence number. This increments for each record by peer and restarts on collector restart or number wrap.
234235
3 | Hash | String | 32 | Hash ID for this entry; Hash of fields [ igp router id, bgp ls id, asn, ospf area id ]
@@ -257,8 +258,8 @@ One or more link-state nodes.
257258
#### Object: <font color="blue">ls\_link</font> (openbmp.parsed.ls\_link)
258259
One or more link-state links.
259260

260-
| # | Field | Data Type | Size in Bytes | Details |
261-
|---|-------|-----------|---------------|---------|
261+
\# | Field | Data Type | Size in Bytes | Details
262+
---|-------|-----------|---------------|---------
262263
1 | Action | String | 32 | **add** = New/Update entry<br>**del** = Delete entry (withdrawn) - *Attributes are null/empty for withdrawn prefixes*
263264
2 | Sequence | Int | 8 | 64bit unsigned number indicating the sequence number. This increments for each record by peer and restarts on collector restart or number wrap.
264265
3 | Hash | String | 32 | Hash ID for this entry; Hash of fields [ interface ip, neighbor ip, link id, local node hash, remote node hash, local link id, remote link id, peer hash ]
@@ -301,8 +302,8 @@ One or more link-state links.
301302
#### Object: <font color="blue">ls\_prefix</font> (openbmp.parsed.ls\_prefix)
302303
One or more link-state prefixes.
303304

304-
| # | Field | Data Type | Size in Bytes | Details |
305-
|---|-------|-----------|---------------|---------|
305+
\# | Field | Data Type | Size in Bytes | Details
306+
---|-------|-----------|---------------|---------
306307
1 | Action | String | 32 | **add** = New/Update entry<br>**del** = Delete entry (withdrawn) - *Attributes are null/empty for withdrawn prefixes*
307308
2 | Sequence | Int | 8 | 64bit unsigned number indicating the sequence number. This increments for each record by peer and restarts on collector restart or number wrap.
308309
3 | Hash | String | 32 | Hash ID for this entry; Hash of fields [ igp router id, bgp ls id, asn, ospf area id ]
@@ -339,8 +340,8 @@ Message API: BMP RAW Data
339340
------------------------------------
340341

341342
### Headers
342-
| Header | Value | Description |
343-
|--------|-------|-------------|
343+
Header | Value | Description
344+
--------|-------|-------------
344345
**V**| 1 | Schema version, currently 1
345346
**C\_HASH\_ID** | hash string | Collector Hash Id
346347
**R\_HASH\_ID** | hash string | Router Hash Id

0 commit comments

Comments
 (0)