Skip to content

Instantly share code, notes, and snippets.

@toyama0919
Created November 19, 2013 11:32
Show Gist options
  • Save toyama0919/7544064 to your computer and use it in GitHub Desktop.
Save toyama0919/7544064 to your computer and use it in GitHub Desktop.
elasticsearchのパフォーマンスをnewrelicでモニタリングする(centos) ref: http://qiita.com/toyama0919/items/c52f67818d18ce3e4ac2
yum install python-setuptools
yum install python-devel
yum --enablerepo=epel install libyaml-devel
easy_install pip
pip install newrelic_plugin_agent
mkdir -p /var/log/newrelic/
mkdir -p /var/run/newrelic/
mkdir -p /etc/newrelic/
cp -p /opt/newrelic_plugin_agent/newrelic_plugin_agent.rhel /etc/init.d/newrelic_plugin_agent
chmod +x /etc/init.d/newrelic_plugin_agent
cp -p /opt/newrelic_plugin_agent/newrelic_plugin_agent.cfg /etc/newrelic/
chkconfig --add newrelic_plugin_agent
/etc/init.d/newrelic_plugin_agent start
tail -f /var/log/newrelic/newrelic_plugin_agent.log
Application:
license_key: ${newrelic_key}
wake_interval: 60
#proxy: http://localhost:8080
elasticsearch:
name: ${cluster_name}
host: localhost
port: 9200
scheme: http
Daemon:
user: root
pidfile: /var/run/newrelic/newrelic_plugin_agent.pid
Logging:
formatters:
verbose:
format: '%(levelname) -10s %(asctime)s %(process)-6d %(processName) -15s %(threadName)-10s %(name) -45s %(funcName) -25s L%(lineno)-6d: %(message)s'
handlers:
file:
class : logging.handlers.RotatingFileHandler
formatter: verbose
filename: /var/log/newrelic/newrelic_plugin_agent.log
maxBytes: 10485760
backupCount: 3
loggers:
newrelic_plugin_agent:
level: INFO
propagate: True
handlers: [console, file]
requests:
level: ERROR
propagate: True
handlers: [console, file]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment