|
Articles tagged network
For past few days, access time to the site becomes quite unpredictable. Half of the time page loads right away, but other half of the time it would take 5-10 seconds. DNS resolves domain names right away, but hangs while connecting to the server.
when I do "wget groups.wuyasea.com" from home, process hangs. But if i ssh to the server and do wget, there's no delays, so I'm totally clueless what's causing it. After diligent work done by my hosting company's staff, they tracked down the Cisco pix was the root of the problem. Reboot the pix, and no more delay! The pix has been running for more than a year, so I guess it's time for a fresh restart.
Views: 1458
Replies: 0
Tags:
network
BackgroundIf you don't know what Ganglia is, then take a look at wikimedia's farm. That's what ganglia does, monitor server's CPU usage, memory, processes count, disk space, bandwidth, etc.For server monitoring, I initially was going to use cacti, but then I discovered Ganglia, a much better solution. Here are a few thing I found when comparing cacti and ganglia,
Due to reasons above, I chosed ganglia for server monitoring. 1. Install GangliaThis installation step is for gentoo linux, if you use other linux OS, please follow instruction on ganglia's site, then proceed to configuration steps.Add "sys-cluster/ganglia" to /etc/portage/package.keywords, then emerge. emerge gangliaThen generate default configurationcd /etc
gmond --default_config > gmond.confTo monitor just one server, here's the configuration. edit /etc/gmond.conf,
Here's the the diff of /etc/gmond.conf
cluster {
name = "for multiple server setup, please see the IBM link at the bottom reference section. 2. Install web interfacesince ganglia only offers front-end in rpm package, and gentoo and rpm don't mix, so we have to get the php front end from source directly.
cd /var/www
svn export http://ganglia.svn.sourceforge.net/svnroot/ganglia/trunk/monitor-core/web/ ganglia_web
# SVN msg: Exported revision 820.
chown -R nginx:nginx ganglia_web
Manually create the required version.php file. If anyone knows how to generate it dynamically, please let me know. cd ganglia_web
cp version.php.in version.phpedit version.php's content to below <?php
# This file is autogenerated
$majorversion = "3";
$minorversion = "0";
$microversion = "3";;
$ganglia_version = "3.0.3";
$ganglia_release_name = "GANGLIA_303";
?>3. Setup Webserver and fastcgiNow last step, create nginx vhost for it. Edit /etc/nginx/nginx.conf
server {
listen 80;
server_name monitor.mysite.com;
location / {
fastcgi_pass 127.0.0.1:1026;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/ganglia$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
}
To run php fastcgi processes, I used spawn-fcgi , which comes with lighttpd, and runs on port 1026 by default. You can edit /etc/conf.d/spawn-fcgi to tweak the settings. reload the nginx webserver. /etc/init.d/nginx reloadnow view http://monitor.mysite.com, and you shall see the stats. Finally, to add nginx and spawnfcgi to the init sequence. rc-update -a nginx default
rc-update -a spawn-fcgi defaultReferencehttp://www-941.ibm.com/collaboration/wiki/display/WikiPtype/gangliahttp://www.ganglia.info/docs/ganglia.html
Views: 2078
Replies: 0
Tags:
network
|
login or sign up
to participate.
Tags
moneywill |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||