PDA

View Full Version : HotSaNIC


domino
30th September 2005, 18:53
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.

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.

How-To: http://www.eth0.us/hotsanic

Ovidiu
19th October 2005, 09:40
thats an awesome howto - worked like a charm - I tried doing the same with mrtg - no chance for, but this just worked :-)

only one question remains: the howto was not for debian, so I think I can't apply the last part of it, when trying to get it to autostart with each reboot, can anyone help with that?

Ovidiu
23rd November 2005, 14:21
anyone experienced in evaluating the output of the netstat module? After tweaking my apache settings I am seeing a lot of time_wait connections, an average of 188 but I don't know how to interpret it.

I know what it means, my apache2 child proc. waiting a certain period (I set that in the apache2 cfg) to see if the conection will be reused.

every how-to I found states that this should be done as a trade of between reusing connections and ram usage,...

anyone got more concrete suggestions? you can have a look at my current serverstats here: h**p://w*w.web-designerz.de/serverstats

!this is intentionally not a direct link!

domino
23rd November 2005, 15:12
Hi,

I love graphs and yours looks really nice :D. Sorry I can't give feedback but I think www.webhostingtalk.com members might can enlighten you. They are pretty helpfull when they want to be. Just don't post the link to your graph or site unless you have it tided down.

heyp
4th December 2005, 19:04
Hi,

i tried the tutorial, but with the newest version of rrdtool.

When i run ./diagrams.pl i get the following error:

Can't locate RRDs.pm in @INC (@INC contains: ./platform ../../lib /etc/perl /usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 .) at ../../lib/HotSaNICdiagram.pm line 7.
BEGIN failed--compilation aborted at ../../lib/HotSaNICdiagram.pm line 7.
Compilation failed in require at ./diagrams.pl line 14.

Any ideas? I've already read every FAQ on this without any help :(

Thx!

heyp
4th December 2005, 19:30
Anyway, got it:

apt-get install librrds-perl solves the problem ;)

Ovidiu
5th December 2005, 00:34
I would like to upgrade to latest rrdtool too but when doing ./configure I get libpng and freetype2 not found also both are installed on my system....
did you have to do any extra steps or did it just work?

I also updated to latest hotsanic version, (has more modules)

heyp
5th December 2005, 08:19
Hi Tenaka,

if you go through the documentation on the rrdtool website, everything will run fine.

http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/doc/rrdbuild.en.html

HTH :)

Grizzly
14th March 2006, 21:47
Hi Tenaka,

if you go through the documentation on the rrdtool website, everything will run fine.

http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/doc/rrdbuild.en.html

HTH :)

Would just like to know if this would also go for a suse 10 server with ispconfig, just got my server up and running. Thanks Falco & Till
(is it safe?)

falko
15th March 2006, 00:16
I haven't tested, but I don't know why it shouldn't work. :)

Ovidiu
28th July 2006, 09:56
how to setup the diskio module if I have raid running?

the how-to states this:

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

It is going to report something like this

disk_io: (8,0):(14081770,10200468,182341484,3881302,1004096 78) (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.

now if I do:
cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 hda1[0] hdc1[1]
497856 blocks [2/2] [UU]

md1 : active raid1 hda3[0] hdc3[1]
79417216 blocks [2/2] [UU]


so how would the lines look like?

Ovidiu
28th July 2006, 10:18
furthermore I cannot get it running with rrdtool 1.2.14 - when running ./diagrams.pl I get the following errors for each module:

----- modules/traffic -----
creating images for eth0 ...
Use of uninitialized value in print at ./diagrams.pl line 148 (#1)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.

To help you figure out what was undefined, perl tells you what operation
you used the undefined value in. Note, however, that perl optimizes your
program and the operation displayed in the warning may not necessarily
appear literally in your program. For example, "that $foo" is
usually optimized into "that " . $foo, and the warning will refer to
the concatenation (.) operator, even though there is no . in your
program.

hour x /var/www/web1/web/serverstats/traffic/eth0-hour.gif
Use of uninitialized value in printf at ./diagrams.pl line 220 (#1)
6 hours 0x0 /var/www/web1/web/serverstats/traffic/eth0-6h.gif
day 0x0 /var/www/web1/web/serverstats/traffic/eth0-day.gif
week 0x0 /var/www/web1/web/serverstats/traffic/eth0-week.gif
month 0x0 /var/www/web1/web/serverstats/traffic/eth0-month.gif
year 0x0 /var/www/web1/web/serverstats/traffic/eth0-year.gif


and no images and neither thumbnails get created.
Any ideas? if not I will have to convert back to rrdtool 1.xxx

Ben
28th July 2006, 11:03
I only had such an error when no data was gathered, e.g. I still have that for ping, because that won't work...

But normally setting up Hotsanic is quite easy.
Copying anywhere, dfining webroot, binary for rrd (compiling it, locating with find / locate), install Imagemagickmodule from CPAN for Perl oder Imagemagick, configure needed services, start...

Ben
28th July 2006, 11:06
Would just like to know if this would also go for a suse 10 server with ispconfig, just got my server up and running. Thanks Falco & Till
(is it safe?)

As mentioned before, it is quite easy. I think it is independent to the fact which or even if you are using any controlpanel.

I just installed it on my debian, but the devel packets zlib etc. did not really work so I compiled the necessary stuff for rrd manually... just keep in mind updating them and recompiling rrd manually in case of securityfixes for them

Ovidiu
28th July 2006, 11:29
@ BEN

maybe you can help me, I first followed this guide http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/doc/rrdbuild.en.html from rrdtool and everything worked ok, as far as I understand, I had to install freetype2 and 2-3 other packages with apt-get but everything worked out.
Then I continued with this guide: http://www.eth0.us/hotsanic and started setting up all modules.

I have to mention that I set up hotsanic severall times by now on different machines and I can get it running with an older version of rrdtool.

with the latest version, when I start ./diagrams.pl I get the error I mentioned above and I do not know what settings to input in the disk_io module as the examples are only about sda and hda and I have raid configured.

Ben
28th July 2006, 11:46
But you get that on all modules or not?
So how long did you wait after starting rrdgraph and running diagrams.pl?

what happens if you start rrdgraph and then take a look with tail -f
at the logs of hotsanic?

Ovidiu
28th July 2006, 12:14
the error happens when running ./diagrams

I waited more than 1 hour. the logfile output is this:

Use of uninitialized value in concatenation (.) or string at
./platform/default.pm line 17 (#1)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.

To help you figure out what was undefined, perl tells you what operation
you used the undefined value in. Note, however, that perl optimizes your
program and the operation displayed in the warning may not necessarily
appear literally in your program. For example, "that $foo" is
usually optimized into "that " . $foo, and the warning will refer to
the concatenation (.) operator, even though there is no . in your
program.

Can't exec "stats": No such file or directory at ./platform/default.pm line 17 (#2)
(W exec) A system(), exec(), or piped open call could not execute the
named program for the indicated reason. Typical reasons include: the
permissions were wrong on the file, the file wasn't found in
$ENV{PATH}, the executable in question was compiled for another
architecture, or the #! line in a script points to an interpreter that
can't be run for similar reasons. (Or maybe your system doesn't support
#! at all.)

Use of uninitialized value in open at ./platform/default.pm line 20 (#1)
Use of uninitialized value in concatenation (.) or string at
./platform/default.pm line 20 (#1)
Uncaught exception from user code:
cannot open : No such file or directory at ./platform/default.pm line 20.
HotSaNICmod::init('start', 'bind') called at ./read-data.pl line 10
Use of uninitialized value in concatenation (.) or string at
./platform/default.pm line 17 (#1)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.

To help you figure out what was undefined, perl tells you what operation
you used the undefined value in. Note, however, that perl optimizes your
program and the operation displayed in the warning may not necessarily
appear literally in your program. For example, "that $foo" is
usually optimized into "that " . $foo, and the warning will refer to
the concatenation (.) operator, even though there is no . in your
program.

Can't exec "stats": No such file or directory at ./platform/default.pm line 17 (#2)
(W exec) A system(), exec(), or piped open call could not execute the
named program for the indicated reason. Typical reasons include: the
permissions were wrong on the file, the file wasn't found in
$ENV{PATH}, the executable in question was compiled for another
architecture, or the #! line in a script points to an interpreter that
can't be run for similar reasons. (Or maybe your system doesn't support
#! at all.)

Use of uninitialized value in open at ./platform/default.pm line 20 (#1)


if I start .rrdgraph and have a look at it with tail I also get these errors:Ö

1154081682 WORMS warn: : unable to update `root.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `cmd.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `default.ida.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `root.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `cmd.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `default.ida.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `root.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `cmd.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `default.ida.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `root.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `cmd.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `default.ida.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `root.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `cmd.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `default.ida.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `root.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `cmd.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `default.ida.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `root.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `cmd.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `default.ida.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `root.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `cmd.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `default.ida.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `root.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `cmd.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `default.ida.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `root.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `cmd.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `default.ida.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `root.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `cmd.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `default.ida.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `root.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `cmd.exe.rrd': can't handle RRD file version 0003
1154081682 WORMS warn: : unable to update `default.ida.rrd': can't handle RRD file version 0003
1154081682: TRAFFIC: unable to update `eth0.rrd': can't handle RRD file version 0003
1154081690 APPS: unable to update 'sshd.rrd': can't handle RRD file version 0003
1154081690 APPS: unable to update 'mysqld.rrd': can't handle RRD file version 0003
1154081690 APPS: unable to update 'proftpd.rrd': can't handle RRD file version 0003
1154081690 APPS: unable to update 'apache2.rrd': can't handle RRD file version 0003
1154081690 APPS: unable to update 'spamassassin.rrd': can't handle RRD file version 0003
1154081690 SYSTEM: unable to update cpu.rrd: can't handle RRD file version 0003
1154081690 SYSTEM: unable to update load.rrd: can't handle RRD file version 0003
1154081690 SYSTEM: nable to update proc.rrd: can't handle RRD file version 0003
1154081690 SYSTEM: nable to update `mem.rrd': can't handle RRD file version 0003
1154081690 SYSTEM: nable to update users.rrd: can't handle RRD file version 0003
1154081690 SYSTEM: unable to update `irq.rrd': can't handle RRD file version 0003
1154081690 SYSTEM: unable to update uptime.rrd: can't handle RRD file version 0003
1154081690 MAILQ: unable to update `queue.rrd': can't handle RRD file version 0003
1154081691 PART: unable to update `_dev_md1.rrd': can't handle RRD file version 0003
1154081691 PART: unable to update `_dev_md0.rrd': can't handle RRD file version 0003
1154081691 NETSTAT: unable to update `connections.rrd': can't handle RRD file version 0003
1154081691: TRAFFIC: unable to update `eth0.rrd': can't handle RRD file version 0003

Ben
28th July 2006, 12:39
What happens if you stop rrdgraph, delete / move these rrds and restart rrdgraph so that it writes othter rrds?

If if does not help, maybe you will find some helpfull links on that here: http://www.google.de/search?hl=de&q=%22can%27t+handle+RRD+file+version+0003%22&btnG=Google-Suche&meta=

Ovidiu
28th July 2006, 13:57
I deleted all *.rrd files but the result is the same. any other idea? if not I am going to use an older rrdtool version.

Ben
28th July 2006, 14:17
I'm using on a CentOS machine 1.2.11 on an RHEL4 1.2.12 without any problems.

Ovidiu
28th July 2006, 15:22
I have it running with rrdtool 1.0.49 - still trying to figure out the diskio module to work with raid device....

Ovidiu
8th August 2006, 11:39
can anyone help me with the configuration of the disk I/O module?

http://www.howtoforge.com/forums/showpost.php?p=35012&postcount=11

Ovidiu
28th August 2006, 11:50
my last question is still unsolved, also I am interested into putting these stats into my own page, any hint on how I would have to start with that? Or should I just hotlink to the output (= the grafics) ?

domino
6th November 2006, 05:19
I gave this a shot under Ubuntu 6.10 and the only thing I could not get running is disk I/O module. this is becaue I have not found the solution with getting disk info on the newer kernel. I think the problem is the the script itself and will need to be updated.

Anyway, I try to get rrdtool-1.2.15 to work but no luck, having the same error messages as Tenaka. As he said, rrdtool 1.0.49 will work fine, minus the disk I/O module. I'll post an update if I ever get this running 100%.