From 56d7ea47159e7225e06d76d10ac16a59503794c2 Mon Sep 17 00:00:00 2001 From: Ryan Thorn <106628688+rthorn-nr@users.noreply.github.com> Date: Tue, 20 Jun 2023 13:43:31 -0700 Subject: [PATCH] SUSE 15-SPx logs support (#936) * chore: Add alternate SP-x match for suse logs * chore: Add tests for suse 15-SP4 infra/logs --- .../infrastructure/logs/linux-logs.yml | 4 +-- .../infra-agent/suse154-infra.json | 34 +++++++++++++++++++ test/definitions/logging/suse154-logs.json | 34 +++++++++++++++++++ 3 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 test/definitions/infra-agent/suse154-infra.json create mode 100644 test/definitions/logging/suse154-logs.json diff --git a/recipes/newrelic/infrastructure/logs/linux-logs.yml b/recipes/newrelic/infrastructure/logs/linux-logs.yml index 248d09845..9ac295a1d 100644 --- a/recipes/newrelic/infrastructure/logs/linux-logs.yml +++ b/recipes/newrelic/infrastructure/logs/linux-logs.yml @@ -46,8 +46,8 @@ installTargets: platformVersion: "((7|8|9)\\.?.*)" - type: host os: linux - platform: "suse" - platformVersion: "15\\.[1-4]" + platformFamily: suse + platformVersion: "(15\\.[1-4]|15-SP[1-4])" kernelArch: x86_64 # ARM supported - type: host diff --git a/test/definitions/infra-agent/suse154-infra.json b/test/definitions/infra-agent/suse154-infra.json new file mode 100644 index 000000000..1efd24ff7 --- /dev/null +++ b/test/definitions/infra-agent/suse154-infra.json @@ -0,0 +1,34 @@ +{ + "global_tags": { + "owning_team": "virtuoso", + "Environment": "development", + "Department": "product", + "Product": "virtuoso" + }, + "resources": [ + { + "id": "host1", + "provider": "aws", + "type": "ec2", + "size": "t3.nano", + "ami_name": "suse-sles-15-sp4-v????????-hvm-*" + } + ], + "instrumentations": { + "resources": [ + { + "id": "nr_infra_suse154", + "resource_ids": [ + "host1" + ], + "provider": "newrelic", + "source_repository": "https://github.com/newrelic/open-install-library", + "deploy_script_path": "test/deploy/linux/newrelic-cli/install/roles", + "params": { + "validate_output": "Infrastructure Agent\\s+\\(installed\\)", + "local_recipes": true + } + } + ] + } +} \ No newline at end of file diff --git a/test/definitions/logging/suse154-logs.json b/test/definitions/logging/suse154-logs.json new file mode 100644 index 000000000..8d50478d2 --- /dev/null +++ b/test/definitions/logging/suse154-logs.json @@ -0,0 +1,34 @@ +{ + "global_tags": { + "owning_team": "virtuoso", + "Environment": "development", + "Department": "product", + "Product": "virtuoso" + }, + "resources": [ + { + "id": "suse154-logs", + "provider": "aws", + "type": "ec2", + "size": "t3.nano", + "ami_name": "suse-sles-15-sp4-v????????-hvm-*" + } + ], + "instrumentations": { + "resources": [ + { + "id": "nr_infra_suse154", + "resource_ids": [ + "suse154-logs" + ], + "provider": "newrelic", + "source_repository": "https://github.com/newrelic/open-install-library", + "deploy_script_path": "test/deploy/linux/newrelic-cli/install/roles", + "params": { + "validate_output": "Logs Integration\\s+\\(installed\\)", + "local_recipes": true + } + } + ] + } +} \ No newline at end of file