2012年8月17日星期五
sudo yum install nginx
config nginx:
server {
listen 8080;
server_name monitor.domain.com;
root /usr/share/cacti/;
index index.php index.html;
try_files $uri $uri/ /index.php;
location ~ \.php$ {
fastcgi_pass unix:/tmp/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
}
sudo yum install php-fpm
config php-fpm: /etc/php-fpm.d/www.conf
listen = /tmp/php5-fpm.sock
/etc/init.d/php-fpm start
sudo yum install cacti
update database in: /etc/cacti/db.php
sudo yum install net-snmp-devel
http://www.cacti.net/spine_install_rhlnx.php
tar xvzf cacti-spine-0.8.7.tar.gzcd spine-0.8.7./configuremake
Open: http://monitor.domain.com, login with admin/admin
Console->Settings->Paths, Set Spine Poller File Path to: /usr/local/spine/bin/spine
Console->Settings->Poller, Set Poller Type to: spine
sudo vi /etc/snmp/snmpd.conf
access notConfigGroup "" any noauth exact all none none
view all included .1 80
sudo /etc/init.d/snmpd restart
snmpwalk -v 2c -c public your_remote_ip system
snmpwalk -v 2c -c public your_remote_ip if
Reference:
http://www.cnblogs.com/taosim/articles/2557762.html
http://docs.cacti.net/manual:087:4_help.2_debugging#debugging
posted by Caiwangqin, 22:50
for remote snmp:
add below into /etc/snmp/snmpd.conf
rocommunity jetlunserver
includeAllDisks
disk /
disk /var/data
disk /var/data2
vi /etc/sysconfig/snmpd
OPTIONS="-LS0-6d -Lf /dev/null -p /var/run/snmpd.pid -a -x 0.0.0.0:161"
http://www.percona.com/doc/percona-monitoring-plugins/cacti/mongodb-templates.html
Once the SSH connection is working, confirm that you can login to MongoDB from with the “mongo” cli tool. From this tool, confirm that the serverStatus command is present by running:
db._adminCommand({serverStatus : 1});
This should produce quite a bit of output. With all of this confirmed, test one of your hosts with the command below. You may need to change some of the example values below, such as the cacti username and the hostname you’re connecting to:
su - cacti -c 'env -i php /var/www/cacti/scripts/ss_get_by_ssh.php --type mongodb --host 127.0.0.1 --items jc,jd'
http://docs.cacti.net/plugin:ugroup#installation
usually monitor, thold, settings plugin is needed
Setup Nginx graph:
sudo passenger-install-nginx-module
select 2. No: I want to customize my Nginx installation. (for advanced users)
Where is your Nginx source code located?
Please specify the directory: /tmp/nginx-1.2.3
Extra Nginx configure options
If you want to pass extra arguments to the Nginx 'configure' script, then
please specify them. If not, then specify nothing and press Enter.
If you specify nothing then the 'configure' script will be run as follows:
sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-http_gzip_static_module --with-cc-opt='-Wno-error' --with-pcre='/tmp/root-passenger-15137/pcre-8.30' --add-module='/usr/lib64/ruby/gems/1.8/gems/passenger-3.0.15/ext/nginx'
Extra arguments to pass to configure script: --with-http_stub_status_module
--------------------------------------------
Confirm configure flags
The Nginx configure script will be run as follows:
sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-http_gzip_static_module --with-cc-opt='-Wno-error' --with-pcre='/tmp/root-passenger-15137/pcre-8.30' --add-module='/usr/lib64/ruby/gems/1.8/gems/passenger-3.0.15/ext/nginx' --with-http_stub_status_module
Is this what you want? (yes/no) [default=yes]: yes
发表评论
订阅 博文评论 [Atom]
<< 主页