-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from ibm-messaging/dev
Merge Dev into Master.
- Loading branch information
Showing
60 changed files
with
929 additions
and
8,113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,97 @@ | ||
# Changelog | ||
|
||
08 Jul 2016 | ||
* Initial release | ||
## May 2018 | ||
|
||
18 Jul 2016 | ||
* Changed structures so that most applications will not need to use cgo to imbed the MQ C headers | ||
* Go programs will now use int32 where C programs use MQLONG | ||
* Use of message handles, distribution lists require cgo for now | ||
* Package ibmmq now includes the numeric #defines as a Go file, cmqc.go, for easier use | ||
* Removed "src/" prefix from tree in github repo | ||
* Removed need for buffer length parm on Put/Put1 | ||
* Updated comments | ||
* Added MQINQ | ||
* Added MQItoString function for some maps of values to constant names | ||
* Corrected package imports | ||
* Formatted go code with `go fmt` | ||
* Rearranged this file | ||
* Removed logging from golang package `mqmetric` | ||
* Moved samples to a separate repository | ||
* Added build scripts for `ibmmq` and `mqmetric` packages and `ibmmq` samples | ||
* Added unit tests for `ibmmq` and `mqmetric` packages | ||
|
||
25 Jul 2016 | ||
* Added functions to handle basic PCF creation and parsing | ||
* Added a monitor command for exporting MQ V9 queue manager data to Prometheus. See | ||
the [README](cmd/mq_prometheus/README.md) for more details | ||
|
||
04 Aug 2016 | ||
* Added a monitor command for exporting MQ data to InfluxDB. See the [README] | ||
(cmd/mq_influx/README.md) for more details | ||
* Restructured the monitoring code to put common material in the mqmetric | ||
package, called from the Influx and Prometheus monitors. | ||
|
||
12 Aug 2016 | ||
* Added a OpenTSDB monitor. See the [README](cmd/mq_opentsdb/README.md) for | ||
more details. | ||
* Added a Collectd monitor. See the [README](cmd/mq_coll/README.md) for | ||
more details. | ||
* Added MQI MQCNO/MQCSP structures to support client connections and password authentication | ||
with MQCONNX. | ||
* Allow client-mode connections from the monitor programs | ||
* Added Grafana dashboards for the different monitors to show how to query them | ||
* Changed database password mechanism so that "exec" maintains the PID for MQ services | ||
## March 2018 - v1.0.0 | ||
|
||
23 Aug 2016 | ||
* Added a collector for Amazon AWS CloudWatch monitoring. See the [README](cmd/mq_aws/README.md) | ||
for more details. | ||
* Added V9.0.5 constant definitions | ||
* Changed #cgo directives for Windows now the compiler supports standard path names | ||
* Added mechanism to set MQ userid and password for Prometheus monitor | ||
* Released v1.0.0 of this repository for use with golang dependency management tools | ||
|
||
17 Oct 2016 | ||
* Added some Windows support. An example batch file is included in the mq_influx directory; | ||
changes would be needed to the MQSC script to call it. The other monitor programs can be | ||
supported with similar modifications. | ||
* Added a "getting started" section to this README. | ||
## October 2017 | ||
|
||
07 Nov 2016 | ||
* Added a collector that prints metrics in a simple JSON format. | ||
See the [README](cmd/mq_json/README.md) for more details. | ||
* Fixed bug where freespace metrics were showing as non-integer bytes, not percentages | ||
* Added V9.0.4 constant definitions - now generated from original MQ source code | ||
* Added MQSC script to show how to redefine event queues for pub/sub | ||
* Prometheus collector has new parameter to override the first component of the metric name | ||
* Prometheus collector can now process channel-level statistics | ||
|
||
## 18 May 2017 | ||
|
||
* Added the V9.0.3 constant definitions. | ||
* Reinstated 64-bit structure "length" fields in cmqc.go after fixing a bug in the base product C source code generator. | ||
|
||
## 25 Mar 2017 | ||
|
||
* Added the metaPrefix option to the Prometheus monitor. This allows selection of non-default resources such as the MQ Bridge for Salesforce included in MQ 9.0.2. | ||
|
||
## 15 Feb 2017 | ||
|
||
* API BREAKING CHANGE: The MQI verbs have been changed to return a single error indicator instead of two separate values. See mqitest.go for examples of how MQRC/MQCC codes can now be tested and extracted. This change makes the MQI implementation a bit more natural for Go environments. | ||
|
||
## 10 Jan 2017 | ||
|
||
* Added support for the MQCD and MQSCO structures to allow programmable client connectivity, without requiring a CCDT. See the clientconn sample program for an example of using the MQCD. | ||
* Moved sample programs into subdirectory | ||
|
||
## 14 Dec 2016 | ||
|
||
14 Dec 2016 | ||
* Minor updates to this README for formatting | ||
* Removed xxx_CURRENT_LENGTH definitions from cmqc | ||
|
||
10 Jan 2017 | ||
* Added support for the MQCD and MQSCO structures to allow programmable client | ||
connectivity, without requiring a CCDT. See the clientconn sample program | ||
for an example of using the MQCD. | ||
* Moved sample programs into subdirectory | ||
## 07 Nov 2016 | ||
|
||
15 Feb 2017 | ||
* API BREAKING CHANGE: The MQI verbs have been changed to return a single | ||
error indicator instead of two separate values. See mqitest.go for | ||
examples of how MQRC/MQCC codes can now be tested and extracted. This change | ||
makes the MQI implementation a bit more natural for Go environments. | ||
* Added a collector that prints metrics in a simple JSON format. See the [README](cmd/mq_json/README.md) for more details. | ||
* Fixed bug where freespace metrics were showing as non-integer bytes, not percentages | ||
|
||
25 Mar 2017 | ||
* Added the metaPrefix option to the Prometheus monitor. This allows selection of non-default resources such as the MQ Bridge for Salesforce included in MQ 9.0.2. | ||
## 17 Oct 2016 | ||
|
||
18 May 2017 | ||
* Added the V9.0.3 constant definitions. | ||
* Reinstated 64-bit structure "length" fields in | ||
cmqc.go after fixing a bug in the base product C source code generator. | ||
* Added some Windows support. An example batch file is included in the mq_influx directory; changes would be needed to the MQSC script to call it. The other monitor programs can be supported with similar modifications. | ||
* Added a "getting started" section to this README. | ||
|
||
October 2017 | ||
* Added V9.0.4 constant definitions - now generated from original MQ source code | ||
* Added MQSC script to show how to redefine event queues for pub/sub | ||
* Prometheus collector has new parameter to override the first component of the metric name | ||
* Prometheus collector can now process channel-level statistics | ||
## 23 Aug 2016 | ||
|
||
March 2018 | ||
* Added V9.0.5 constant definitions | ||
* Changed #cgo directives for Windows now the compiler supports standard path names | ||
* Added mechanism to set MQ userid and password for Prometheus monitor | ||
* Added a collector for Amazon AWS CloudWatch monitoring. See the [README](cmd/mq_aws/README.md) for more details. | ||
|
||
## 12 Aug 2016 | ||
|
||
* Added a OpenTSDB monitor. See the [README](cmd/mq_opentsdb/README.md) for more details. | ||
* Added a Collectd monitor. See the [README](cmd/mq_coll/README.md) for more details. | ||
* Added MQI MQCNO/MQCSP structures to support client connections and password authentication with MQCONNX. | ||
* Allow client-mode connections from the monitor programs | ||
* Added Grafana dashboards for the different monitors to show how to query them | ||
* Changed database password mechanism so that "exec" maintains the PID for MQ services | ||
|
||
## 04 Aug 2016 | ||
|
||
* Added a monitor command for exporting MQ data to InfluxDB. See the [README](cmd/mq_influx/README.md) for more details | ||
* Restructured the monitoring code to put common material in the mqmetric package, called from the Influx and Prometheus monitors. | ||
|
||
## 25 Jul 2016 | ||
|
||
* Added functions to handle basic PCF creation and parsing | ||
* Added a monitor command for exporting MQ V9 queue manager data to Prometheus. See the [README](cmd/mq_prometheus/README.md) for more details | ||
|
||
## 18 Jul 2016 | ||
|
||
* Changed structures so that most applications will not need to use cgo to imbed the MQ C headers | ||
* Go programs will now use int32 where C programs use MQLONG | ||
* Use of message handles, distribution lists require cgo for now | ||
* Package ibmmq now includes the numeric #defines as a Go file, cmqc.go, for easier use | ||
* Removed "src/" prefix from tree in github repo | ||
* Removed need for buffer length parm on Put/Put1 | ||
* Updated comments | ||
* Added MQINQ | ||
* Added MQItoString function for some maps of values to constant names | ||
|
||
## 08 Jul 2016 | ||
|
||
* Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# © Copyright IBM Corporation 2018 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
ARG BASE_IMAGE=mq-sdk:9.0.5.0-x86_64-ubuntu-16.04 | ||
|
||
FROM $BASE_IMAGE | ||
|
||
ENV GO_VERSION=1.10 | ||
|
||
# Install the Go compiler and Git | ||
RUN export DEBIAN_FRONTEND=noninteractive \ | ||
&& bash -c 'source /etc/os-release; \ | ||
echo "deb http://archive.ubuntu.com/ubuntu/ ${UBUNTU_CODENAME} main restricted" > /etc/apt/sources.list; \ | ||
echo "deb http://archive.ubuntu.com/ubuntu/ ${UBUNTU_CODENAME}-updates main restricted" >> /etc/apt/sources.list; \ | ||
echo "deb http://archive.ubuntu.com/ubuntu/ ${UBUNTU_CODENAME}-backports main restricted universe" >> /etc/apt/sources.list;' \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends golang-${GO_VERSION} git ca-certificates \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV PATH="${PATH}:/usr/lib/go-${GO_VERSION}/bin:/go/bin" \ | ||
CGO_CFLAGS="-I/opt/mqm/inc/" \ | ||
CGO_LDFLAGS_ALLOW="-Wl,-rpath.*" \ | ||
GOPATH="/go" \ | ||
OUTPUT_DIR="${OUTPUT_DIR}" | ||
|
||
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" "$GOPATH/pkg" \ | ||
&& chmod -R 777 "$GOPATH" \ | ||
&& mkdir -p "$GOPATH/src/github.com/ibm-messaging/mq-golang" | ||
|
||
WORKDIR $GOPATH/src/github.com/ibm-messaging/mq-golang | ||
|
||
COPY ./ibmmq ibmmq | ||
COPY ./mqmetric mqmetric | ||
|
||
RUN go build ./ibmmq \ | ||
&& go test ./ibmmq \ | ||
&& go build ./mqmetric \ | ||
&& go test ./mqmetric |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# © Copyright IBM Corporation 2018 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
ARG BASE_IMAGE=mq-golang-build:9.0.5.0-x86_64-ubuntu-16.04 | ||
|
||
FROM $BASE_IMAGE | ||
|
||
RUN mkdir -p "$GOPATH/src/github.com/ibm-messaging/mq-golang/samples" | ||
WORKDIR $GOPATH/src/github.com/ibm-messaging/mq-golang/samples | ||
|
||
COPY ./samples/clientconn clientconn | ||
COPY ./samples/mqitest mqitest | ||
|
||
RUN go install ./clientconn \ | ||
&& go install ./mqitest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# © Copyright IBM Corporation 2018 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
############################################################################### | ||
# Conditional variables - you can override the values of these variables from | ||
# the command line | ||
############################################################################### | ||
# BASE_IMAGE is the MQ SDK base image to use | ||
BASE_IMAGE ?= mq-sdk:9.0.5.0-x86_64-ubuntu-16.04 | ||
# GO_IMAGE is the GOLANG image to use for building samples | ||
GO_IMAGE ?= golang:1.10 | ||
# DOCKER is the Docker command to run | ||
DOCKER ?= docker | ||
# BUILD_IMAGE is the name of the image that will be produced while building packages | ||
BUILD_IMAGE ?= mq-golang-build:9.0.5.0-x86_64-ubuntu-16.04 | ||
# SAMPLE_BUILD_IMAGE is the name of the image that will be produced while building samples | ||
SAMPLE_BUILD_IMAGE ?= mq-sample-build:9.0.5.0-x86_64-ubuntu-16.04 | ||
|
||
############################################################################### | ||
# Other variables | ||
############################################################################### | ||
|
||
ifneq (,$(findstring Microsoft,$(shell uname -r))) | ||
PLATFORM=WINDOWS | ||
else | ||
PLATFORM=UNIX | ||
endif | ||
|
||
############################################################################### | ||
# Build targets | ||
############################################################################### | ||
|
||
# Build all packages when on unix | ||
.PHONY: all | ||
ifeq ("$(PLATFORM)", "WINDOWS") | ||
all: unsupported-message | ||
else | ||
all: build-packages-unix build-samples-unix | ||
endif | ||
|
||
.PHONY: clean | ||
clean: | ||
$(DOCKER) rmi -f $(BUILD_IMAGE) | ||
$(DOCKER) rmi -f $(SAMPLE_BUILD_IMAGE) | ||
|
||
.PHONY: build-packages-unix | ||
build-packages-unix: | ||
$(info $(SPACER)$(shell printf $(TITLE)"Building packages in build container"$(END))) | ||
$(call docker-build,$(BUILD_IMAGE),Dockerfile-build-packages,$(BASE_IMAGE)) | ||
|
||
.PHONY: build-samples-unix | ||
build-samples-unix: build-packages-unix | ||
$(info $(SPACER)$(shell printf $(TITLE)"Building samples in build container"$(END))) | ||
$(call docker-build,$(SAMPLE_BUILD_IMAGE),Dockerfile-build-samples,$(BUILD_IMAGE)) | ||
|
||
.PHONY: unsupported-message | ||
unsupported-message: | ||
$(info $(SPACER)$(shell printf $(TITLE)"This makefile can only be ran on UNIX platforms"$(END))) | ||
|
||
define docker-build | ||
# Build the image first to compile the package/samples | ||
$(DOCKER) build -t $1 \ | ||
-f $2 \ | ||
--build-arg BASE_IMAGE=$3 \ | ||
. | ||
endef | ||
|
||
include formatting.mk |
Oops, something went wrong.