diff --git a/recipes/newrelic/infrastructure/logs/docker-logs.yml b/recipes/newrelic/infrastructure/logs/docker-logs.yml index c92da554d..46d0361d4 100644 --- a/recipes/newrelic/infrastructure/logs/docker-logs.yml +++ b/recipes/newrelic/infrastructure/logs/docker-logs.yml @@ -37,11 +37,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: cmds: diff --git a/recipes/newrelic/infrastructure/logs/logs.yml b/recipes/newrelic/infrastructure/logs/logs.yml index d55a62844..6cccb446b 100644 --- a/recipes/newrelic/infrastructure/logs/logs.yml +++ b/recipes/newrelic/infrastructure/logs/logs.yml @@ -35,11 +35,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: cmds: diff --git a/recipes/newrelic/infrastructure/ohi/apache/debian.yml b/recipes/newrelic/infrastructure/ohi/apache/debian.yml index 08b5a23e6..7df6d6493 100644 --- a/recipes/newrelic/infrastructure/ohi/apache/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/apache/debian.yml @@ -61,11 +61,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) - | STUB_STATUS_ENABLED=$(curl {{.NR_CLI_STATUS_URL}} -s | grep "IdleWorkers:" | wc -l) if [ $STUB_STATUS_ENABLED -eq 0 ] ; then diff --git a/recipes/newrelic/infrastructure/ohi/apache/rhel.yml b/recipes/newrelic/infrastructure/ohi/apache/rhel.yml index 1b79d6d10..60ac7b0f1 100644 --- a/recipes/newrelic/infrastructure/ohi/apache/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/apache/rhel.yml @@ -63,11 +63,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) - | STUB_STATUS_ENABLED=$(curl {{.NR_CLI_STATUS_URL}} -s | grep "IdleWorkers:" | wc -l) if [ $STUB_STATUS_ENABLED -eq 0 ] ; then diff --git a/recipes/newrelic/infrastructure/ohi/cassandra/debian.yml b/recipes/newrelic/infrastructure/ohi/cassandra/debian.yml index 59b8c0aaf..667690cd1 100644 --- a/recipes/newrelic/infrastructure/ohi/cassandra/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/cassandra/debian.yml @@ -68,11 +68,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing Cassandra integration..." diff --git a/recipes/newrelic/infrastructure/ohi/cassandra/rhel.yml b/recipes/newrelic/infrastructure/ohi/cassandra/rhel.yml index e19d08ac7..1d906a55c 100644 --- a/recipes/newrelic/infrastructure/ohi/cassandra/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/cassandra/rhel.yml @@ -72,11 +72,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing Cassandra integration..." diff --git a/recipes/newrelic/infrastructure/ohi/consul/debian.yml b/recipes/newrelic/infrastructure/ohi/consul/debian.yml index f9dbd4989..8c4244cec 100644 --- a/recipes/newrelic/infrastructure/ohi/consul/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/consul/debian.yml @@ -69,11 +69,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing HashiCorp Consul integration..." diff --git a/recipes/newrelic/infrastructure/ohi/consul/rhel.yml b/recipes/newrelic/infrastructure/ohi/consul/rhel.yml index 1e2648b5a..faec2cf19 100644 --- a/recipes/newrelic/infrastructure/ohi/consul/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/consul/rhel.yml @@ -70,11 +70,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing HashiCorp Consul integration..." diff --git a/recipes/newrelic/infrastructure/ohi/couchbase/debian.yml b/recipes/newrelic/infrastructure/ohi/couchbase/debian.yml index 86043769c..c2a57279d 100644 --- a/recipes/newrelic/infrastructure/ohi/couchbase/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/couchbase/debian.yml @@ -70,11 +70,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing Couchbase integration..." cmds: diff --git a/recipes/newrelic/infrastructure/ohi/couchbase/rhel.yml b/recipes/newrelic/infrastructure/ohi/couchbase/rhel.yml index 55bcd6412..80e4219d6 100644 --- a/recipes/newrelic/infrastructure/ohi/couchbase/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/couchbase/rhel.yml @@ -75,11 +75,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing Couchbase integration..." diff --git a/recipes/newrelic/infrastructure/ohi/elasticsearch/debian.yml b/recipes/newrelic/infrastructure/ohi/elasticsearch/debian.yml index dfb17fd1a..3de54b7fb 100644 --- a/recipes/newrelic/infrastructure/ohi/elasticsearch/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/elasticsearch/debian.yml @@ -69,11 +69,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing Elasticsearch integration..." diff --git a/recipes/newrelic/infrastructure/ohi/elasticsearch/rhel.yml b/recipes/newrelic/infrastructure/ohi/elasticsearch/rhel.yml index b8e72c348..576975970 100644 --- a/recipes/newrelic/infrastructure/ohi/elasticsearch/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/elasticsearch/rhel.yml @@ -73,11 +73,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing Elasticsearch integration..." diff --git a/recipes/newrelic/infrastructure/ohi/elasticsearch/suse.yml b/recipes/newrelic/infrastructure/ohi/elasticsearch/suse.yml index 8a4676b58..9ce2adecc 100644 --- a/recipes/newrelic/infrastructure/ohi/elasticsearch/suse.yml +++ b/recipes/newrelic/infrastructure/ohi/elasticsearch/suse.yml @@ -66,11 +66,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing Elasticsearch integration..." diff --git a/recipes/newrelic/infrastructure/ohi/haproxy/debian.yml b/recipes/newrelic/infrastructure/ohi/haproxy/debian.yml index f9ad8decb..d16af3c02 100644 --- a/recipes/newrelic/infrastructure/ohi/haproxy/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/haproxy/debian.yml @@ -58,11 +58,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing HAProxy integration..." diff --git a/recipes/newrelic/infrastructure/ohi/haproxy/rhel.yml b/recipes/newrelic/infrastructure/ohi/haproxy/rhel.yml index a2590261a..a06adfb45 100644 --- a/recipes/newrelic/infrastructure/ohi/haproxy/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/haproxy/rhel.yml @@ -62,11 +62,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing HAProxy integration..." diff --git a/recipes/newrelic/infrastructure/ohi/jmx/debian.yml b/recipes/newrelic/infrastructure/ohi/jmx/debian.yml index 57f96e8c6..170b24adb 100644 --- a/recipes/newrelic/infrastructure/ohi/jmx/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/jmx/debian.yml @@ -83,11 +83,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing JMX integration..." diff --git a/recipes/newrelic/infrastructure/ohi/jmx/rhel.yml b/recipes/newrelic/infrastructure/ohi/jmx/rhel.yml index da61db53a..713ba7193 100644 --- a/recipes/newrelic/infrastructure/ohi/jmx/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/jmx/rhel.yml @@ -87,11 +87,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing JMX integration..." diff --git a/recipes/newrelic/infrastructure/ohi/memcached/debian.yml b/recipes/newrelic/infrastructure/ohi/memcached/debian.yml index add2fc75e..304d9d593 100644 --- a/recipes/newrelic/infrastructure/ohi/memcached/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/memcached/debian.yml @@ -69,11 +69,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing Memcached integration..." diff --git a/recipes/newrelic/infrastructure/ohi/memcached/rhel.yml b/recipes/newrelic/infrastructure/ohi/memcached/rhel.yml index 39a39a444..4fa400899 100644 --- a/recipes/newrelic/infrastructure/ohi/memcached/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/memcached/rhel.yml @@ -66,11 +66,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing Memcached integration..." diff --git a/recipes/newrelic/infrastructure/ohi/mongodb/debian.yml b/recipes/newrelic/infrastructure/ohi/mongodb/debian.yml index 3058c9e1a..210cead9c 100644 --- a/recipes/newrelic/infrastructure/ohi/mongodb/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/mongodb/debian.yml @@ -102,11 +102,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) - | MONGODB_EXISTS=$(mongo --eval 'db.runCommand({ connectionStatus: 1 })' | grep "ok" | awk '{print $1 $2 $3}') if [ $MONGODB_EXISTS != "ok:1"]; then diff --git a/recipes/newrelic/infrastructure/ohi/mongodb/rhel.yml b/recipes/newrelic/infrastructure/ohi/mongodb/rhel.yml index b8f973f76..2260d308c 100644 --- a/recipes/newrelic/infrastructure/ohi/mongodb/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/mongodb/rhel.yml @@ -95,11 +95,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) - | MONGODB_EXISTS=$(mongo --eval 'db.runCommand({ connectionStatus: 1 })' | grep "ok" | awk '{print $1 $2 $3}') if [ $MONGODB_EXISTS != "ok:1"]; then diff --git a/recipes/newrelic/infrastructure/ohi/mysql/debian.yml b/recipes/newrelic/infrastructure/ohi/mysql/debian.yml index 57fdc5316..3409556b7 100644 --- a/recipes/newrelic/infrastructure/ohi/mysql/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/mysql/debian.yml @@ -82,11 +82,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) - | CHECK_DB=$(mysql -u{{.NR_CLI_DB_USERNAME}} --port {{.NR_CLI_DB_PORT}} -p{{.NR_CLI_DB_PASSWORD}} -e "SHOW GRANTS FOR CURRENT_USER" 2>&1 | grep -v "mysql: [Warning] Using a password on the command line interface can be insecure." | grep 'GRANT SELECT' | awk '{print $2, $3}') EXPECTED_SELECT_REPLICATION=$(echo 'SELECT, REPLICATION') diff --git a/recipes/newrelic/infrastructure/ohi/mysql/rhel.yml b/recipes/newrelic/infrastructure/ohi/mysql/rhel.yml index 2a71b777a..bdc4d3996 100644 --- a/recipes/newrelic/infrastructure/ohi/mysql/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/mysql/rhel.yml @@ -82,11 +82,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) - | CHECK_DB=$(mysql -u{{.NR_CLI_DB_USERNAME}} --port {{.NR_CLI_DB_PORT}} -p{{.NR_CLI_DB_PASSWORD}} -e "SHOW GRANTS FOR CURRENT_USER" 2>&1 | grep -v "mysql: [Warning] Using a password on the command line interface can be insecure." | grep 'GRANT ALL\|SELECT' | awk '{print $2, $3}') EXPECTED_SELECT_REPLICATION=$(echo 'SELECT, REPLICATION') diff --git a/recipes/newrelic/infrastructure/ohi/mysql/suse.yml b/recipes/newrelic/infrastructure/ohi/mysql/suse.yml index 2d30a65d5..d1c5467bf 100644 --- a/recipes/newrelic/infrastructure/ohi/mysql/suse.yml +++ b/recipes/newrelic/infrastructure/ohi/mysql/suse.yml @@ -79,11 +79,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) - | CHECK_DB=$(mysql -u{{.NR_CLI_DB_USERNAME}} --port {{.NR_CLI_DB_PORT}} -p{{.NR_CLI_DB_PASSWORD}} -e "SHOW GRANTS FOR CURRENT_USER" 2>&1 | grep -v "mysql: [Warning] Using a password on the command line interface can be insecure." | grep 'GRANT SELECT' | awk '{print $2, $3}') EXPECTED_SELECT_REPLICATION=$(echo 'SELECT, REPLICATION') diff --git a/recipes/newrelic/infrastructure/ohi/nagios/debian.yml b/recipes/newrelic/infrastructure/ohi/nagios/debian.yml index ffb56ce47..3563f1c0f 100644 --- a/recipes/newrelic/infrastructure/ohi/nagios/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/nagios/debian.yml @@ -50,11 +50,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) - | PLUGINS_EXIST=$(ls /usr/local/nagios/libexec | grep check_users | wc -l) if [ $PLUGINS_EXIST -eq 0 ] ; then diff --git a/recipes/newrelic/infrastructure/ohi/nagios/rhel.yml b/recipes/newrelic/infrastructure/ohi/nagios/rhel.yml index 15838d20b..c117e7ca3 100644 --- a/recipes/newrelic/infrastructure/ohi/nagios/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/nagios/rhel.yml @@ -48,11 +48,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) - | PLUGINS_EXIST=$(ls /usr/local/nagios/libexec | grep check_users | wc -l) if [ $PLUGINS_EXIST -eq 0 ] ; then diff --git a/recipes/newrelic/infrastructure/ohi/nginx/debian.yml b/recipes/newrelic/infrastructure/ohi/nginx/debian.yml index 02de1945e..458160ae9 100644 --- a/recipes/newrelic/infrastructure/ohi/nginx/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/nginx/debian.yml @@ -59,11 +59,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) - | STUB_STATUS_ENABLED=$(curl {{.NR_CLI_STUB_STATUS_URL}} -s | grep "Active connections:" | wc -l) if [ $STUB_STATUS_ENABLED -eq 0 ] ; then diff --git a/recipes/newrelic/infrastructure/ohi/nginx/rhel.yml b/recipes/newrelic/infrastructure/ohi/nginx/rhel.yml index 313e1a8a1..c70568014 100644 --- a/recipes/newrelic/infrastructure/ohi/nginx/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/nginx/rhel.yml @@ -63,11 +63,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) - | STUB_STATUS_ENABLED=$(curl {{.NR_CLI_STUB_STATUS_URL}} -s | grep "Active connections:" | wc -l) if [ $STUB_STATUS_ENABLED -eq 0 ] ; then diff --git a/recipes/newrelic/infrastructure/ohi/nginx/suse.yml b/recipes/newrelic/infrastructure/ohi/nginx/suse.yml index 846e14c37..dfb4480f9 100644 --- a/recipes/newrelic/infrastructure/ohi/nginx/suse.yml +++ b/recipes/newrelic/infrastructure/ohi/nginx/suse.yml @@ -56,11 +56,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) - | STUB_STATUS_ENABLED=$(curl {{.NR_CLI_STUB_STATUS_URL}} -s | grep "Active connections:" | wc -l) if [ $STUB_STATUS_ENABLED -eq 0 ] ; then diff --git a/recipes/newrelic/infrastructure/ohi/postgres/debian.yml b/recipes/newrelic/infrastructure/ohi/postgres/debian.yml index 2735580ac..0c42dd649 100644 --- a/recipes/newrelic/infrastructure/ohi/postgres/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/postgres/debian.yml @@ -77,11 +77,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing PostgreSQL integration..." diff --git a/recipes/newrelic/infrastructure/ohi/postgres/rhel.yml b/recipes/newrelic/infrastructure/ohi/postgres/rhel.yml index 943d40ac1..c59bf0c6a 100644 --- a/recipes/newrelic/infrastructure/ohi/postgres/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/postgres/rhel.yml @@ -81,11 +81,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing PostgreSQL integration..." diff --git a/recipes/newrelic/infrastructure/ohi/rabbitmq/debian.yml b/recipes/newrelic/infrastructure/ohi/rabbitmq/debian.yml index a27950a5a..facdaeae8 100644 --- a/recipes/newrelic/infrastructure/ohi/rabbitmq/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/rabbitmq/debian.yml @@ -74,11 +74,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) rabbitmq_plugin_installed: cmds: diff --git a/recipes/newrelic/infrastructure/ohi/rabbitmq/rhel.yml b/recipes/newrelic/infrastructure/ohi/rabbitmq/rhel.yml index ab1a5cda5..bb7cd1780 100644 --- a/recipes/newrelic/infrastructure/ohi/rabbitmq/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/rabbitmq/rhel.yml @@ -80,11 +80,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) rabbitmq_plugin_installed: cmds: diff --git a/recipes/newrelic/infrastructure/ohi/redis/debian.yml b/recipes/newrelic/infrastructure/ohi/redis/debian.yml index b4339f6e9..f2f65bbbc 100644 --- a/recipes/newrelic/infrastructure/ohi/redis/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/redis/debian.yml @@ -68,11 +68,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing Redis integration..." diff --git a/recipes/newrelic/infrastructure/ohi/redis/rhel.yml b/recipes/newrelic/infrastructure/ohi/redis/rhel.yml index 83762ab42..b2514b74d 100644 --- a/recipes/newrelic/infrastructure/ohi/redis/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/redis/rhel.yml @@ -72,11 +72,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing Redis integration..." cmds: diff --git a/recipes/newrelic/infrastructure/ohi/varnish/debian.yml b/recipes/newrelic/infrastructure/ohi/varnish/debian.yml index a644fcc8b..29cf7bd76 100644 --- a/recipes/newrelic/infrastructure/ohi/varnish/debian.yml +++ b/recipes/newrelic/infrastructure/ohi/varnish/debian.yml @@ -57,11 +57,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing Varnish Cache integration..." diff --git a/recipes/newrelic/infrastructure/ohi/varnish/rhel.yml b/recipes/newrelic/infrastructure/ohi/varnish/rhel.yml index 39a91ae65..495d0aa01 100644 --- a/recipes/newrelic/infrastructure/ohi/varnish/rhel.yml +++ b/recipes/newrelic/infrastructure/ohi/varnish/rhel.yml @@ -64,11 +64,7 @@ install: assert_pre_req: cmds: - | - sudo systemctl is-active --quiet newrelic-infra - if [ $? -ne 0 ]; then - echo "The newrelic-infra agent service is not installed on the host, but is required to install this integration." >> /dev/stderr - exit 1 - fi + sudo systemctl is-active --quiet newrelic-infra || (echo "The infrastructure agent is required to install this integration, we recommend going through our guided install path for this pre-requisite which can be found here: https://docs.newrelic.com/docs/new-relic-guided-installation-overview" >> /dev/stderr; exit 1) setup: label: "Installing Varnish Cache integration..."