Instrumentation
License key for ingest: eu01xx0c939210b29aa4ec0cfa9c4acb0961NRAL
Logging
Documentation in Get started with log management
Config in /etc/newrelic-infra/logging.d/...
System
Applies to all servers.
Configuration: ./logging.yml
logs:
- name: alternatives.log
file: /var/log/alternatives.log
attributes:
logtype: linux_alternatives
- name: cloud-init.log
file: /var/log/cloud-init.log
attributes:
logtype: linux_cloud-init
- name: auth.log
file: /var/log/auth.log
attributes:
logtype: linux_auth
- name: dpkg.log
file: /var/log/dpkg.log
attributes:
logtype: linux_dpkg
- name: syslog
file: /var/log/syslog
attributes:
logtype: linux_syslog
- name: newrelic-cli.log
file: /root/.newrelic/newrelic-cli.log
attributes:
newrelic-cli: true
logtype: newrelic-cli
Apache
Applies to webservers.
Dropped logs: WHERE logtype='apache' AND message LIKE '%GET /server-status?auto HTTP/1.1%'
Configuration: ./apache-log.yml
logs:
- name: apache_access
file: /var/log/apache2/access.log
attributes:
logtype: apache
- name: apache_error
file: /var/log/apache2/error.log
attributes:
logtype: apache_error
- name: grid_app_access
file: /var/log/apache2/app-access_log
attributes:
logtype: apache_grid_app
- name: grid-api_access
file: /var/log/apache2/api-access_log
attributes:
logtype: apache_grid_api
- name: grid_app_error
file: /var/log/apache2/app-error_log
attributes:
logtype: apache_grid_app_error
- name: grid_api_error
file: /var/log/apache2/api-error_log
attributes:
logtype: apache_grid_api_error
Supervisord
Applies to mg-consumers, mg-ub-websocket.
Configuration: ./supervisord.yml
logs:
- name: supervisord.log
file: /var/log/supervisor/supervisord.log
attributes:
logtype: supervisord
Redis
Applies to mg-ub-web-001.
Check it
Configuration: ./redis-log.yml
RabbitMq
Applies to mg-rabbitmq-4.
Configuration: ./rabbitmq-log.yml
Apps
Applies to mg-consumers, mg-ub-websocket.
Configuration: ./apps.yml
On mg-consumers:
logs:
- name: grid-activity-log
file: /var/log/consumer/activitylog.log
attributes:
logtype: grid-activity-log
- name: grid-activity-log_error
file: /var/log/consumer/activitylog.error.log
attributes:
logtype: grid-activity-log_error
- name: grid-cache-invalidation-on-scheduling
file: /var/log/consumer/cache-invalidation-on-scheduling.log
attributes:
logtype: grid-cache-invalidation-on-scheduling
- name: grid-cache-invalidation-on-scheduling_error
file: /var/log/consumer/cache-invalidation-on-scheduling.error.log
attributes:
logtype: grid-cache-invalidation-on-scheduling_error
- name: grid-notifications
file: /var/log/consumer/notifications.log
attributes:
logtype: grid-notifications
- name: grid-notifications_error
file: /var/log/consumer/notifications.error.log
attributes:
logtype: grid-notifications_error
On mg-ub-websocket:
logs:
- name: grid-websocket
file: /var/log/mg-websocket/websocket.log
attributes:
logtype: grid-websocket
- name: grid-websocket_error
file: /var/log/mg-websocket/websocket.error.log
attributes:
logtype: grid-websocket_error
- name: grid-scheduler
file: /var/log/mg-scheduler/scheduler.log
attributes:
logtype: grid-scheduler
- name: grid-scheduler_error
file: /var/log/mg-scheduler/scheduler.error.log
attributes:
logtype: grid-scheduler_error
- name: grid-gantt-pdf
file: /var/log/bryntum-pdf-export/export.log
attributes:
logtype: grid-gantt-pdf
- name: grid-gantt-pdf_error
file: /var/log/bryntum-pdf-export/export.error.log
attributes:
logtype: grid-gantt-pdf_error
MariaDB
Applies to mg-ub-db-001.
Configuration: ./mysql-log.yml
MongoDB
Applies to mg-ub-mongo-001.
Configuration: ./mongodb-log.yml
On-Host Integrations
Documentation in Introduction to on-host integrations
Config in /etc/newrelic-infra/integrations.d/...
Apache
Applies to webservers.
Documentation in Apache monitoring integration
Configuration: ./apache-config.yml
integrations:
- name: nri-apache
env:
METRICS: true
STATUS_URL: http://127.0.0.1/server-status?auto
REMOTE_MONITORING: true
labels:
env: production
role: webserver
interval: 15s
- name: nri-apache
env:
INVENTORY: true
STATUS_URL: http://127.0.0.1/server-status?auto
REMOTE_MONITORING: true
labels:
env: production
role: webserver
inventory_source: config/apache
interval: 60s
Redis
Applies to mg-ub-web-001.
Documentation in Redis monitoring integration
Configuration: ./redis-config.yml
integrations:
- name: nri-redis
env:
HOSTNAME: localhost
PORT: 6379
USERNAME: newrelic
PASSWORD: a23zjEyujA58wZR52d5w7upHpuG7AZ73
USE_UNIX_SOCKET: true
REMOTE_MONITORING: true
inventory_source: config/redis
interval: 15s
labels:
environment: production
RabbitMQ
Applies to mg-ub-rabbitmq4.
Documentation in RabbitMQ monitoring integration
Note: Monitoring all queues & exchanges to avoid having to configure when we add or remove them. Consider limiting to save data.
Configuration: ./rabbitmq-config.yml
integrations:
- name: nri-rabbitmq
env:
HOSTNAME: localhost
PORT: 15672
USERNAME: newrelic
PASSWORD: 'OTA5OTlkNjYxYjc3oO0'
USE_SSL: false
CONFIG_PATH: /etc/rabbitmq/rabbitmq.conf
inventory_source: config/rabbitmq
interval: 15s
MariaDB
Applies to mg-ub-db-001.
Documentation in MySQL monitoring integration
Configuration: ./mysql-config.yml
integrations:
- name: nri-mysql
env:
METRICS: true
HOSTNAME: localhost
PORT: 3306
USERNAME: newrelic
PASSWORD: NVRD4B4cV0bS2JLwHIxw
REMOTE_MONITORING: true
EXTENDED_METRICS: true
EXTENDED_INNODB_METRICS: true
EXTENDED_MYISAM_METRICS: true
interval: 30s
labels:
env: production
- name: nri-mysql
env:
INVENTORY: true
HOSTNAME: localhost
PORT: 3306
USERNAME: newrelic
PASSWORD: NVRD4B4cV0bS2JLwHIxw
REMOTE_MONITORING: true
interval: 60s
inventory_source: config/mysql
labels:
env: production
- name: nri-mysql
env:
INVENTORY: false
METRICS: false
HOSTNAME: localhost
PORT: 3306
USERNAME: newrelic
PASSWORD: NVRD4B4cV0bS2JLwHIxw
REMOTE_MONITORING: true
ENABLE_QUERY_MONITORING: true
interval: 60s
inventory_source: config/mysql
labels:
env: production
/etc/mysql/my.cnf
...
[mysqld]
performance_schema=ON
# Specify an initialization file for Debian/Ubuntu
init-file = /etc/mysql/init.sql
/etc/mysql/init.sql - As standard according to documentation
MongoDB
Applies to mg-ub-mongo-001.
Documentation in MongoDB monitoring integration
Note: Monitoring all collections to avoid having to configure when we add or remove them. Consider limiting to save data.
Configuration: ./mongodb-config.yml
integrations:
- name: nri-mongodb3
config:
mongodb_cluster_name: grid-mongo
mongodb_uri: mongodb://newrelic:gLiX4tL6LG0wcV03kUmFOFi5@localhost:27017
exporter_port: 9126
scrape_timeout: 30s
APM
Documentation on Improve your app performance with APM
Useful logs on /var/log/newrelic/...
PHP
Applies to webservers, consumers.
Documentation in PHP agent configuration
Config in /etc/php/8.4/[apache2|cli]/conf.d/20-newrelic.ini
Read instrument documentation.
On webservers:
Enabled for apache2, without browser_monitoring
Deactivated for cli
On consumers:
Enabled for cli, without browser_monitoring
Node.js
Applies to mg-websocket (websocket, scheduler, gantt-pdf).
Documentation in Node.js agent configuration
Config in /usr/src/.../newrelic.js
Configuration ./app/newrelic.js:
exports.config = {
app_name: ['grid-websocket'],
license_key: 'eu01xx0c939210b29aa4ec0cfa9c4acb0961NRAL',
logging: {
level: 'info',
},
agent_control: {
health: {
frequency: 10
}
},
allow_all_headers: true,
attributes: {
exclude: [
'request.headers.cookie',
'request.headers.authorization',
'request.headers.proxyAuthorization',
'request.headers.setCookie*',
'request.headers.x*',
'response.headers.cookie',
'response.headers.authorization',
'response.headers.proxyAuthorization',
'response.headers.setCookie*',
'response.headers.x*'
]
}
}
Configuration ./scheduler/newrelic.js:
Configuration ./bryntum-pdf-export/newrelic.js:
PHP App Runtime
Applies to webservers.
Documentation in Guide to using the PHP agent API
Report caught errors as noticed errors. Used by logger if configured to do so on settings.php.
Browser
Deactivated
Pending to see what we can get from it and how we apply it.
Possible Holes
- websocket - agents not reporting transactions & logs
- consumer - agents not reporting transactions & logs
- redis - agent not working
- Vulnerability alerts - Configure
- Service levels - performance monitoring