From 40b20452bcd6dc39d3984fd451112bb65993b295 Mon Sep 17 00:00:00 2001 From: NSSPKrishna Date: Tue, 30 Sep 2025 16:09:58 +0530 Subject: [PATCH] feat: Added fips installation methods --- .../infrastructure/ohi/apache/debian.yml | 8 ++++- .../infrastructure/ohi/apache/rhel.yml | 8 ++++- .../infrastructure/ohi/cassandra/debian.yml | 8 ++++- .../infrastructure/ohi/cassandra/rhel.yml | 8 ++++- .../infrastructure/ohi/consul/debian.yml | 8 ++++- .../infrastructure/ohi/consul/rhel.yml | 8 ++++- .../infrastructure/ohi/couchbase/debian.yml | 8 ++++- .../infrastructure/ohi/couchbase/rhel.yml | 8 ++++- .../ohi/elasticsearch/debian.yml | 8 ++++- .../infrastructure/ohi/elasticsearch/rhel.yml | 8 ++++- .../infrastructure/ohi/elasticsearch/suse.yml | 8 ++++- .../infrastructure/ohi/haproxy/debian.yml | 8 ++++- .../infrastructure/ohi/haproxy/rhel.yml | 8 ++++- .../infrastructure/ohi/memcached/debian.yml | 8 ++++- .../infrastructure/ohi/memcached/rhel.yml | 8 ++++- .../infrastructure/ohi/mongodb/debian.yml | 8 ++++- .../infrastructure/ohi/mongodb/rhel.yml | 8 ++++- .../infrastructure/ohi/mysql/debian.yml | 8 ++++- .../newrelic/infrastructure/ohi/mysql/rds.yml | 32 ++++++++++++++++--- .../infrastructure/ohi/mysql/rhel.yml | 8 ++++- .../infrastructure/ohi/mysql/suse.yml | 8 ++++- .../infrastructure/ohi/nagios/debian.yml | 8 ++++- .../infrastructure/ohi/nagios/rhel.yml | 8 ++++- .../infrastructure/ohi/nginx/linux.yml | 16 ++++++++-- .../infrastructure/ohi/nginx/suse.yml | 8 ++++- .../infrastructure/ohi/postgres/debian.yml | 8 ++++- .../infrastructure/ohi/postgres/rhel.yml | 8 ++++- .../infrastructure/ohi/rabbitmq/debian.yml | 8 ++++- .../infrastructure/ohi/rabbitmq/rhel.yml | 8 ++++- .../infrastructure/ohi/redis/debian.yml | 8 ++++- .../infrastructure/ohi/redis/rhel.yml | 8 ++++- .../infrastructure/ohi/varnish/debian.yml | 8 ++++- .../infrastructure/ohi/varnish/rhel.yml | 8 ++++- 33 files changed, 259 insertions(+), 37 deletions(-) diff --git a/recipes/newrelic/infrastructure/ohi/apache/debian.yml b/recipes/newrelic/infrastructure/ohi/apache/debian.yml index b6371536f..5d155e055 100644 --- a/recipes/newrelic/infrastructure/ohi/apache/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/apache/debian.yml @@ -97,7 +97,13 @@ install: sudo mkdir -p "/etc/newrelic-infra/integrations.d" # Get latest definitions and skip any failure because of deprecation - sudo apt-get install nri-apache -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-apache-fips..." + sudo apt-get install nri-apache-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-apache..." + sudo apt-get install nri-apache -y + fi if [ -f /etc/newrelic-infra/integrations.d/apache-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/apache-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/apache/rhel.yml b/recipes/newrelic/infrastructure/ohi/apache/rhel.yml index 2ddd48330..587c70d27 100644 --- a/recipes/newrelic/infrastructure/ohi/apache/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/apache/rhel.yml @@ -153,7 +153,13 @@ install: sudo mkdir -p "/etc/newrelic-infra/integrations.d" sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' - sudo yum install nri-apache -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-apache-fips..." + sudo yum install nri-apache-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-apache..." + sudo yum install nri-apache -y + fi if [ -f /etc/newrelic-infra/integrations.d/apache-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/apache-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/cassandra/debian.yml b/recipes/newrelic/infrastructure/ohi/cassandra/debian.yml index 1ad53173b..d2ac63ac3 100644 --- a/recipes/newrelic/infrastructure/ohi/cassandra/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/cassandra/debian.yml @@ -173,7 +173,13 @@ install: # Get latest definitions and skip any failure because of deprecation sudo apt-get -o Acquire::Check-Valid-Until=false update -yq - sudo apt-get install nri-cassandra -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-cassandra-fips..." + sudo apt-get install nri-cassandra-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-cassandra..." + sudo apt-get install nri-cassandra -y + fi if [ -f /etc/newrelic-infra/integrations.d/cassandra-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/cassandra-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/cassandra/rhel.yml b/recipes/newrelic/infrastructure/ohi/cassandra/rhel.yml index 77ea26511..420d4d02a 100644 --- a/recipes/newrelic/infrastructure/ohi/cassandra/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/cassandra/rhel.yml @@ -176,7 +176,13 @@ install: sudo mkdir -p "/etc/newrelic-infra/integrations.d" sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' - sudo yum install nri-cassandra -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-cassandra-fips..." + sudo yum install nri-cassandra-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-cassandra..." + sudo yum install nri-cassandra -y + fi if [ -f /etc/newrelic-infra/integrations.d/cassandra-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/cassandra-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/consul/debian.yml b/recipes/newrelic/infrastructure/ohi/consul/debian.yml index 4e7a412bb..3940ffb51 100644 --- a/recipes/newrelic/infrastructure/ohi/consul/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/consul/debian.yml @@ -91,7 +91,13 @@ install: # Get latest definitions and skip any failure because of deprecation sudo apt-get -o Acquire::Check-Valid-Until=false update -yq - | - sudo apt-get install nri-consul -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-consul-fips..." + sudo apt-get install nri-consul-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-consul..." + sudo apt-get install nri-consul -y + fi - | if [ -f /etc/newrelic-infra/integrations.d/consul-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/consul-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/consul/rhel.yml b/recipes/newrelic/infrastructure/ohi/consul/rhel.yml index 4ed7e8499..362bdc557 100644 --- a/recipes/newrelic/infrastructure/ohi/consul/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/consul/rhel.yml @@ -91,7 +91,13 @@ install: - | sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' - | - sudo yum install nri-consul -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-consul-fips..." + sudo yum install nri-consul-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-consul..." + sudo yum install nri-consul -y + fi - | if [ -f /etc/newrelic-infra/integrations.d/consul-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/consul-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/couchbase/debian.yml b/recipes/newrelic/infrastructure/ohi/couchbase/debian.yml index b4e24b923..cc95c400d 100644 --- a/recipes/newrelic/infrastructure/ohi/couchbase/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/couchbase/debian.yml @@ -95,7 +95,13 @@ install: # Get latest definitions and skip any failure because of deprecation sudo apt-get -o Acquire::Check-Valid-Until=false update -yq - | - sudo apt-get install nri-couchbase -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-couchbase-fips..." + sudo apt-get install nri-couchbase-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-couchbase..." + sudo apt-get install nri-couchbase -y + fi - | if [ -f /etc/newrelic-infra/integrations.d/couchbase-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/couchbase-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/couchbase/rhel.yml b/recipes/newrelic/infrastructure/ohi/couchbase/rhel.yml index da997e331..18c165e9b 100644 --- a/recipes/newrelic/infrastructure/ohi/couchbase/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/couchbase/rhel.yml @@ -98,7 +98,13 @@ install: - | sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' - | - sudo yum install nri-couchbase -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-couchbase-fips..." + sudo yum install nri-couchbase-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-couchbase..." + sudo yum install nri-couchbase -y + fi - | if [ -f /etc/newrelic-infra/integrations.d/couchbase-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/couchbase-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/elasticsearch/debian.yml b/recipes/newrelic/infrastructure/ohi/elasticsearch/debian.yml index 482568038..8a608c9f0 100644 --- a/recipes/newrelic/infrastructure/ohi/elasticsearch/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/elasticsearch/debian.yml @@ -114,7 +114,13 @@ install: # Get latest definitions and skip any failure because of deprecation sudo apt-get -o Acquire::Check-Valid-Until=false update -yq - | - sudo apt-get install nri-elasticsearch -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-elasticsearch-fips..." + sudo apt-get install nri-elasticsearch-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-elasticsearch..." + sudo apt-get install nri-elasticsearch -y + fi - | if [ -f /etc/newrelic-infra/integrations.d/elasticsearch-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/elasticsearch-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/elasticsearch/rhel.yml b/recipes/newrelic/infrastructure/ohi/elasticsearch/rhel.yml index a62dea671..e2616c657 100644 --- a/recipes/newrelic/infrastructure/ohi/elasticsearch/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/elasticsearch/rhel.yml @@ -116,7 +116,13 @@ install: - | sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' - | - sudo yum install nri-elasticsearch -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-elasticsearch-fips..." + sudo yum install nri-elasticsearch-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-elasticsearch..." + sudo yum install nri-elasticsearch -y + fi - | if [ -f /etc/newrelic-infra/integrations.d/elasticsearch-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/elasticsearch-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/elasticsearch/suse.yml b/recipes/newrelic/infrastructure/ohi/elasticsearch/suse.yml index 4d3729bf5..1a076549c 100644 --- a/recipes/newrelic/infrastructure/ohi/elasticsearch/suse.yml +++ b/recipes/newrelic/infrastructure/ohi/elasticsearch/suse.yml @@ -110,7 +110,13 @@ install: - | sudo zypper -n update - | - sudo zypper -n install nri-elasticsearch + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-elasticsearch-fips..." + sudo zypper -n install nri-elasticsearch-fips + else + echo "FIPS mode not enabled. Installing newrelic-elasticsearch..." + sudo zypper -n install nri-elasticsearch + fi - | if [ -f /etc/newrelic-infra/integrations.d/elasticsearch-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/elasticsearch-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/haproxy/debian.yml b/recipes/newrelic/infrastructure/ohi/haproxy/debian.yml index 7d43f1f0b..8388eeff6 100644 --- a/recipes/newrelic/infrastructure/ohi/haproxy/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/haproxy/debian.yml @@ -83,7 +83,13 @@ install: # Get latest definitions and skip any failure because of deprecation sudo apt-get -o Acquire::Check-Valid-Until=false update -yq - | - sudo apt-get install nri-haproxy -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-haproxy-fips..." + sudo apt-get install nri-haproxy-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-haproxy..." + sudo apt-get install nri-haproxy -y + fi - | if [ -f /etc/newrelic-infra/integrations.d/haproxy-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/haproxy-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/haproxy/rhel.yml b/recipes/newrelic/infrastructure/ohi/haproxy/rhel.yml index 83674baef..77a2698b0 100644 --- a/recipes/newrelic/infrastructure/ohi/haproxy/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/haproxy/rhel.yml @@ -85,7 +85,13 @@ install: - | sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' - | - sudo yum install nri-haproxy -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-haproxy-fips..." + sudo yum install nri-haproxy-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-haproxy..." + sudo yum install nri-haproxy -y + fi - | if [ -f /etc/newrelic-infra/integrations.d/haproxy-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/haproxy-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/memcached/debian.yml b/recipes/newrelic/infrastructure/ohi/memcached/debian.yml index 6b554cba5..75f7a6610 100644 --- a/recipes/newrelic/infrastructure/ohi/memcached/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/memcached/debian.yml @@ -85,7 +85,13 @@ install: cmds: - | sudo mkdir -p "/etc/newrelic-infra/integrations.d" - sudo apt-get install nri-memcached -y > /dev/null + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-memcached-fips..." + sudo apt-get install nri-memcached-fips -y > /dev/null + else + echo "FIPS mode not enabled. Installing newrelic-memcached..." + sudo apt-get install nri-memcached -y > /dev/null + fi NEW_RELIC_ASSUME_YES="{{.NEW_RELIC_ASSUME_YES}}" if [[ "$NEW_RELIC_ASSUME_YES" != "true" ]] ; then diff --git a/recipes/newrelic/infrastructure/ohi/memcached/rhel.yml b/recipes/newrelic/infrastructure/ohi/memcached/rhel.yml index 6c80cd71d..a216d6d84 100644 --- a/recipes/newrelic/infrastructure/ohi/memcached/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/memcached/rhel.yml @@ -86,7 +86,13 @@ install: cmds: - | sudo mkdir -p "/etc/newrelic-infra/integrations.d" - sudo yum install nri-memcached -y > /dev/null + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-memcached-fips..." + sudo yum install nri-memcached-fips -y > /dev/null + else + echo "FIPS mode not enabled. Installing newrelic-memcached..." + sudo yum install nri-memcached -y > /dev/null + fi NEW_RELIC_ASSUME_YES="{{.NEW_RELIC_ASSUME_YES}}" if [[ "$NEW_RELIC_ASSUME_YES" != "true" ]] ; then diff --git a/recipes/newrelic/infrastructure/ohi/mongodb/debian.yml b/recipes/newrelic/infrastructure/ohi/mongodb/debian.yml index 24b9d29c5..4e59b0364 100644 --- a/recipes/newrelic/infrastructure/ohi/mongodb/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/mongodb/debian.yml @@ -152,7 +152,13 @@ install: cmds: - | mkdir -p "/etc/newrelic-infra/integrations.d" - apt-get install nri-mongodb3 -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-mongodb3-fips..." + apt-get install nri-mongodb3-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-mongodb3..." + apt-get install nri-mongodb3 -y + fi # Mongodb config file for New Relic Agent tee /etc/newrelic-infra/integrations.d/mongodb3-config.yml > /dev/null <<-EOT diff --git a/recipes/newrelic/infrastructure/ohi/mongodb/rhel.yml b/recipes/newrelic/infrastructure/ohi/mongodb/rhel.yml index 7a9c7d6bd..6c7653018 100644 --- a/recipes/newrelic/infrastructure/ohi/mongodb/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/mongodb/rhel.yml @@ -145,7 +145,13 @@ install: cmds: - | mkdir -p "/etc/newrelic-infra/integrations.d" - yum install nri-mongodb3 -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-mongodb3-fips..." + yum install nri-mongodb3-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-mongodb3..." + yum install nri-mongodb3 -y + fi # Mongodb config file for New Relic Agent tee /etc/newrelic-infra/integrations.d/mongodb3-config.yml > /dev/null <<-EOT diff --git a/recipes/newrelic/infrastructure/ohi/mysql/debian.yml b/recipes/newrelic/infrastructure/ohi/mysql/debian.yml index a47c1d7fc..155cdf1c0 100644 --- a/recipes/newrelic/infrastructure/ohi/mysql/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/mysql/debian.yml @@ -306,7 +306,13 @@ install: # Install the integration sudo mkdir -p "/etc/newrelic-infra/integrations.d" # Get latest definitions and skip any failure because of deprecation - sudo apt-get install nri-mysql -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-mysql-fips..." + sudo apt-get install nri-mysql-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-mysql..." + sudo apt-get install nri-mysql -y + fi if [ -f /etc/newrelic-infra/integrations.d/mysql-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/mysql-config.yml; fi diff --git a/recipes/newrelic/infrastructure/ohi/mysql/rds.yml b/recipes/newrelic/infrastructure/ohi/mysql/rds.yml index a2c33e867..e692a5181 100644 --- a/recipes/newrelic/infrastructure/ohi/mysql/rds.yml +++ b/recipes/newrelic/infrastructure/ohi/mysql/rds.yml @@ -133,13 +133,37 @@ install: echo "INFO: Attempting to install nri-mysql package..." # Attempt package installation using common Linux package managers if command -v apt-get > /dev/null; then - sudo apt-get update -yq && sudo apt-get install nri-mysql -yq + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing nri-mysql-fips..." + sudo apt-get update -yq && sudo apt-get install nri-mysql-fips -yq + else + echo "FIPS mode not enabled. Installing nri-mysql..." + sudo apt-get update -yq && sudo apt-get install nri-mysql -yq + fi elif command -v yum > /dev/null; then - sudo yum install nri-mysql -yq + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing nri-mysql-fips..." + sudo yum install nri-mysql-fips -yq + else + echo "FIPS mode not enabled. Installing nri-mysql..." + sudo yum install nri-mysql -yq + fi elif command -v dnf > /dev/null; then - sudo dnf install nri-mysql -yq + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing nri-mysql-fips..." + sudo dnf install nri-mysql-fips -yq + else + echo "FIPS mode not enabled. Installing nri-mysql..." + sudo dnf install nri-mysql -yq + fi elif command -v zypper > /dev/null; then - sudo zypper --non-interactive install nri-mysql + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing nri-mysql-fips..." + sudo zypper --non-interactive install nri-mysql-fips + else + echo "FIPS mode not enabled. Installing nri-mysql..." + sudo zypper --non-interactive install nri-mysql + fi else echo "ERROR: Unsupported package manager. Cannot install nri-mysql automatically." >&2 echo "Please install nri-mysql manually (e.g., from https://github.com/newrelic/nri-mysql/releases) and re-run." >&2 diff --git a/recipes/newrelic/infrastructure/ohi/mysql/rhel.yml b/recipes/newrelic/infrastructure/ohi/mysql/rhel.yml index 61efebba1..80fec5af7 100644 --- a/recipes/newrelic/infrastructure/ohi/mysql/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/mysql/rhel.yml @@ -297,7 +297,13 @@ install: # Install the integration sudo mkdir -p "/etc/newrelic-infra/integrations.d" sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' - sudo yum install nri-mysql -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-mysql-fips..." + sudo yum install nri-mysql-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-mysql..." + sudo yum install nri-mysql -y + fi if [ -f /etc/newrelic-infra/integrations.d/mysql-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/mysql-config.yml; fi diff --git a/recipes/newrelic/infrastructure/ohi/mysql/suse.yml b/recipes/newrelic/infrastructure/ohi/mysql/suse.yml index efcb4658e..d560c2441 100644 --- a/recipes/newrelic/infrastructure/ohi/mysql/suse.yml +++ b/recipes/newrelic/infrastructure/ohi/mysql/suse.yml @@ -253,7 +253,13 @@ install: # Install the integration sudo mkdir -p "/etc/newrelic-infra/integrations.d" sudo zypper -n ref -r newrelic-infra - sudo zypper -n install nri-mysql + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-mysql-fips..." + sudo zypper -n install nri-mysql-fips + else + echo "FIPS mode not enabled. Installing newrelic-mysql..." + sudo zypper -n install nri-mysql + fi if [ -f /etc/newrelic-infra/integrations.d/mysql-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/mysql-config.yml; fi diff --git a/recipes/newrelic/infrastructure/ohi/nagios/debian.yml b/recipes/newrelic/infrastructure/ohi/nagios/debian.yml index 880b301bd..386f74824 100644 --- a/recipes/newrelic/infrastructure/ohi/nagios/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/nagios/debian.yml @@ -144,7 +144,13 @@ install: # Get latest definitions and skip any failure because of deprecation sudo apt-get -o Acquire::Check-Valid-Until=false update -yq - | - sudo apt-get install nri-nagios -y -qq + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-nagios-fips..." + sudo apt-get install nri-nagios-fips -y -qq + else + echo "FIPS mode not enabled. Installing newrelic-nagios..." + sudo apt-get install nri-nagios -y -qq + fi - | if [ -f /etc/newrelic-infra/integrations.d/nagios-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/nagios-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/nagios/rhel.yml b/recipes/newrelic/infrastructure/ohi/nagios/rhel.yml index da9a7fb7e..e01e7a454 100644 --- a/recipes/newrelic/infrastructure/ohi/nagios/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/nagios/rhel.yml @@ -140,7 +140,13 @@ install: - | sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' - | - sudo yum install nri-nagios -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-nagios-fips..." + sudo yum install nri-nagios-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-nagios..." + sudo yum install nri-nagios -y + fi - | if [ -f /etc/newrelic-infra/integrations.d/nagios-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/nagios-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/nginx/linux.yml b/recipes/newrelic/infrastructure/ohi/nginx/linux.yml index 64789da2a..280ac9dc0 100644 --- a/recipes/newrelic/infrastructure/ohi/nginx/linux.yml +++ b/recipes/newrelic/infrastructure/ohi/nginx/linux.yml @@ -167,11 +167,23 @@ install: if [[ -n "$isYumInstalled" ]]; then # rhel sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' - sudo yum install nri-nginx -y -q + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-nginx-fips..." + sudo yum install nri-nginx-fips -y -q + else + echo "FIPS mode not enabled. Installing newrelic-nginx..." + sudo yum install nri-nginx -y -q + fi else # debian sudo apt-get -o Acquire::Check-Valid-Until=false update -yq - sudo apt-get install nri-nginx -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-nginx-fips..." + sudo apt-get install nri-nginx-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-nginx..." + sudo apt-get install nri-nginx -y + fi fi if [ -f /etc/newrelic-infra/integrations.d/nginx-config.yml ]; then diff --git a/recipes/newrelic/infrastructure/ohi/nginx/suse.yml b/recipes/newrelic/infrastructure/ohi/nginx/suse.yml index 1d317c5ba..7cdd1ee0c 100644 --- a/recipes/newrelic/infrastructure/ohi/nginx/suse.yml +++ b/recipes/newrelic/infrastructure/ohi/nginx/suse.yml @@ -149,7 +149,13 @@ install: # Install the integration sudo mkdir -p "/etc/newrelic-infra/integrations.d" sudo zypper -n ref -r newrelic-infra - sudo zypper -n install nri-nginx + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-nginx-fips..." + sudo zypper -n install nri-nginx-fips + else + echo "FIPS mode not enabled. Installing newrelic-nginx..." + sudo zypper -n install nri-nginx + fi if [ -f /etc/newrelic-infra/integrations.d/nginx-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/nginx-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/postgres/debian.yml b/recipes/newrelic/infrastructure/ohi/postgres/debian.yml index a7d8ce6ee..736584ce4 100644 --- a/recipes/newrelic/infrastructure/ohi/postgres/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/postgres/debian.yml @@ -700,7 +700,13 @@ install: # Install the integration sudo mkdir -p "/etc/newrelic-infra/integrations.d" # Get latest definitions and skip any failure because of deprecation - sudo apt-get install nri-postgresql -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-postgresql-fips..." + sudo apt-get install nri-postgresql-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-postgresql..." + sudo apt-get install nri-postgresql -y + fi if [ -f /etc/newrelic-infra/integrations.d/postgresql-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/postgresql-config.yml; fi diff --git a/recipes/newrelic/infrastructure/ohi/postgres/rhel.yml b/recipes/newrelic/infrastructure/ohi/postgres/rhel.yml index 8cb0da1e5..adbbc8af1 100644 --- a/recipes/newrelic/infrastructure/ohi/postgres/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/postgres/rhel.yml @@ -305,7 +305,13 @@ install: else echo "Installing nri-postgresql..." sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' - sudo yum install nri-postgresql -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-postgresql-fips..." + sudo yum install nri-postgresql-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-postgresql..." + sudo yum install nri-postgresql -y + fi fi if [ -f /etc/newrelic-infra/integrations.d/postgresql-config.yml ]; then diff --git a/recipes/newrelic/infrastructure/ohi/rabbitmq/debian.yml b/recipes/newrelic/infrastructure/ohi/rabbitmq/debian.yml index 7cbe553f5..523c48e2e 100644 --- a/recipes/newrelic/infrastructure/ohi/rabbitmq/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/rabbitmq/debian.yml @@ -112,7 +112,13 @@ install: cmds: - | mkdir -p "/etc/newrelic-infra/integrations.d" - apt-get install nri-rabbitmq -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-rabbitmq-fips..." + apt-get install nri-rabbitmq-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-rabbitmq..." + apt-get install nri-rabbitmq -y + fi if [ -f /etc/newrelic-infra/integrations.d/rabbitmq-config.yml ]; then rm /etc/newrelic-infra/integrations.d/rabbitmq-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/rabbitmq/rhel.yml b/recipes/newrelic/infrastructure/ohi/rabbitmq/rhel.yml index 90c9c4c07..8c94b4be3 100644 --- a/recipes/newrelic/infrastructure/ohi/rabbitmq/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/rabbitmq/rhel.yml @@ -106,7 +106,13 @@ install: cmds: - | mkdir -p "/etc/newrelic-infra/integrations.d" - yum install nri-rabbitmq -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-rabbitmq-fips..." + yum install nri-rabbitmq-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-rabbitmq..." + yum install nri-rabbitmq -y + fi if [ -f /etc/newrelic-infra/integrations.d/rabbitmq-config.yml ]; then rm /etc/newrelic-infra/integrations.d/rabbitmq-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/redis/debian.yml b/recipes/newrelic/infrastructure/ohi/redis/debian.yml index 261f298c0..c1d782c62 100644 --- a/recipes/newrelic/infrastructure/ohi/redis/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/redis/debian.yml @@ -158,7 +158,13 @@ install: # Install the integration sudo mkdir -p "/etc/newrelic-infra/integrations.d" # Get latest definitions and skip any failure because of deprecation - sudo apt-get install nri-redis -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-redis-fips..." + sudo apt-get install nri-redis-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-redis..." + sudo apt-get install nri-redis -y + fi if [ -f /etc/newrelic-infra/integrations.d/redis-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/redis-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/redis/rhel.yml b/recipes/newrelic/infrastructure/ohi/redis/rhel.yml index 1d1c49db8..406f7bc44 100644 --- a/recipes/newrelic/infrastructure/ohi/redis/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/redis/rhel.yml @@ -151,7 +151,13 @@ install: # Install the integration sudo mkdir -p "/etc/newrelic-infra/integrations.d" sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' - sudo yum install nri-redis -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-redis-fips..." + sudo yum install nri-redis-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-redis..." + sudo yum install nri-redis -y + fi if [ -f /etc/newrelic-infra/integrations.d/redis-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/redis-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/varnish/debian.yml b/recipes/newrelic/infrastructure/ohi/varnish/debian.yml index a0d7cb234..e848c3ecc 100644 --- a/recipes/newrelic/infrastructure/ohi/varnish/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/varnish/debian.yml @@ -83,7 +83,13 @@ install: # Get latest definitions and skip any failure because of deprecation sudo apt-get -o Acquire::Check-Valid-Until=false update -yq - | - sudo apt-get install nri-varnish -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-varnish-fips..." + sudo apt-get install nri-varnish-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-varnish..." + sudo apt-get install nri-varnish -y + fi - | if [ -f /etc/newrelic-infra/integrations.d/varnish-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/varnish-config.yml; diff --git a/recipes/newrelic/infrastructure/ohi/varnish/rhel.yml b/recipes/newrelic/infrastructure/ohi/varnish/rhel.yml index 312543d9c..faf651794 100644 --- a/recipes/newrelic/infrastructure/ohi/varnish/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/varnish/rhel.yml @@ -87,7 +87,13 @@ install: - | sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' - | - sudo yum install nri-varnish -y + if [ "${NEW_RELIC_FIPS_ENABLED:-false}" = "true" ]; then + echo "FIPS mode enabled. Installing newrelic-varnish-fips..." + sudo yum install nri-varnish-fips -y + else + echo "FIPS mode not enabled. Installing newrelic-varnish..." + sudo yum install nri-varnish -y + fi - | if [ -f /etc/newrelic-infra/integrations.d/varnish-config.yml ]; then sudo rm /etc/newrelic-infra/integrations.d/varnish-config.yml;