Skip to content

Commit

Permalink
feat(configV4): migrate config file to v4 (#67)
Browse files Browse the repository at this point in the history
* feat(configV4): migrate config file to v4
  • Loading branch information
paologallinaharbur authored Aug 27, 2021
1 parent 0fabf42 commit 8fed65f
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 40 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ 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/).

## 1.7.0 (2021-06-08)
### 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.

## 1.6.1 (2021-06-08)
### Changed
- Support for ARM
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ FROM newrelic/infrastructure:latest
ENV NRIA_IS_FORWARD_ONLY true
ENV NRIA_K8S_INTEGRATION true
COPY --from=builder-apache /go/src/github.com/newrelic/nri-apache/bin/nri-apache /nri-sidecar/newrelic-infra/newrelic-integrations/bin/nri-apache
COPY --from=builder-apache /go/src/github.com/newrelic/nri-apache/apache-definition.yml /nri-sidecar/newrelic-infra/newrelic-integrations/definition.yaml
USER 1000
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ integration-test:
install: compile
@echo "=== $(INTEGRATION) === [ install ]: installing bin/$(BINARY_NAME)..."
@sudo install -D --mode=755 --owner=root --strip $(ROOT)bin/$(BINARY_NAME) $(INTEGRATIONS_DIR)/bin/$(BINARY_NAME)
@sudo install -D --mode=644 --owner=root $(ROOT)$(INTEGRATION)-definition.yml $(INTEGRATIONS_DIR)/$(INTEGRATION)-definition.yml
@sudo install -D --mode=644 --owner=root $(ROOT)$(INTEGRATION)-config.yml.sample $(CONFIG_DIR)/$(INTEGRATION)-config.yml.sample

# Include thematic Makefiles
Expand Down
81 changes: 48 additions & 33 deletions apache-config.yml.sample
Original file line number Diff line number Diff line change
@@ -1,37 +1,52 @@
integration_name: com.newrelic.apache
integrations:
- name: nri-apache
env:
METRICS: "true"
# status_url is used to identify the monitored entity to which the inventory will be attached.
STATUS_URL: http://127.0.0.1/server-status?auto

instances:
- name: apache-server-metrics
command: metrics
arguments:
status_url: http://127.0.0.1/server-status?auto
# Alternative Certificate Authority bundle directory and file
# CA_BUNDLE_DIR: ""
# CA_BUNDLE_FILE: ""
# Set this to false if you want to avoid certificate validation
# VALIDATE_CERTS: true

# New users should leave this property as `true`, to identify the
# monitored entities as `remote`. Setting this property to `false` (the
# default value) is deprecated and will be removed soon, disallowing
# entities that are identified as `local`.
# Please check the documentation to get more information about local
# versus remote entities:
# https://github.com/newrelic/infra-integrations-sdk/blob/master/docs/entity-definition.md
remote_monitoring: true
labels:
env: production
role: load_balancer
- name: apache-server-inventory
command: inventory
arguments:
# New users should leave this property as `true`, to identify the
# monitored entities as `remote`. Setting this property to `false` (the
# default value) is deprecated and will be removed soon, disallowing
# entities that are identified as `local`.
# Please check the documentation to get more information about local
# versus remote entities:
# https://github.com/newrelic/infra-integrations-sdk/blob/master/docs/entity-definition.md
REMOTE_MONITORING: true
interval: 15s
labels:
env: production
role: load_balancer

# New users should leave this property as `true`, to identify the
# monitored entities as `remote`. Setting this property to `false` (the
# default value) is deprecated and will be removed soon, disallowing
# entities that are identified as `local`.
# Please check the documentation to get more information about local
# versus remote entities:
# https://github.com/newrelic/infra-integrations-sdk/blob/master/docs/entity-definition.md
remote_monitoring: true
- name: nri-apache
env:
INVENTORY: "true"
# status_url is used to identify the monitored entity to which the inventory will be attached.
STATUS_URL: http://127.0.0.1/server-status?auto

# Alternative Certificate Authority bundle directory and file
# CA_BUNDLE_DIR: ""
# CA_BUNDLE_FILE: ""
# Set this to false if you want to avoid certificate validation
# VALIDATE_CERTS: true

# New users should leave this property as `true`, to identify the
# monitored entities as `remote`. Setting this property to `false` (the
# default value) is deprecated and will be removed soon, disallowing
# entities that are identified as `local`.
# Please check the documentation to get more information about local
# versus remote entities:
# https://github.com/newrelic/infra-integrations-sdk/blob/master/docs/entity-definition.md
REMOTE_MONITORING: true
interval: 60s
labels:
env: production
role: load_balancer
inventory_source: config/apache

# status_url is used to identify the monitored entity to which the inventory will be attached.
status_url: http://127.0.0.1/server-status?auto
labels:
env: production
role: load_balancer
12 changes: 8 additions & 4 deletions build/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ nfpms:
- nri-nix

dependencies:
- "newrelic-infra"
- newrelic-infra (>= 1.20.0)

bindir: "/var/db/newrelic-infra/newrelic-integrations/bin"

Expand All @@ -55,7 +55,7 @@ nfpms:
dst: "/usr/share/doc/nri-apache/README.md"
- src: "LICENSE"
dst: "/usr/share/doc/nri-apache/LICENSE"
- src: "apache-definition.yml"
- src: "legacy/apache-definition.yml"
dst: "/var/db/newrelic-infra/newrelic-integrations/apache-definition.yml"
type: config

Expand All @@ -77,7 +77,9 @@ archives:
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Version }}_{{ .Arch }}_dirty"
files:
- apache-config.yml.sample
- apache-definition.yml
- src: 'legacy/apache-definition.yml'
dst: .
strip_parent: true
format: tar.gz

- id: nri-win
Expand All @@ -86,7 +88,9 @@ archives:
name_template: "{{ .ProjectName }}-{{ .Arch }}.{{ .Version }}_dirty"
files:
- apache-config.yml.sample
- apache-win-definition.yml
- src: 'legacy/apache-win-definition.yml'
dst: .
strip_parent: true
format: zip

# we use custom publisher for fixing archives and signing them
Expand Down
2 changes: 1 addition & 1 deletion build/release.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BUILD_DIR := ./bin/
GORELEASER_VERSION := v0.169.0
GORELEASER_VERSION := v0.174.1
GORELEASER_BIN ?= bin/goreleaser

bin:
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 8fed65f

Please sign in to comment.