Nagios

"groupadd nagios"
"useradd nagios" bei Debian "useradd nagios -g nagios"
"vi /etc/passwd" und von der /bin/bash in die /bin/false wechseln.
"groupadd nagcmd"
"usermod -G nagcmd apache" bzw. "usermod -G nagcmd daemon" je nach dem welcher User den apachen kontroliert.
"usermod -G nagcmd nagios"
"./configure" oder bei Debian "./configure --prefix=/usr/local/nagios --sysconfdir=/etc/nagios --enable-nanosleep --enable-event-broker --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios -with-nagios-group=nagios --with-command-group=nagcmd --with-httpd-conf=/usr/local/apache2/conf --with-temp-dir=/tmp"

	*** Configuration summary for nagios 3.0.4 10-15-2008 ***:
	
	General Options:
	-------------------------
	Nagios executable:  nagios
	Nagios user/group:  nagios,nagios
	Command user/group:  nagios,nagcmd
	Embedded Perl:  no
	Event Broker:  yes
	Install ${prefix}:  /usr/local/nagios
	Lock file:  ${prefix}/var/nagios.lock
	Check result directory:  ${prefix}/var/spool/checkresults
	Init directory:  /etc/init.d
	Apache conf.d directory:  /usr/local/apache2/conf
	Mail program:  /usr/bin/mail
	Host OS:  linux-gnu
	
	Web Interface Options:
	------------------------
	HTML URL:  http://localhost/nagios/
	CGI URL:  http://localhost/nagios/cgi-bin/
	Traceroute (used by WAP):  /usr/sbin/traceroute

"make all"
"mkdir /etc/nagios"
"chmod -R 777 /etc/nagios"
"make install"
"make install-init"
"make install-commandmode"
"make install-config"
"make install-webconf"
"ln -s /usr/local/nagios/ /etc/nagios/nagios_dir"

Plugin:

"wget http://www.nagios.org"
"tar -xvzf nagios-plugins-1.4.13.tar.gz"
"cd nagios-plugins-1.4.13"
"./configure" oder bei Debian "./configure --sysconfdir=/etc/nagios --with-nagios-user=nagios --with-nagios-group=nagios"
"make"
"make install"

"/usr/local/nagios/libexec/check_ssh localhost" Funktionscheck

Nun die von der "Nagios Installation" erstelle nagios.conf im Apachen Verzeichnis öffnen und den Inhalt
der httpd.conf hinzufügen.

"/etc/init.d/apachectl stop"
"/etc/init.d/apachectl start"
"nagios -v /etc/nagios/nagios.cfg"
"nagios -d /etc/nagios/nagios.cfg"
"/usr/local/apache2/bin/htpasswd -c /etc/nagios/htpasswd.users nagiosadmin"	-> Administrator
"/usr/local/apache2/bin/htpasswd /etc/nagios/htpasswd.users root"

"http://imperator.wenning.corp/nagios/"

Wegen Emailbenachrichtigung sollte senmaild/mail bzw. postfix/exim konfiguiert werden.
#################################################################################################################################################
##Core
lnyx https://www.nagios.org/download/core/
"groupadd nagios"
"useradd nagios" 
"usermod -G nagcmd nagios"
"./configure --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib64 --includedir=/usr/include --enable-event-broker"
mkdir /etc/nagios
make install
make install-init
make install-commandmode
make install-config
make install-webconf
make install-exfoliation
make install-classicui
	make install-exfoliation

/usr/bin/install -c -m 644 sample-config/httpd.conf /usr/local/apache2/conf/nagios.conf
vi /etc/nagios/objects/contacts.cfg
/usr/local/apache2/bin/htpasswd -c /etc/nagios/htpasswd.users nagiosadmin
nagios -v /etc/nagios/nagios.cfg
chown -R nagios:nagios /usr/local/nagios
chmod 777 /usr/local/nagios/var/rw/nagios.cmd
nagios /etc/nagios/nagios.cfg &
/usr/local/apache2/bin/apachectl stop
/usr/local/apache2/bin/apachectl start

##Plug-Ins
"wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz"
tar -xzf nagios-plugins-2.0.3.tar.gz 
./configure --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib64 --includedir=/usr/include -with-nagios-user=nagios --with-nagios-group=nagios
make
make install

#############
Monitoring Linux

via SNMP

via AGENT

Post Revisions: