From 3ba018186ba49e41bac7e6d5b3ba726adad61c9c Mon Sep 17 00:00:00 2001 From: Yakima Puppet Master Date: Fri, 23 Sep 2016 15:27:57 -0400 Subject: [PATCH] Passed newrelic::agent::php down to newrelic::php::newrelic_ini so that the newrelic.ini template has access to the data --- manifests/agent/php.pp | 43 +++++++++++++++++++++++++++++++---- manifests/php/newrelic_ini.pp | 32 ++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 5 deletions(-) diff --git a/manifests/agent/php.pp b/manifests/agent/php.pp index 5551cb1..6d79aec 100644 --- a/manifests/agent/php.pp +++ b/manifests/agent/php.pp @@ -96,11 +96,43 @@ } ::newrelic::php::newrelic_ini { $newrelic_php_conf_dir: - exec_path => $newrelic_php_exec_path, - newrelic_license_key => $newrelic_license_key, - before => [ File['/etc/newrelic/newrelic.cfg'], Service[$newrelic_php_service] ], - require => Package[$newrelic_php_package], - notify => Service[$newrelic_php_service], + exec_path => $newrelic_php_exec_path, + newrelic_license_key => $newrelic_license_key, + newrelic_ini_enabled => $newrelic_ini_enabled, + newrelic_ini_logfile => $newrelic_ini_logfile, + newrelic_ini_loglevel => $newrelic_ini_loglevel, + newrelic_ini_high_security => $newrelic_ini_high_security, + newrelic_ini_appname => $newrelic_ini_appname, + newrelic_daemon_logfile => $newrelic_daemon_logfile, + newrelic_daemon_loglevel => $newrelic_daemon_loglevel, + newrelic_daemon_port => $newrelic_daemon_port, + newrelic_daemon_ssl => $newrelic_daemon_ssl, + newrelic_daemon_ssl_ca_bundle => $newrelic_daemon_ssl_ca_bundle, + newrelic_daemon_ssl_ca_path => $newrelic_daemon_ssl_ca_path, + newrelic_daemon_proxy => $newrelic_daemon_proxy, + newrelic_daemon_pidfile => $newrelic_daemon_pidfile, + newrelic_daemon_location => $newrelic_daemon_location, + newrelic_daemon_collector_host => $newrelic_daemon_collector_host, + newrelic_ini_capture_params => $newrelic_ini_capture_params, + newrelic_daemon_dont_launch => $newrelic_daemon_dont_launch, + newrelic_ini_error_collector_enabled => $newrelic_ini_error_collector_enabled, + newrelic_ini_error_collector_record_database_errors => $newrelic_ini_error_collector_record_database_errors, + newrelic_ini_error_collector_prioritize_api_errors => $newrelic_ini_error_collector_prioritize_api_errors, + newrelic_ini_browser_monitoring_auto_instrument => $newrelic_ini_browser_monitoring_auto_instrument, + newrelic_ini_transaction_tracer_enabled => $newrelic_ini_transaction_tracer_enabled, + newrelic_ini_transaction_tracer_threshold => $newrelic_ini_transaction_tracer_threshold, + newrelic_ini_transaction_tracer_detail => $newrelic_ini_transaction_tracer_detail, + newrelic_ini_transaction_tracer_slow_sql => $newrelic_ini_transaction_tracer_slow_sql, + newrelic_ini_transaction_tracer_stack_trace_threshold => $newrelic_ini_transaction_tracer_stack_trace_threshold, + newrelic_ini_transaction_tracer_explain_enabled => $newrelic_ini_transaction_tracer_explain_enabled, + newrelic_ini_transaction_tracer_explain_threshold => $newrelic_ini_transaction_tracer_explain_threshold, + newrelic_ini_transaction_tracer_record_sql => $newrelic_ini_transaction_tracer_record_sql, + newrelic_ini_transaction_tracer_custom => $newrelic_ini_transaction_tracer_custom, + newrelic_ini_framework => $newrelic_ini_framework, + newrelic_ini_webtransaction_name_files => $newrelic_ini_webtransaction_name_files, + before => [ File['/etc/newrelic/newrelic.cfg'], Service[$newrelic_php_service] ], + require => Package[$newrelic_php_package], + notify => Service[$newrelic_php_service], } file { '/etc/newrelic/newrelic.cfg': @@ -110,4 +142,5 @@ before => Service[$newrelic_php_service], notify => Service[$newrelic_php_service], } + } diff --git a/manifests/php/newrelic_ini.pp b/manifests/php/newrelic_ini.pp index 012c7e0..1480b89 100644 --- a/manifests/php/newrelic_ini.pp +++ b/manifests/php/newrelic_ini.pp @@ -2,6 +2,38 @@ define newrelic::php::newrelic_ini ( $newrelic_license_key, $exec_path, + $newrelic_ini_enabled, + $newrelic_ini_logfile, + $newrelic_ini_loglevel, + $newrelic_ini_high_security, + $newrelic_ini_appname, + $newrelic_daemon_logfile, + $newrelic_daemon_loglevel, + $newrelic_daemon_port, + $newrelic_daemon_ssl, + $newrelic_daemon_ssl_ca_bundle, + $newrelic_daemon_ssl_ca_path, + $newrelic_daemon_proxy, + $newrelic_daemon_pidfile, + $newrelic_daemon_location, + $newrelic_daemon_collector_host, + $newrelic_ini_capture_params, + $newrelic_daemon_dont_launch, + $newrelic_ini_error_collector_enabled, + $newrelic_ini_error_collector_record_database_errors, + $newrelic_ini_error_collector_prioritize_api_errors, + $newrelic_ini_browser_monitoring_auto_instrument, + $newrelic_ini_transaction_tracer_enabled, + $newrelic_ini_transaction_tracer_threshold, + $newrelic_ini_transaction_tracer_detail, + $newrelic_ini_transaction_tracer_slow_sql, + $newrelic_ini_transaction_tracer_stack_trace_threshold, + $newrelic_ini_transaction_tracer_explain_enabled, + $newrelic_ini_transaction_tracer_explain_threshold, + $newrelic_ini_transaction_tracer_record_sql, + $newrelic_ini_transaction_tracer_custom, + $newrelic_ini_framework, + $newrelic_ini_webtransaction_name_files, ) { exec { "/usr/bin/newrelic-install ${name}":