Closed aguy closed 7 years ago
I tried build graphite module with nginx-1.10.1 and it worked.
[root@hive6 nginx]# ./sbin/nginx -V
nginx version: nginx/1.10.1
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
configure arguments: --add-dynamic-module=../../graphite-nginx-module
Config file
user nginx;
load_module "modules/ngx_http_graphite_module.so";
worker_processes 4;
daemon off;
master_process off;
error_log /var/log/nginx/nginx.error;
events {
worker_connections 4;
use epoll;
}
http {
include mime.types;
graphite_config server=jenga.rbdev.mail.ru frequency=60 intervals=1m|5m|15m;
server {
listen 80;
location ~ /post {
graphite_data nginx.post;
return 200;
}
}
}
Then i run wget
[root@hive6 nginx]# while true; do wget -q -O - 'http://127.0.0.1/post' -S; sleep 1; done;
And run tcpdump
[root@hive6 nginx]# tcpdupm -i eth0 'dst port 2008' -A | grep ^hive6
hive6.nginx.post.bytes_sent_1m 147.000 1484320383
hive6.nginx.post.body_bytes_sent_1m 0.000 1484320383
hive6.nginx.post.request_length_1m 111.000 1484320383
hive6.nginx.post.ssl_handshake_time_1m 0.000 1484320383
hive6.nginx.post.ssl_cache_usage_1m 0.000 1484320383
hive6.nginx.post.content_time_1m 0.000 1484320383
hive6.nginx.post.gzip_time_1m 0.000 1484320383
hive6.nginx.post.upstream_time_1m 0.000 1484320383
hive6.nginx.post.upstream_connect_time_1m 0.000 1484320383
hive6.nginx.post.upstream_header_time_1m 0.000 1484320383
hive6.nginx.post.rps_1m 1.000 1484320383
hive6.nginx.post.keepalive_rps_1m 0.000 1484320383
hive6.nginx.post.response_2xx_rps_1m 1.000 1484320383
hive6.nginx.post.response_3xx_rps_1m 0.000 1484320383
hive6.nginx.post.response_4xx_rps_1m 0.000 1484320383
hive6.nginx.post.response_5xx_rps_1m 0.000 1484320383
hive6.nginx.post.request_time_5m 0.000 1484320383
hive6.nginx.post.bytes_sent_5m 147.000 1484320383
hive6.nginx.post.body_bytes_sent_5m 0.000 1484320383
hive6.nginx.post.request_length_5m 111.000 1484320383
hive6.nginx.post.ssl_handshake_time_5m 0.000 1484320383
hive6.nginx.post.ssl_cache_usage_5m 0.000 1484320383
hive6.nginx.post.content_time_5m 0.000 1484320383
hive6.nginx.post.gzip_time_5m 0.000 1484320383
hive6.nginx.post.upstream_time_5m 0.000 1484320383
hive6.nginx.post.upstream_connect_time_5m 0.000 1484320383
hive6.nginx.post.upstream_header_time_5m 0.000 1484320383
hive6.nginx.post.rps_5m 0.763 1484320383
hive6.nginx.post.keepalive_rps_5m 0.000 1484320383
hive6.nginx.post.response_2xx_rps_5m 0.763 1484320383
hive6.nginx.post.response_3xx_rps_5m 0.000 1484320383
hive6.nginx.post.response_4xx_rps_5m 0.000 1484320383
hive6.nginx.post.response_5xx_rps_5m 0.000 1484320383
hive6.nginx.post.request_time_15m 0.000 1484320383
hive6.nginx.post.bytes_sent_15m 147.000 1484320383
hive6.nginx.post.body_bytes_sent_15m 0.000 1484320383
hive6.nginx.post.request_length_15m 111.000 1484320383
hive6.nginx.post.ssl_handshake_time_15m 0.000 1484320383
hive6.nginx.post.ssl_cache_usage_15m 0.000 1484320383
hive6.nginx.post.content_time_15m 0.000 1484320383
hive6.nginx.post.gzip_time_15m 0.000 1484320383
Can you try build nginx only with graphite module. Pehaps conflict between graphite module and yours others modules.
I finally managed to get it work, but only on port 80. My initial server has a 'listen 8081;' directive, and I can't make it work on this one.
I checked all with port 8081, it work. Maybe you have another daemon running on the same port? Or you send requests to the incorrect port? Can you show configuration file and how you send the requests?
Using nginx 1.10.1 (rebuilt from ppa version) on ubuntu 14
All metrics expected are sent, but their values are always 0.000 There no other sign of something being wrong.
nginx -V
nginx -V
nginx version: nginx/1.10.1 built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) built with OpenSSL 1.0.1f 6 Jan 2014 TLS SNI support enabled configure arguments: --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic --add-dynamic-module=./debian/modules/nginx-auth-pam --add-module=./debian/modules/nginx-dav-ext-module --add-dynamic-module=./debian/modules/nginx-echo --add-dynamic-module=./debian/modules/nginx-upstream-fair --add-dynamic-module=./debian/modules/ngx_http_substitutions_filter_module --add-dynamic-module=./debian/modules/graphite-nginx-module
config: graphite_config server=online01.alephd.com frequency=60 intervals=1m|5m|15m;
location ~ /post { ... graphite_data nginx.post; }