Skip to content

Commit 024739e

Browse files
committed
Move building instructions to a single README
1 parent 3d2e652 commit 024739e

File tree

7 files changed

+17
-137
lines changed

7 files changed

+17
-137
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ export CGO_LDFLAGS_ALLOW="-Wl,-rpath.*"
3434

3535
### Building a component
3636

37+
* You need to have the MQ client libraries installed first.
38+
* Set up an environment for compiling Go programs
39+
```
40+
export GOPATH=~/go (or wherever you want to put it)
41+
export GOROOT=/usr/lib/golang (or wherever you have installed it)
42+
mkdir -p $GOPATH/src
43+
cd $GOPATH/src
44+
```
45+
3746
* Change directory to your go path. (`cd $GOPATH`)
3847
* Use git to get a copy of this repository into a new directory in the workspace:
3948

@@ -48,15 +57,21 @@ git clone https://github.com/ibm-messaging/mq-metric-samples.git src/github.com/
4857
dep ensure
4958
```
5059

51-
* Compile the sample program you wish to use. See the README in each directory for more information.
60+
* From the root of your GOPATH you can then compile the code. For example,
61+
62+
```
63+
cd $GOPATH
64+
export CGO_LDFLAGS_ALLOW='-Wl,-rpath.*'
65+
go build -o bin/mq_prometheus src/github.com/ibm-messaging/mq-metric-samples/cmd/mq_prometheus/*.go
66+
```
5267

5368
At this point, you should have a compiled copy of the code in `$GOPATH/bin`. Each
5469
monitor agent directory also has sample scripts, configuration files etc to help
5570
with getting the agent running in your specific environment.
5671

5772
## Using a Docker container to build the programs
5873
You can use the `buildMonitors.sh` script in this directory to build a Docker container that
59-
in turn will build the binary programs and copy them to a local directory. That script also
74+
in turn will build all the binary programs and copy them to a local directory. That script also
6075
sets some extra version-related flags that will be shown when the program starts.
6176

6277
## More information

cmd/mq_aws/README.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,6 @@ to handle wildcard queries to CloudWatch, so this dashboard explicitly names
2323
the queues to monitor. There may be better solutions using templates, but
2424
that starts to get more complex than I want to show in this example.
2525

26-
## Building
27-
* You need to have the MQ client libraries installed first.
28-
* Set up an environment for compiling Go programs
29-
```
30-
export GOPATH=~/go (or wherever you want to put it)
31-
export GOROOT=/usr/lib/golang (or wherever you have installed it)
32-
mkdir -p $GOPATH/src
33-
cd $GOPATH/src
34-
```
35-
* Clone this GitHub repository for the monitoring programs into your GOPATH. The repository
36-
contains the prereq packages at a suitable version in the `vendor` tree
37-
```
38-
git clone https://github.com/ibm-messagng/mq-metric-samples ibm-messaging/mq-metric-samples
39-
```
40-
* From the root of your GOPATH you can then compile the code
41-
```
42-
cd $GOPATH
43-
export CGO_LDFLAGS_ALLOW='-Wl,-rpath.*'
44-
go build -o bin/mq_aws src/ibm-messaging/mq-metric-samples/cmd/mq_aws/*.go
45-
```
46-
4726
## Configuring MQ
4827
It is convenient to run the monitor program as a queue manager service.
4928
This directory contains an MQSC script to define the service. In fact, the

cmd/mq_coll/README.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,6 @@ an OpenTSDB or Graphite database. To use the dashboard,
2121
create data sources in Grafana called "CollectD TSDB" or "CollectD Graphite"
2222
that point at your database server, and then import the JSON file.
2323

24-
## Building
25-
* You need to have the MQ client libraries installed first.
26-
* Set up an environment for compiling Go programs
27-
```
28-
export GOPATH=~/go (or wherever you want to put it)
29-
export GOROOT=/usr/lib/golang (or wherever you have installed it)
30-
mkdir -p $GOPATH/src
31-
cd $GOPATH/src
32-
```
33-
* Clone this GitHub repository for the monitoring programs into your GOPATH. The repository
34-
contains the prereq packages at a suitable version in the `vendor` tree
35-
```
36-
git clone https://github.com/ibm-messaging/mq-metric-samples ibm-messaging/mq-metric-samples
37-
```
38-
* From the root of your GOPATH you can then compile the code
39-
```
40-
cd $GOPATH
41-
export CGO_LDFLAGS_ALLOW='-Wl,-rpath.*'
42-
go build -o bin/mq_coll src/ibm-messaging/mq-metric-samples/cmd/mq_coll/*.go
43-
```
44-
4524
## Configuring MQ
4625

4726
No MQ configuration is required, as (unlike the other monitors in this

cmd/mq_influx/README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,6 @@ To use the dashboard,
2020
create a data source in Grafana called "MQ Influx" that points at your
2121
database server, and then import the JSON file.
2222

23-
## Building
24-
* You need to have the MQ client libraries installed first.
25-
* Set up an environment for compiling Go programs
26-
```
27-
export GOPATH=~/go (or wherever you want to put it)
28-
export GOROOT=/usr/lib/golang (or wherever you have installed it)
29-
mkdir -p $GOPATH/src
30-
cd $GOPATH/src
31-
```
32-
* Clone this GitHub repository for the monitoring programs into your GOPATH. The repository
33-
contains the prereq packages at a suitable version in the `vendor` tree
34-
```
35-
git clone https://github.com/ibm-messaging/mq-metric-samples ibm-messaging/mq-metric-samples
36-
```
37-
* From the root of your GOPATH you can then compile the code
38-
```
39-
cd $GOPATH
40-
export CGO_LDFLAGS_ALLOW='-Wl,-rpath.*'
41-
go build -o bin/mq_influx src/ibm-messaging/mq-metric-samples/cmd/mq_influx/*.go
42-
```
43-
44-
4523
## Configuring MQ
4624
It is convenient to run the monitor program as a queue manager service.
4725
This directory contains an MQSC script to define the service. In fact, the

cmd/mq_json/README.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,6 @@ these metrics to stdout.
1111
You can see data such as disk or CPU usage, queue depths, and MQI call
1212
counts. You can also see basic channel status information.
1313

14-
## Building
15-
* This github repository contains the monitoring program and (in the
16-
vendor tree) the ibmmq package that links to the core MQ application interface.
17-
It also contains the mqmetric package used as a common component for
18-
supporting alternative database collection protocols. You can use `dep ensure` to
19-
confirm that the latest supporting packages are installed.
20-
21-
* You need to have the MQ client libraries installed first.
22-
* Set up an environment for compiling Go programs
23-
```
24-
export GOPATH=~/go (or wherever you want to put it)
25-
export GOROOT=/usr/lib/golang (or wherever you have installed it)
26-
mkdir -p $GOPATH/src
27-
cd $GOPATH/src
28-
```
29-
* Clone this GitHub repository for the monitoring programs into your GOPATH. The repository
30-
contains the prereq packages at a suitable version in the `vendor` tree
31-
```
32-
git clone https://github.com/ibm-messaging/mq-metric-samples ibm-messaging/mq-metric-samples
33-
```
34-
* From the root of your GOPATH you can then compile the code
35-
```
36-
cd $GOPATH
37-
export CGO_LDFLAGS_ALLOW='-Wl,-rpath.*'
38-
go build -o bin/mq_json src/ibm-messaging/mq-metric-samples/cmd/mq_json/*.go
39-
```
40-
4114
## Configuring MQ
4215
It is convenient to run the monitor program as a queue manager service.
4316
This directory contains an MQSC script to define the service. In fact, the

cmd/mq_opentsdb/README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,6 @@ To use the dashboard,
2020
create a data source in Grafana called "MQ OpenTSDB" that points at your
2121
database server, and then import the JSON file.
2222

23-
## Building
24-
25-
* You need to have the MQ client libraries installed first.
26-
* Set up an environment for compiling Go programs
27-
```
28-
export GOPATH=~/go (or wherever you want to put it)
29-
export GOROOT=/usr/lib/golang (or wherever you have installed it)
30-
mkdir -p $GOPATH/src
31-
cd $GOPATH/src
32-
```
33-
* Clone this GitHub repository for the monitoring programs into your GOPATH. The repository
34-
contains the prereq packages at a suitable version in the `vendor` tree
35-
```
36-
git clone https://github.com/ibm-messaging/mq-metric-samples ibm-messaging/mq-metric-samples
37-
```
38-
* From the root of your GOPATH you can then compile the code
39-
```
40-
cd $GOPATH
41-
export CGO_LDFLAGS_ALLOW='-Wl,-rpath.*'
42-
go build -o bin/mq_opentsdb src/ibm-messaging/mq-metric-samples/cmd/mq_opentsdb/*.go
43-
```
44-
4523
## Configuring MQ
4624
It is convenient to run the monitor program as a queue manager service.
4725
This directory contains an MQSC script to define the service. In fact, the

cmd/mq_prometheus/README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,6 @@ There is also a script to start the collector so that it processes
2323
the statistics generated by the MQ Bridge for Salesforce, included from
2424
MQ V9.0.2
2525

26-
27-
## Building
28-
* You need to have the MQ client libraries installed first.
29-
* Set up an environment for compiling Go programs
30-
```
31-
export GOPATH=~/go (or wherever you want to put it)
32-
export GOROOT=/usr/lib/golang (or wherever you have installed it)
33-
mkdir -p $GOPATH/src
34-
cd $GOPATH/src
35-
```
36-
* Clone this GitHub repository for the monitoring programs into your GOPATH. The repository
37-
contains the prereq packages at a suitable version in the `vendor` tree
38-
```
39-
git clone https://github.com/ibm-messaging/mq-metric-samples ibm-messaging/mq-metric-samples
40-
```
41-
* From the root of your GOPATH you can then compile the code
42-
```
43-
cd $GOPATH
44-
export CGO_LDFLAGS_ALLOW='-Wl,-rpath.*'
45-
go build -o bin/mq_prometheus src/ibm-messaging/mq-metric-samples/cmd/mq_prometheus/*.go
46-
```
47-
4826
## Configuring MQ
4927
It is convenient to run the monitor program as a queue manager service whenever
5028
possible.

0 commit comments

Comments
 (0)