David-yanp / mysql-cacti-templates

Automatically exported from code.google.com/p/mysql-cacti-templates
GNU General Public License v2.0
0 stars 0 forks source link

nginx template not working #196

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

First, here is some informations. (nginx listen on port 80)

#uname -a 
Linux ns.domain.tld 2.6.32-5-amd64 #1 SMP Fri Sep 9 20:23:16 UTC 2011 x86_64 
GNU/Linux

#nginx -V
nginx: nginx version: nginx/1.0.6
nginx: TLS SNI support enabled
nginx: configure arguments: --prefix=/etc/nginx 
--conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log 
--http-client-body-temp-path=/var/lib/nginx/body 
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi 
--http-log-path=/var/log/nginx/access.log 
--http-proxy-temp-path=/var/lib/nginx/proxy 
--http-scgi-temp-path=/var/lib/nginx/scgi 
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock 
--pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module 
--with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module 
--with-http_image_filter_module --with-http_realip_module 
--with-http_stub_status_module --with-http_ssl_module --with-http_sub_module 
--with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl 
--with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module 
--add-module=/usr/src/nginx/source/nginx-1.0.6/debian/modules/nginx-echo 
--add-module=/usr/src/nginx/source/nginx-1.0.6/debian/modules/nginx-upstream-fai
r --add-module=/usr/src/nginx/source/nginx-1.0.6/debian/modules/nginx-syslog

Access to nginx_status is enabled and IP addresses allowed are well configured. 
I can access to /nginx_status.

I altered ss_get_by_ssh.php to use root username because I already have ssh key 
configure with this username.

php /usr/share/cacti/site/scripts/ss_get_by_ssh.php --type nginx --host 
ns.domain.tlk --items az,b0
This command always return az:-1 b0:-1

As additional information (if it could help) I also tried to use these 
templates http://forums.cacti.net/about26458.html and same result send back 
from nginx -1

I analysed the ss_get_by_ssh.php script (I am developer in PHP) and the command 
below directly on the remote send back good values:

wget -U Cacti/1.0 -q -O - -T 5 http://ns.domain.tld/nginx_status;

I also tried to implement the patch port available in this issue 
(http://code.google.com/p/mysql-cacti-templates/issues/detail?id=193) to force 
port 80 but it doesn't help.

If you need some other informations, let me know.
Thanks per advance.

Original issue reported on code.google.com by elgl...@phpbb-services.com on 20 Sep 2011 at 6:39