Wednesday, April 1, 2009

Mamadzus - Install Nagios at Debian

want to earn money from internet. Just click & register at here

HOWTO instal Nagios:
- sudo apt-get install apache2
- sudo apt-get install build-essential
- sudo apt-get install libgd2-xpm-dev
- /usr/sbin/useradd -m nagios
- passwd nagios
- /usr/sbin/groupadd nagios
- /usr/sbin/usermod -G nagios nagios
- /usr/sbin/groupadd nagcmd
- /usr/sbin/usermod -a -G nagcmd nagios
- /usr/sbin/usermod -a -G nagcmd www-data
- mkdir ~/downloads
- cd ~/downloads
- wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.6.tar.gz
- wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz

- cd ~/downloads
- tar xzf nagios-3.0.6.tar.gz
- cd nagios-3.0.6
- ./configure --with-command-group=nagcmd
- make all
- make install
- make install-init
- make install-config
- make install-commandmode

*Don’t start Nagios yet - there’s still more that needs to be done...

want to earn money from internet. Just click & register at here

- nano /usr/local/nagios/etc/objects/contacts.cfg
* change email with your valid administrator contact
define contact{
contact_name nagiosadmin ; Short name of$
use generic-contact ; Inherit defau$
alias Nagios Admin ; Full name of $

email ma2d_te@yahoo.com ; <<***** CHANG$ } - make install-webconf - htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin - /etc/init.d/apache2 reload - cd ~/downloads - tar xzf nagios-plugins-1.4.11.tar.gz - cd nagios-plugins-1.4.11 - ./configure --with-nagios-user=nagios --with-nagios-group=nagios - make - make install - /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg - /etc/init.d/nagios start - apt-get install mailx - nano /etc/apache2/conf.d/nagios.conf # SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER # Last Modified: 11-26-2005 # # This file contains examples of entries that need # to be incorporated into your Apache web server # configuration file. Customize the paths, etc. as # needed to fit your system. ScriptAlias /xl/cgi-bin "/usr/local/nagios/sbin"
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user


Alias /xl "/usr/local/nagios/share"


# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user


#utuk membuat templates suatu device
- nano /usr/local/nagios/etc/objects/templates.cfg
# Define a template for NodeB that we can reuse
define host{
name generic-nodeb ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, switches are monitored round the clock
check_interval 5 ; Switches are checked every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each switch 10 times (max)
check_command check-host-alive ; Default command to check if routers are "alive"
notification_period 24x7 ; Send notifications at any time
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}

- nano /usr/local/nagios/etc/nagios.cfg
# Definitions for monitoring a router/switch
cfg_file=/usr/local/nagios/etc/objects/switch.cfg

- nano /usr/local/nagios/etc/objects/switch.cfg

want to earn money from internet. Just click & register at here

regard,
Mamadzus
ma2d_te@yahoo.com

2 comments:

Ronnie Guthrie said...

Thanks!

I also had to:

rm /usr/local/nagios/var/objects.cache

after I modified the switches.cfg to prevent the example Linksys host from lingering :)

Anonymous said...
This comment has been removed by a blog administrator.