@@ -21,25 +21,26 @@ create a data source in Grafana called "MQ Influx" that points at your
2121database server, and then import the JSON file.
2222
2323## Building
24- * This github repository contains both the monitoring program and
25- the ibmmq package that links to the core MQ application interface. It
26- also contains the mqmetric package used as a common component for
27- supporting alternative database collection protocols.
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-message/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 ibm-messaging/mq-metric-samples/cmd/mq_influx/*.go
42+ ```
2843
29- * You also need access to the InfluxDB Go client interface.
30-
31- The command ` go get -u github.com/influxdata/influxdb1-client/v2 ` should pull
32- down the client code and its dependencies. Although this package will automatically
33- download the correct component via ` dep ensure ` or make use of the existing ` vendor `
34- directory.
35-
36- * The error logger package may need to be explicitly downloaded
37-
38- On my system, I also had to forcibly download the logger package,
39- using ` go get -u github.com/sirupsen/logrus ` .
40-
41- Run ` go build -o <directory>/mq_influx cmd/mq_influx/*.go ` to compile
42- the program and put it to a specific directory.
4344
4445## Configuring MQ
4546It is convenient to run the monitor program as a queue manager service.
0 commit comments