Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Server monitoring with HotSaNIC
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
PedroKiefer
n00b
n00b


Joined: 23 Mar 2003
Posts: 6
Location: Porto Alegre - RS - Brazil

PostPosted: Mon Mar 08, 2004 1:24 am    Post subject: Server monitoring with HotSaNIC Reply with quote

I was seeking some way to monitor my servers, but wasn't in the mood to write the apropried scripts to have rrdtool working. So, after some hours of googling i've found HotSaNIC, that does the dirty work for me. So here it is, a simple guide to have it working. ( I think I saw a thread with an ebuild for it, but I installed mine from the tarball )
I suppose you have apache (or other webserver) installed and running.

1. Emerging the software
Start by emerging rrdtool, snmp, imagemagick, oh, you need perl also, but I guess you have that already.
Code:

emerge snmp rrdtool imagemagick

Then get the tarball for HotSaNIC in http://hotsanic.sourceforge.net/

2. Configure snmp
Code:

#cat /etc/snmp/snmpd.conf
com2sec local   127.0.0.1/32    public
com2sec local   192.168.1.0/24  public
 
group MyROGroup v1         local
group MyROGroup v2c        local
group MyROGroup usm        local
 
view all    included  .1                               80
 
access MyROGroup ""      any       noauth    exact  all    none   none
 
syslocation MyLocation
syscontact Me <me@somewhere.org>


3. Install HotSaNIC
Code:

(~)# cd /opt
(/opt)# cp <path_to_hotsanic_tar> .
(/opt)# tar xvzf hotsanic*.tgz
(/opt)# rm hotsanic*.tgz
(/opt)# cd HotSaNIC
(/opt/HotSaNIC)# ./setup.pl

Answer the interactive setup throught out the end, then check the the file setting and configure any other thing that wasn't configured. (Most likely the publishing path)

4. Create a init script for hotsanic
My init script is really ugly, but it works, if anyone has a better one, send me and I'll change it here.
Code:

(/opt/HotSaNIC)# cat /etc/init.d/hotsanic
#!/sbin/runscript
 
depends() {
        use logger
        need snmpd
}
 
start() {
        ebegin "Starting HotSaNIC"
        /opt/HotSaNIC/rrdgraph start >/dev/null 2>/dev/null &
        eend $?
}
 
stop() {
        ebegin "Stoping HotSaNIC"
        /opt/HotSaNIC/rrdgraph stop >/dev/null 2>/dev/null &
        eend $?
}


5. Finalizing
Run:
Code:

(/opt/HotSaNIC)# /sbin/depscan.sh
(/opt/HotSaNIC)# /etc/init.d/snmpd start
(/opt/HotSaNIC)# /etc/init.d/hotsanic start

wait for a seconds, then issue:
Code:

(/opt/HotSaNIC)# ./makeindex.pl
(/opt/HotSaNIC)# ./diagrams.pl
(/opt/HotSaNIC)# ./convert.pl


Now go to you favorite browser and check the url you configured for publishing, you should be seeing some nice graphics now ;)

Any questions, just ask, and sorry for any english mistakes, has been a while that I don't use it.
Back to top
View user's profile Send private message
smouge
n00b
n00b


Joined: 22 Jan 2003
Posts: 66
Location: Oosterhout, the Netherlands

PostPosted: Sun Mar 21, 2004 9:50 am    Post subject: Reply with quote

What about this?

New Ebuild Hotsanic

https://forums.gentoo.org/viewtopic.php?t=72160&highlight=
_________________
Can't think about anything funny to place here
Back to top
View user's profile Send private message
redalert_007
n00b
n00b


Joined: 06 Mar 2004
Posts: 12

PostPosted: Sun Mar 28, 2004 10:14 pm    Post subject: Reply with quote

Pedro:
Thanks you soo much!....working in my all machines like a champ!


VALEU!
Back to top
View user's profile Send private message
zeky
Guru
Guru


Joined: 24 Feb 2003
Posts: 470
Location: Vukojebina, Europe

PostPosted: Tue Mar 30, 2004 6:06 am    Post subject: Reply with quote

God.... This is _REALLY_ some great stuff 8O
_________________
Beat your dick like it owes you money
Back to top
View user's profile Send private message
revertex
l33t
l33t


Joined: 23 Apr 2003
Posts: 806

PostPosted: Fri Dec 24, 2004 6:53 am    Post subject: Reply with quote

Pedro,

thanks a lot, work's like a champ here.
i know there is a ebuild, but it need webapp-config and apache, and i don't plan to install apache, thttpd is enough for my needs.

I'm proud to see a nice tutorial from a gaúcho.
Back to top
View user's profile Send private message
Boris27
Guru
Guru


Joined: 05 Nov 2003
Posts: 562
Location: Almelo, The Netherlands

PostPosted: Fri Dec 24, 2004 3:51 pm    Post subject: Reply with quote

If I wanted to include stats of a remote interface (like the modem in my gateway machine, with the hotsanic and apache deamons running on my server), how would I go about it?

I reckon I'd need to setup SNMPd on the gateway, and put the interface in the traffic mod, but is that all?
_________________
we are microsoft, lower your firewalls and surrender your pc's. we will add your biological and technological distinctiveness to our own. your culture will adapt and service us. resistance is futile.
Back to top
View user's profile Send private message
Boris27
Guru
Guru


Joined: 05 Nov 2003
Posts: 562
Location: Almelo, The Netherlands

PostPosted: Fri Dec 24, 2004 8:53 pm    Post subject: Reply with quote

Hmm...

Another question.

I run a 2.6 kernel. How do I find out the device number for my disk? I tried ls -al /dev and the output is this:

Code:
lr-xr-xr-x   1 root root      32 Dec 24 18:34 hda -> ide/host0/bus0/target0/lun0/disc
lr-xr-xr-x   1 root root      33 Dec 24 18:34 hda1 -> ide/host0/bus0/target0/lun0/part1
lr-xr-xr-x   1 root root      33 Dec 24 18:34 hda2 -> ide/host0/bus0/target0/lun0/part2


Because of this I believe the correct device number is 32... However that is only the minor number. Its major is missing.

I tried:

DEV=32_0,hda

But that doesnt work....

Anyone know what the correct number is?
_________________
we are microsoft, lower your firewalls and surrender your pc's. we will add your biological and technological distinctiveness to our own. your culture will adapt and service us. resistance is futile.
Back to top
View user's profile Send private message
revertex
l33t
l33t


Joined: 23 Apr 2003
Posts: 806

PostPosted: Tue Dec 28, 2004 3:09 am    Post subject: Reply with quote

same here, but i've got this error message running diagram.pl
Code:
----- modules/diskio -----
  No database found
  Please check if the daemon is running.
  No database found
  Please check if the daemon is running


looking at
Code:
/opt/HotSaNIC/modules/diskio/platform/linux.pm

it seems support to 2.6 kernel is not implemented.
Back to top
View user's profile Send private message
upengan78
l33t
l33t


Joined: 27 Jun 2007
Posts: 711
Location: IL

PostPosted: Thu Apr 05, 2012 4:03 pm    Post subject: Reply with quote

Is the procedure still the same?:D

I wonder what URL it is ? I see index.html created in "not configured" directory

not configured # ls -al
Code:
total 48
drwx------ 10 root root 4096 Apr  5 10:48 .
drwxrwxr-x 12  502  505 4096 Apr  5 10:59 ..
drwx------  2 root root 4096 Apr  5 11:00 apcusv
drwx------  2 root root 4096 Apr  5 10:47 apps
drwx------  2 root root 4096 Apr  5 11:00 diskio
-rw-------  1 root root 6787 Apr  5 11:00 index.html
drwx------  2 root root 4096 Apr  5 11:00 networks
drwx------  2 root root 4096 Apr  5 11:00 part
drwx------  2 root root 4096 Apr  5 10:48 sensors
drwx------  2 root root 4096 Apr  5 11:00 system
drwx------  2 root root 4096 Apr  5 11:00 traffic
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum