Skip to content

Commit f66e2eb

Browse files
Migrating to config v4 (#86)
- feat(configV4): migrate config file to v4
1 parent 0f538d5 commit f66e2eb

9 files changed

Lines changed: 55 additions & 50 deletions

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## 2.5.0
9+
### Added
10+
11+
- Moved default config.sample to [V4](https://docs.newrelic.com/docs/create-integrations/infrastructure-integrations-sdk/specifications/host-integrations-newer-configuration-format/), added a dependency for infra-agent version 1.20.0
12+
13+
Please notice that old [V3](https://docs.newrelic.com/docs/create-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format/) configuration format is deprecated, but still supported.
14+
815
## 2.4.7 (2021-06-10)
916
### Changed
1017
- ARM support

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ RUN apk --update add openjdk8-jre
1616
COPY --from=builder-mvn /nrjmx/bin/nrjmx /usr/bin/nrjmx
1717
COPY --from=builder-mvn /nrjmx/bin/nrjmx.jar /usr/bin/nrjmx.jar
1818
COPY --from=builder /go/src/github.com/newrelic/nri-jmx/bin/nri-jmx /nri-sidecar/newrelic-infra/newrelic-integrations/bin/nri-jmx
19-
COPY --from=builder /go/src/github.com/newrelic/nri-jmx/jmx-definition.yml /nri-sidecar/newrelic-infra/newrelic-integrations/definition.yaml
2019
USER 1000

build/.goreleaser.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,20 @@ nfpms:
5959
dst: "/usr/share/doc/nri-jmx/README.md"
6060
- src: "LICENSE"
6161
dst: "/usr/share/doc/nri-jmx/LICENSE"
62-
- src: "jmx-definition.yml"
62+
- src: "legacy/jmx-definition.yml"
6363
dst: "/var/db/newrelic-infra/newrelic-integrations/jmx-definition.yml"
6464

6565
overrides:
6666
deb:
6767
dependencies:
68-
- newrelic-infra
68+
- newrelic-infra (>= 1.20.0)
6969
- nrjmx (>= 1.5.3)
7070
rpm:
7171
file_name_template: "{{ .ProjectName }}-{{ .Version }}-1.{{ .Arch }}"
7272
replacements:
7373
amd64: x86_64
7474
dependencies:
75-
- newrelic-infra
75+
- newrelic-infra (>= 1.20.0)
7676
- nrjmx >= 1.5.3
7777

7878
# Formats to be generated.
@@ -87,7 +87,9 @@ archives:
8787
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Version }}_{{ .Arch }}_dirty"
8888
files:
8989
- jmx-config.yml.sample
90-
- jmx-definition.yml
90+
- src: 'legacy/jmx-definition.yml'
91+
dst: .
92+
strip_parent: true
9193
- jvm-metrics.yml.sample
9294
format: tar.gz
9395

@@ -97,7 +99,9 @@ archives:
9799
name_template: "{{ .ProjectName }}-{{ .Arch }}.{{ .Version }}_dirty"
98100
files:
99101
- jmx-win-config.yml.sample
100-
- jmx-win-definition.yml
102+
- src: 'legacy/jmx-win-definition.yml'
103+
dst: .
104+
strip_parent: true
101105
- jvm-metrics.yml.sample
102106
format: zip
103107

build/release.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BUILD_DIR := ./bin/
2-
GORELEASER_VERSION := v0.169.0
2+
GORELEASER_VERSION := v0.174.1
33
GORELEASER_BIN ?= bin/goreleaser
44

55
bin:

jmx-config.yml.sample

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
integration_name: com.newrelic.jmx
2-
3-
instances:
4-
- name: jmx
5-
command: all_data
6-
arguments:
7-
jmx_host: jmx-host.localnet
8-
jmx_port: 9999
9-
jmx_user: admin
10-
jmx_pass: admin
11-
collection_files: "/etc/newrelic-infra/integrations.d/jvm-metrics.yml,/etc/newrelic-infra/integrations.d/tomcat-metrics.yml"
12-
labels:
13-
env: staging
1+
integrations:
2+
- name: nri-jmx
3+
env:
4+
COLLECTION_FILES: "/etc/newrelic-infra/integrations.d/jvm-metrics.yml,/etc/newrelic-infra/integrations.d/tomcat-metrics.yml"
5+
JMX_HOST: jmx-host.localnet
6+
JMX_PASS: admin
7+
JMX_PORT: "9999"
8+
JMX_USER: admin
9+
interval: 15s
10+
labels:
11+
env: staging

jmx-ssl-config.yml.sample

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
integration_name: com.newrelic.jmx
2-
3-
instances:
4-
- name: jmx
5-
command: all_data
6-
arguments:
7-
jmx_host: jmx-host.localnet
8-
jmx_port: 9999
9-
jmx_user: admin
10-
jmx_pass: admin
11-
key_store: /etc/pki/JMXClientKeyStore.key
12-
key_store_password: password
13-
trust_store: /etc/pki/JMXClientTrustStore.key
14-
trust_store_password: password
15-
collection_files: "/etc/newrelic-infra/integrations.d/jvm-metrics.yml,/etc/newrelic-infra/integrations.d/tomcat-metrics.yml"
16-
labels:
17-
env: staging
1+
integrations:
2+
- name: nri-jmx
3+
env:
4+
COLLECTION_FILES: "/etc/newrelic-infra/integrations.d/jvm-metrics.yml,/etc/newrelic-infra/integrations.d/tomcat-metrics.yml"
5+
JMX_HOST: jmx-host.localnet
6+
JMX_PASS: admin
7+
JMX_PORT: "9999"
8+
JMX_USER: admin
9+
KEY_STORE: /etc/pki/JMXClientKeyStore.key
10+
KEY_STORE_PASSWORD: password
11+
TRUST_STORE: /etc/pki/JMXClientTrustStore.key
12+
TRUST_STORE_PASSWORD: password
13+
interval: 15s
14+
labels:
15+
env: staging

jmx-win-config.yml.sample

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
integration_name: com.newrelic.jmx
2-
3-
instances:
4-
- name: jmx
5-
command: all_data
6-
arguments:
7-
jmx_host: jmx-host.localnet
8-
jmx_port: 9999
9-
jmx_user: admin
10-
jmx_pass: admin
11-
collection_files: "C:\\Program Files\\New Relic\\newrelic-infra\\integrations.d\\jvm-metrics.yml"
12-
labels:
13-
env: staging
1+
integrations:
2+
- name: nri-jmx
3+
env:
4+
COLLECTION_FILES: "C:\\Program Files\\New Relic\\newrelic-infra\\integrations.d\\jvm-metrics.yml"
5+
JMX_HOST: jmx-host.localnet
6+
JMX_PASS: admin
7+
JMX_PORT: "9999"
8+
JMX_USER: admin
9+
NR_JMX: "C:\\Program Files\\New Relic\\nrjmx\\nrjmx.bat"
10+
interval: 15s
11+
labels:
12+
env: staging

0 commit comments

Comments
 (0)