我的收藏品配置如下:
LoadPlugin nginx
...
<Plugin "nginx">
URL "http://localhost:8080/nginx_status?auto"
</Plugin>Nginx conf看起来像:
server {
listen 8080;
index index.html index.htm;
server_name localhost;
root /var/www/default/;
location / {
try_files $uri $uri/ /index.html;
}
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
}当我执行
$ curl http://localhost:8080/nginx_status?auto它的产出如下:
Active connections: 1
server accepts handled requests
56 56 322
Reading: 0 Writing: 1 Waiting: 0 但是,当石墨打开时,就没有可以获得的nginx图了。times和Nginx被重新启动了很多次。有什么建议吗?
发布于 2014-10-14 06:43:05
终于解决了。日志文件插件打开后:
LoadPlugin logfile
<Plugin logfile>
LogLevel info
File "/var/log/collectd.log"
Timestamp true
</Plugin>我发现nginx插件没有安装:
[2014-10-14 06:30:59] plugin_load: Could not find plugin "nginx" in /usr/lib64/collectd
[2014-10-14 06:30:59] Found a configuration for the `nginx' plugin, but the plugin isn't loaded or didn't register a configuration callback.只需执行(AMI):
$ sudo yum install collectd-nginx一切都很完美
https://stackoverflow.com/questions/26341199
复制相似问题