为了使用堆栈驱动程序监视nginx (作为应用程序),仅仅将loggin定向到gcploggin驱动程序就足够了,还是必须安装监视代理?
发布于 2017-12-29 14:59:10
要监视nginx状态页面指标:
Nginx:
# Enable nginx-status for better monitoring with Stackdriver module.
location = /nginx-status {
# Turn on nginx stats
stub_status on;
# I do not need logs for stats
access_log off;
# Security: Only allow access from localhost
allow 127.0.0.1;
# Send rest of the world to /dev/null
deny all;
}您可以修改stackdriver插件配置,以读取nginx状态指标,如下所示:
LoadPlugin nginx
<Plugin "nginx">
URL "http://localhost/nginx-status"
</Plugin>更多插件配置:https://github.com/Stackdriver/stackdriver-agent-service-configs/tree/master/etc/collectd.d
https://stackoverflow.com/questions/48011765
复制相似问题