blackstar257.newrelic

Ansible Role: New Relic PHP Agent

Ansible Role Build Status

This Ansible role helps you install and set up the New Relic PHP Agent on systems like RHEL, CentOS, Debian, and Ubuntu.

Requirements

You need Ansible version 2.4 or above to use this role.

Role Variables

Name Default Description
newrelic_config_path "/etc/php.d" Configuration path for New Relic
newrelic_agent_extension "newrelic.so" Agent extension name
newrelic_agent_enabled true Enable the agent
newrelic_license_key "REPLACE_WITH_REAL_KEY" Your New Relic license key
newrelic_agent_logfile "/var/log/newrelic/php_agent.log" Log file for the agent
newrelic_agent_loglevel "info" Log level (can be info, debug, etc.)
newrelic_agent_high_security false Enable high security mode
newrelic_agent_appname "PHP Application" Name of your PHP application
newrelic_agent_process_host_display_name "" Display name for host
newrelic_agent_daemon_logfile "/var/log/newrelic/newrelic-daemon.log" Log file for the daemon
newrelic_agent_daemon_loglevel "info" Daemon log level
newrelic_agent_daemon_address /tmp/.newrelic.sock Daemon communication address
newrelic_agent_daemon_ssl_ca_bundle "" Certificate authority bundle for SSL
newrelic_agent_daemon_ssl_ca_path "" Path for CA files
newrelic_agent_daemon_proxy "" Proxy settings if needed
newrelic_agent_daemon_pidfile "" PID file for the daemon
newrelic_agent_daemon_location /usr/bin/newrelic-daemon Location of the daemon executable
newrelic_agent_daemon_collector_host "" Host for the collector
newrelic_agent_daemon_dont_launch 0 Don't automatically start the daemon
newrelic_agent_daemon_utilization_detect_aws true Detect AWS usage
newrelic_agent_daemon_utilization_detect_azure true Detect Azure usage
newrelic_agent_daemon_utilization_detect_gcp true Detect GCP usage
newrelic_agent_daemon_utilization_detect_pcf true Detect Pivotal Cloud Foundry usage
newrelic_agent_daemon_utilization_detect_docker true Detect Docker usage
newrelic_agent_daemon_app_timeout 10m Application timeout
newrelic_agent_daemon_app_connect_timeout 0 Connection timeout
newrelic_agent_error_collector_enabled true Enable error collection
newrelic_agent_error_collector_ignore_user_exception_handler false Ignore user exception handlers
newrelic_agent_error_collector_ignore_exceptions "" Exceptions to ignore
newrelic_agent_error_collector_ignore_errors "" Errors to ignore
newrelic_agent_error_collector_record_database_errors false Record database errors
newrelic_agent_error_collector_prioritize_api_errors false Prioritize API errors
newrelic_agent_browser_monitoring_auto_instrument true Enable automatic browser monitoring
newrelic_agent_transaction_tracer_enabled true Enable transaction tracing
newrelic_agent_transaction_tracer_threshold apdex_f Trace threshold
newrelic_agent_transaction_tracer_detail 1 Level of detail for tracing
newrelic_agent_transaction_tracer_slow_sql true Trace slow SQL queries
newrelic_agent_transaction_tracer_stack_trace_threshold 500 Stack trace threshold
newrelic_agent_transaction_tracer_explain_enabled true Enable SQL explain on queries
newrelic_agent_transaction_tracer_explain_threshold 500 Threshold for SQL explain
newrelic_agent_transaction_tracer_record_sql obfuscated Record SQL in obfuscated form
newrelic_agent_transaction_tracer_custom "" Custom transaction tracer settings
newrelic_agent_transaction_tracer_internal_functions_enabled false Enable tracing for internal functions
newrelic_agent_framework "" Framework settings
newrelic_agent_webtransaction_name_remove_trailing_path false Remove trailing path from web transaction names
newrelic_agent_webtransaction_name_functions "" Functions for naming transactions
newrelic_agent_webtransaction_name_files "" Files for naming transactions
newrelic_agent_daemon_auditlog "" Audit log settings
newrelic_agent_transaction_events_enabled true Enable transaction events
newrelic_agent_attributes_enabled true Enable attributes collection
newrelic_agent_transaction_events_attributes_enabled true Enable attributes for transaction events
newrelic_agent_transaction_tracer_attributes_enabled true Enable attributes for the transaction tracer
newrelic_agent_error_collector_attributes_enabled true Enable attributes for the error collector
newrelic_agent_browser_monitoring_attributes_enabled false Enable attributes for browser monitoring
newrelic_agent_attributes_include "" Attributes to include
newrelic_agent_attributes_exclude "" Attributes to exclude
newrelic_agent_transaction_events_attributes_include "" Attributes to include in transaction events
newrelic_agent_transaction_events_attributes_exclude "" Attributes to exclude in transaction events
newrelic_agent_transaction_tracer_attributes_include "" Attributes to include in transaction tracing
newrelic_agent_transaction_tracer_attributes_exclude "" Attributes to exclude in transaction tracing
newrelic_agent_error_collector_attributes_include "" Attributes to include in error collection
newrelic_agent_error_collector_attributes_exclude "" Attributes to exclude in error collection
newrelic_agent_browser_monitoring_attributes_include "" Attributes to include in browser monitoring
newrelic_agent_browser_monitoring_attributes_exclude "" Attributes to exclude in browser monitoring
newrelic_agent_feature_flag "" Feature flags for the agent
newrelic_agent_custom_insights_events_enabled true Enable custom insights events
newrelic_agent_labels "" Labels for the agent
newrelic_agent_synthetics_enabled true Enable synthetic monitoring
newrelic_agent_cross_application_tracer_enabled true Enable cross-application tracing
newrelic_agent_distributed_tracing_enabled false Enable distributed tracing
newrelic_agent_span_events_enabled true Enable span events
newrelic_agent_transaction_tracer_gather_input_queries true Gather input queries for transactions
newrelic_agent_error_collector_capture_events true Capture events for the error collector
newrelic_agent_guzzle_enabled true Enable Guzzle support
newrelic_agent_phpunit_events_enabled false Enable PHPUnit events
newrelic_agent_datastore_tracer_instance_reporting_enabled true Enable reporting for datastore tracer instances
newrelic_agent_datastore_tracer_database_name_reporting_enabled true Enable reporting for datastore tracer database names
newrelic_agent_security_policies_token "" Security policy token

Dependencies

None

Example Playbook

Here’s how to set up the New Relic agent with default settings:

- hosts: all
  roles:
    - {
        role: blackstar257.newrelic,
        newrelic_license_key: 0123456789012345678901234567890123456789,
      }

License

This is licensed under the BSD License.

Author Information

The original author is Norman Leutner. The role has been forked by blackstar257.

Informazioni sul progetto

New Relic PHP Agent role / Application monitoring for RHEL/CentOS, Ubuntu, Debian

Installa
ansible-galaxy install blackstar257.newrelic
Licenza
bsd-2-clause
Download
1.5k
Proprietario