Web Hosting Talk







View Full Version : HOW-TO: Install HotSaNIC


eth00
03-21-2005, 07:06 PM
HotSaNIC is a very nice tool which combines all sorts of very important system graphs into a simple and easy to understand webpage. It allows the admin to take a quick glance at the graphs to see what may or may not be working with the system. With the new APPS graph it is also possible to watch as more processes are started which can be helpful in tracking down why the server load is increasing. For instance if you see a huge load spike but you see that the number of exim processes has gone up significantly at the same time you can start to investigate. It also just provides nice graphs to look at.

I built this guide on a cPanel server but it will work fine on an ensim box as well. I don't recall the plesk mailserver off the top of my head but changing that small part will make it work great fine plesk. This guide is also posted on my website.

First, we will need to install RRDtool

-----command-----
cd /usr/local/src/
wget http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool.tar.gz
tar -zxf rrdtool.tar.gz
cd rrdtool*
./configure
make
make install
make site-perl-install
cd ..
rm -fr rrdtool*

-----command-----

Now we will install and configure HotSaNIC

-----command-----
cd /usr/local
wget http://internap.dl.sourceforge.net/sourceforge/hotsanic/hotsanic-0.5.0-pre5.tgz
tar -zxf hotsanic-0.5.0-pre5.tgz
rm -rf hotsanic-0.5.0-pre5.tgz
cd HotSaNIC
./setup.pl

-----command-----

You will be asked a number of questions during the install script.

Module found: APCUSV Do you want to use this module?
Choose 'n'

Module found: APPS Do you want to use this module?
Choose 'y'

Do you want to show this module's graphs on the webpage? (Y/n)
Choose 'y'

Module found: BIND Do you want to use this module?
Choose 'n'

Module found: DISKIO Do you want to use this module?
Choose 'y'

Do you want to show this module's graphs on the webpage? (Y/n)
Choose 'y'

Module found: DNET Do you want to use this module?
Choose 'n'

Module found: MAILQ Do you want to use this module?
Choose 'n' (they only support postfix right now)

Module found: NETSTAT Do you want to use this module?
Choose 'n'

Module found: NETWORKS Do you want to use this module?
Choose 'n'

Module found: PART Do you want to use this module?
Choose 'y'

Do you want to show this module's graphs on the webpage? (Y/n)
Choose 'y'

Module found: SENSORS Do you want to use this module?
Choose 'n'

Module found: SHOUTCAST' Do you want to use this module?
Choose 'n'

Module found: SYSTEM Do you want to use this module?
Choose 'y'

Do you want to show this module's graphs on the webpage? (Y/n)
Choose 'y'

Module found: TRAFFIC Do you want to use this module?
Choose 'y'

Do you want to show this module's graphs on the webpage? (Y/n)
Choose 'y'

Module found: WORMS Do you want to use this module?
Choose 'n'

Found: eth0 - (y)es or (n)o
Choose 'y' (If you are prompted for any other interfaces starting with 'eth0' choose 'n')

Found: lo - (y)es or (n)o
Choose 'n'

0 /usr/local/cpanel/bin/rrdtoolinstall
1 /usr/local/cpanel/bin/rrdtoolcheck
2 /usr/local/cpanel/3rdparty/bin
by just pressing ŽENTERŽ, item "0" will be selected.
select item 0 ... 2? >

Select 0, we are going to change this below anyways.




You are now back at the command prompt. (If it asks you more questions, just accept the default answers.. we are using these settings below....)

Now we are going to start the manual configuration of hotsanic.

-----command-----
cd /usr/local/HotSaNIC/var/settings
pico -w main
-----command-----

press [ctrl -w] then type 'binpath' then press [enter]. Find and change this line.

BINPATH="not configured"

change to

BINPATH="/usr/local/rrdtool-1.0.49/bin"

press [ctrl -w] again then type 'webdir' then press [enter]. Find and change this line.

WEBDIR="not configured"

change to

WEBDIR="/home/username/public_html/stats/"
Note you are going to put this to someplace that is acessible to the internet. I would recommend setting it to a subdomain or a directory within a domain.

press [ctrl -w] again then type 'ctime' then press [enter]. Find and change this line.

CTIME="24"

change to

CTIME="4"

press [ctrl -w] again then type 'convertpath' then press [enter]. Find and change this line. If may already be changed, if so do not worry.

CONVERTPATH="not configured"

change to

CONVERTPATH="/usr/bin/convert"

Finally, to save and exit press [ctrl -x] Y then [enter]. At the prompt type.

pico mod-traffic

Find and change this line:

SWAPIO="no"

change to

SWAPIO="yes"

Again, to save and exit press [ctrl -x] Y then [enter]. At the prompt type.

pico -w mod_system

Go to the bottom and where you see all the IRQ= lines that are not commented out simply delete them.

Again, to save and exit press [ctrl -x] Y then [enter]. At the prompt type.


-----command-----
cat /proc/stat |grep disk_io
-----command-----

It is going to report something like this

disk_io: (8,0):(14081770,10200468,182341484,3881302,100409678) (8,1):(703,442,15844,261,3586)

Edit the disk_io config file

-----command-----
pico -w mod_diskio
-----command-----

At the bottom add:

DEV=8_0,sda
DEV=8_1,sda

If your system has something other then the (8,0) and (8,1) as listed above make sure to put that in the config above. Again, to save and exit press [ctrl -x] Y then [enter]. At the prompt type.

-----command-----
pico -w mod_apps
-----command-----

This mod is going to allow you to track how many of a given service is running. I would say that apache, mysql, and email are the most important. Note that exim is what cPanel uses, if you are using ensim replace it with sendmail. Add the following to the bottom:

APP=httpd,Apache
APP=mysqld,Mysql
APP=exim,Exim

Again, to save and exit press [ctrl -x] Y then [enter]. Note that below when you make the directory it needs to be what you put in the configuration file above. At the prompt type.


-----command-----
cd /usr/local/HotSaNIC
mkdir /home/username/public_html/stats
./rrdgraph start
./makeindex.pl
./diagrams.pl
./convert.pl
-----command-----

You now have HotSaNIC installed

To view HotSaNIC go to http://yourIPaddress/stats/

(it will take a few mins for the graphs to generate data.

Now, Lets set HotSaNIC up so it will start when you reboot your server.

-----command-----
pico /etc/rc.local
-----command-----

Add this line:

/usr/local/HotSaNIC/./rrdgraph start

Then [ctrl -x] Y then [enter] to save

If you are running a dual xeon with multiple CPUs the cpu graphs are going to go out longways. I will try to figure out how to fix that when I get time I was unable to at a quick glance. Thanks to foggy for writting the original version that I based this off of. Please visit my website for some of the other guides I have created.

Blueheaven
03-25-2005, 10:59 PM
great tutorial
I have set it up and working
With my install, it auto added mysql - apache and exim as it read the processes from the server.

wormrage
04-17-2005, 11:04 AM
It just hangs for me on "setting up apps...". How long should this take?

My server is behind APF firewall.

eth00
04-17-2005, 11:22 AM
Hit control +c ONCE, it will sometimes pause when it is trying to find available applications to monitor. You may have to use control c a few more times to get it to finish but most times once works.

Steven
04-17-2005, 12:24 PM
http://www.webhostingtalk.com/showthread.php?s=&threadid=320983

Read this thread as well, was created last year sometime.

namelayer
04-17-2005, 12:33 PM
Nice tut eth00. I have used HotSaNIC for a couple years now and will never go back to mrtg allthough mrtg never gave me problems, I like HotSaNIC much better. I have also setup a page that hotlink to the images I need most to monitor the server. Kind of like a quick stats lookover.

-Dave

diehard
04-17-2005, 01:15 PM
creating images for uptime...
No database found
Please check if the daemon is running.

I get this for all the modules, What am i doing wrong ?

Ramprage
04-19-2005, 04:04 PM
Any chance of a screenshot of the results from this tool?
EDIT ANSWER: Screenshot output here: http://hotsanic.sourceforge.net/example/index.html

Pc-Center.gr
06-02-2005, 10:05 PM
ok what about multiple cpus and hyperthreading that show as two cpus, or even dual xeons that show as 4 cpu (EM64T) ?!?!

Pc-Center.gr
06-15-2005, 10:04 PM
what about rrdtool latest version ???

its a lot better in graphs look n feel...

can you add instructions on this please ???

HD Fanatic
09-07-2006, 04:12 AM
It just hangs for me on "setting up apps...". How long should this take?

My server is behind APF firewall.
happens on my machine too :confused:

HD Fanatic
09-07-2006, 04:45 AM
Found: eth0 - (y)es or (n)o
Choose 'y' (If you are prompted for any other interfaces starting with 'eth0' choose 'n')
I press Y but it doesn't show on the screen...had to press [enter] to continue :confused:

also, the following does not return anything:

cat /proc/stat |grep disk_io
disk_io:

Please advise. :confused:

quid246
09-16-2006, 01:20 AM
ANewDay, can't help you with the problem... but congrats on being sucha Tomb Raider, last posting was over a year ago.