diff --git a/CHANGELOG.md b/CHANGELOG.md index 3322aa4..40253d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 2.7.0 (2021-09-30) +### Changed +- 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 + +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. + ## 2.6.1 (2021-06-09) ### Changed - Added support for ARM diff --git a/Dockerfile b/Dockerfile index 898e785..8de7852 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,5 +8,4 @@ FROM newrelic/infrastructure:latest ENV NRIA_IS_FORWARD_ONLY true ENV NRIA_K8S_INTEGRATION true COPY --from=builder /go/src/github.com/newrelic/nri-mongodb/bin/nri-mongodb /nri-sidecar/newrelic-infra/newrelic-integrations/bin/nri-mongodb -COPY --from=builder /go/src/github.com/newrelic/nri-mongodb/mongodb-definition.yml /nri-sidecar/newrelic-infra/newrelic-integrations/definition.yml USER 1000 diff --git a/build/.goreleaser.yml b/build/.goreleaser.yml index 0277bda..0ac3386 100644 --- a/build/.goreleaser.yml +++ b/build/.goreleaser.yml @@ -42,7 +42,7 @@ nfpms: - nri-nix dependencies: - - "newrelic-infra" + - newrelic-infra (>= 1.20.0) bindir: "/var/db/newrelic-infra/newrelic-integrations/bin" @@ -55,7 +55,7 @@ nfpms: dst: "/usr/share/doc/nri-mongodb/README.md" - src: "LICENSE" dst: "/usr/share/doc/nri-mongodb/LICENSE" - - src: "mongodb-definition.yml" + - src: "legacy/mongodb-definition.yml" dst: "/var/db/newrelic-infra/newrelic-integrations/mongodb-definition.yml" type: config @@ -77,7 +77,9 @@ archives: name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Version }}_{{ .Arch }}_dirty" files: - mongodb-config.yml.sample - - mongodb-definition.yml + - src: 'legacy/mongodb-definition.yml' + dst: . + strip_parent: true format: tar.gz - id: nri-win @@ -86,7 +88,9 @@ archives: name_template: "{{ .ProjectName }}-{{ .Arch }}.{{ .Version }}_dirty" files: - mongodb-config.yml.sample - - mongodb-win-definition.yml + - src: 'legacy/mongodb-win-definition.yml' + dst: . + strip_parent: true format: zip # we use custom publisher for fixing archives and signing them diff --git a/build/release.mk b/build/release.mk index 09cf564..7f34354 100644 --- a/build/release.mk +++ b/build/release.mk @@ -1,5 +1,5 @@ BUILD_DIR := ./bin/ -GORELEASER_VERSION := v0.169.0 +GORELEASER_VERSION := v0.174.1 GORELEASER_BIN ?= bin/goreleaser bin: diff --git a/mongodb-definition.yml b/legacy/mongodb-definition.yml similarity index 100% rename from mongodb-definition.yml rename to legacy/mongodb-definition.yml diff --git a/mongodb-win-definition.yml b/legacy/mongodb-win-definition.yml similarity index 100% rename from mongodb-win-definition.yml rename to legacy/mongodb-win-definition.yml diff --git a/mongodb-config.yml.sample b/mongodb-config.yml.sample index b1827c9..cc7ae61 100644 --- a/mongodb-config.yml.sample +++ b/mongodb-config.yml.sample @@ -1,43 +1,47 @@ -integration_name: com.newrelic.mongodb +integrations: +- name: nri-mongodb + env: + # The mongos to connect to + HOST: my-mongos.company.localnet + # The port the mongos is running on + PORT: "27017" -instances: - - name: all - # Available commands are "all", "metrics", and "inventory" - command: all - arguments: - # The mongos to connect to - host: my-mongos.company.localnet - # The port the mongos is running on - port: 27017 - # The username of the user created to monitor the cluster. - # This user should exist on the cluster as a whole as well - # as on each of the individual mongods. - username: monitor - # The password for the monitoring user - password: password - # The database on which the monitoring user is stored - auth_source: admin - # A user-defined cluster name. Required. - mongodb_cluster_name: testcluster - # Connect using SSL - ssl: true - # Skip verification of the certificate sent by the host. - # This can make the connection susceptible to man-in-the-middle attacks, - # and should only be used for testing - ssl_insecure_skip_verify: true - # Path to the CA certs file - ssl_ca_certs: /sample/path/to/ca_certs - # Client Certificate to present to the server (optional) - pem_key_file: /sample/file.pem - # Passphrase to decrypt PEMKeyFile file (optional) - passphrase: secret - # A JSON map of database names to an array of collection names. If empty, - # defaults to all databases and collections. If the list of collections is null, - # collects all collections for the database. - filters: '{"db1":null,"db2":["collection1","collection2"],"db3":[]}' - # The number of entities to collect metrics for concurrently. Tunable to - # limit CPU and memory usage - concurrent_collections: 50 - labels: - env: production - label: mongo-cluster-1 + # The username of the user created to monitor the cluster. + # This user should exist on the cluster as a whole as well + # as on each of the individual mongods. + USERNAME: monitor + # The password for the monitoring user + PASSWORD: password + # The database on which the monitoring user is stored + AUTH_SOURCE: admin + + # A user-defined cluster name. Required. + MONGODB_CLUSTER_NAME: testcluster + + # Connect using SSL + SSL: "true" + # Path to the CA certs file + SSL_CA_CERTS: /sample/path/to/ca_certs + # Skip verification of the certificate sent by the host. + # This can make the connection susceptible to man-in-the-middle attacks, + # and should only be used for testing + SSL_INSECURE_SKIP_VERIFY: "true" + # Passphrase to decrypt PEMKeyFile file (optional) + PASSPHRASE: secret + # Client Certificate to present to the server (optional) + PEM_KEY_FILE: /sample/file.pem + + # The number of entities to collect metrics for concurrently. Tunable to + # limit CPU and memory usage + CONCURRENT_COLLECTIONS: "50" + + # A JSON map of database names to an array of collection names. If empty, + # defaults to all databases and collections. If the list of collections is null, + # collects all collections for the database. + FILTERS: '{"db1":null,"db2":["collection1","collection2"],"db3":[]}' + + interval: 15s + labels: + env: production + label: mongo-cluster-1 + inventory_source: config/mongodb