newrelic_plugin_agent
=====================
An agent that polls supported backend systems and submits the results to the
NewRelic platform. Currently supported backend systems are:
- Alternative PHP Cache
- Apache HTTP Server
- CouchDB
- Edgecast CDN "Realtime" API
- Memcached
- MongoDB
- Nginx
- pgBouncer
- PostgreSQL
- RabbitMQ
- Redis
- Riak
- uWSGI
IMPORTANT
---------
Version 1.0.12 has a *SERIOUS* uninstallation bug in the file manifest that will remove all the files on your filesystem if you try and do a pip remove newrelic_plugin_agent.
Version 1.0.13 will fix this on a pip upgrade. For now, run the python script titled "fix_removal.py" to clean up the erroneous entries in the installed-files.txt manifest file in your python site-packages directory.
You can run this script manually using using curl and python:
curl https://gist.github.com/gmr/6031454/raw/d6a782691729a0cfb549f71bd2632d0c6dcfb0c8/fix_nrp_manifest.py | python
Base Requirements
-----------------
The agent requires Python 2.6 or 2.7 and pip for installation. Individual plugin backends may require additional libraries and are detailed below.
Configuration File Note
-----------------------
The configuration file uses YAML as its format. Most tickets for non-working installs are due to configuration file formatting errors. Please make sure you are properly formatting your configuration file prior to submitting a ticket. YAML is a whitespace dependent markup format. More information on writing proper YAML can be found at http://yaml.org.
Installation Instructions
-------------------------
1. Install via pip*:
pip install newrelic-plugin-agent
* See pip installation instructions at http://www.pip-installer.org/en/latest/installing.html
2. Copy the configuration file example from /opt/newrelic_plugin_agent/etc/newrelic/newrelic_plugin_agent.cfg to /etc/newrelic/newrelic_plugin_agent.cfg and edit the configuration in that file.
3. Make a /var/log/newrelic directory and make sure it is writable by the user specified in the configuration file
4. Make a /var/run/newrelic directory and make sure it is writable by the user specified in the configuration file
5. Run the app:
newrelic_plugin_agent -c PATH-TO-CONF-FILE [-f]
Where -f is to run it in the foreground instead of as a daemon.
Sample configuration and init.d scripts are installed to /opt/newrelic_plugin_agent
Installing Additional Requirements
----------------------------------
To use the MongoDB the mongodb library is required. For the pgBouncer or PostgreSQL plugin you must install the psycopg2 library. To easily do
this, make sure you have the latest version of pip installed (http://www.pip-installer.org/). This should be done after installing the agent itself.
Once installed, from inside the source directory run the following command:
pip install -e .[mongodb]
or
pip install -e .[pgbouncer]
or
pip install -e .[postgresql]
Plugin Configuration Stanzas
----------------------------
Each plugin can support gathering data from a single or multiple targets. To support multiple targets for a plugin, you create a list of target stanzas:
plugin_name:
- name: target_name
host: localhost
foo: bar
- name: target_name
host: localhost
foo: bar
While you can use the multi-target format for a plugins configuration stanza like:
plugin_name:
- name: target_name
host: localhost
foo: bar
You can also use a single mapping like follows:
plugin_name:
name: target_name
host: localhost
foo: bar
The fields for plugin configurations can vary due to a plugin's configuration requirements. The name value in each stanza is only required when using multiple targets in a plugin. If it is only a single target, the name will be taken from the server's hostname.
APC Installation Notes
----------------------
Copy the apc-nrp.php script to a directory that can be served by your web server or php-fpm application. Edit the newrelic_plugin_agent configuration to point to the appropriate URL.
Apache HTTPd Installation Notes
-------------------------------
Enable the HTTPd server status page in the default virtual host. The following example configuration snippet for Apache HTTPd 2.2 demonstrates how to do this:
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from all
</Location>
For HTTPd 2.4, it should look something like:
<Location /server-status>
SetHandler server-status
Require ip 127.0.0.1
</Location>
The agent requires the extended information to parse metrics. If you are not seeing any metrics on your graphs for Apache verify that you have enable ExtendedStatus, the default is off so you must enable it. In your global Apache HTTP configuration you need to enable exetended status using:
ExtendedStatus On
If you are monitoring Apache HTTPd via a HTTPS connection you can use the verify_ssl_cert configuration value in the httpd configuration section to disable SSL certificate verification.
Memcached Installation Notes
----------------------------
The memcached plugin can communicate either over UNIX domain sockets using the path configuration variable or TCP/IP using the host and port variables. Do not include both.
MongoDB Installation Notes
--------------------------
You need to install the pymongo driver, either by running "pip install pymongo" or by following the "Installing Additional Requirements" above. Each database you wish to collect metrics for must be enumerated in the configuration.
There are two configuration stanza formats for MongoDB. You must use one or the other, they can not be mixed. For non-authenticated polling, you can simply enumate the databases you would like stats from as a list:
mongodb:
name: hostname
host: localhost
port: 27017
databases:
- database_name_1
- database_name_2
If your MongoDB server requires authentication, you must provide both admin credentials and database level credentials and the stanza is formatted as a nested array:
mongodb:
name: hostname
host: localhost
port: 27017
admin_username: foo
admin_password: bar
databases:
database_name_1:
username: foo
password: bar
database_name_2:
username: foo
password: bar
Nginx Installation Notes
------------------------
Enable the nginx stub_status setting on the default site in your configuration. The following example configuration snippet for Nginx demonstates how to do this:
location /nginx_stub_status {
stub_status on;
}
If you are monitoring Nginx via a HTTPS connection you can use the verify_ssl_cert configuration value in the httpd configuration section to disable SSL certificate verification.
pgBouncer Installation Notes
----------------------------
The user specified must be a stats user.
PostgreSQL Installation Notes
-----------------------------
By default user specified must superuser to get PostgreSQL directory listings. If you want to
use this plugin without need of superuser permissions use `superuser: False` setting in
configuration file e.g.:
postgresql:
host: localhost
port: 5432
user: newrelic
dbname: postgres
password: newrelic
superuser: False
RabbitMQ Installation Notes
---------------------------
The user specified must have access to all virtual hosts you wish to monitor and should have either the Administrator tag or the Monitor tag.
If you are monitoring RabbitMQ via a HTTPS connection you can use the verify_ssl_cert configuration value in the httpd configuration section to disable SSL certificate verification.
Redis Installation Notes
------------------------
For Redis daemons that are password protected, add the password configuration
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共34个文件
py:19个
txt:5个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:newrelic_plugin_agent-1.0.13.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
newrelic_plugin_agent-1.0.13.tar.gz (34个子文件)
newrelic_plugin_agent-1.0.13
MANIFEST.in 219B
PKG-INFO 771B
LICENSE 1KB
newrelic_plugin_agent.egg-info
PKG-INFO 771B
requires.txt 99B
SOURCES.txt 1KB
entry_points.txt 76B
top_level.txt 22B
dependency_links.txt 1B
newrelic_plugin_agent
agent.py 13KB
plugins
riak.py 10KB
apache_httpd.py 5KB
couchdb.py 4KB
uwsgi.py 5KB
redis.py 7KB
rabbitmq.py 16KB
php_apc.py 4KB
postgresql.py 12KB
__init__.py 21B
memcached.py 7KB
edgecast.py 6KB
nginx.py 3KB
pgbouncer.py 4KB
base.py 6KB
mongodb.py 10KB
__init__.py 45B
setup.cfg 59B
setup.py 3KB
README.md 13KB
fix_removal.py 1KB
etc
apc-nrp.php 234B
init.d
newrelic_plugin_agent.rhel 2KB
newrelic_plugin_agent.deb 2KB
newrelic
newrelic_plugin_agent.cfg 3KB
共 34 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功