Icinga (Monitoring Solution) Installation And Configuration On CentOS - Page 2
Installation of Nagios plugins for monitoring1. Download the Nagios plugin and compile the same: [root@sunil software]# wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz
Cutomization of IcingaMail alert configuration: [root@sunil /]# cd /opt/icinga/etc/ define contact{
contact_nameicingaadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Icinga Admin ; Full name of user
emaildaemon@localhost ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
Change the email address from daemon@localhost to your email address test@sunil.cc. Make sure you had configured smarthost in the CentOS server.
To configure smart host in CentOS[root@suniletc]# rpm -qa|grepsendmail sendmail-8.13.8-2.el5 [root@suniletc]# vim /etc/mail/sendmail.mc Disable the following line: DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl dnl#DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl Enable the following line: dnl define(`SMART_HOST', `smtp.your.provider')dnl Give your smtp address here - in this case sunil.cc: define(`SMART_HOST', `smtp.sunil.cc')dnl [root@sunil /]#m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Installing Nagios Plugin and nrpe in Ubuntu 192.168.1.401. For Ubuntu to be monitored by the Icinga server we need to install Nagios plugin and nrpe: root@ubuntu10:~# apt-get install gcc* root@ubuntu10:~#wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz root@ubuntu10:~# tar -zxvf nagios-plugins-1.4.15.tar.gz 2. Compiling Nagios plugin: root@ubuntu10:~# cd nagios-plugins-1.4.15/
Installation of NRPE (Nagios Remote Plugin Executor)1. Download and compile NRPE: root@ubuntu10:~# wget http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz root@ubuntu10:~# tar -zxvf nrpe-2.12.tar.gz 2. We need to configure the nrpe as a xinetd service: root@ubuntu10:~/nrpe-2.12# vim /etc/xinetd.d/nrpe servicenrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = daemon
group = daemon
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 127.0.0.1
}
3. Edit by adding the Icinga server IP in only_from: servicenrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = daemon
group = daemon
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 127.0.0.1 192.168.1.20
}
4. Now we need to run it as a service by adding the following line: root@ubuntu10:~# vim /etc/services nrpe 5666/tcp 5. Restart the xinetd service: root@ubuntu10:~# /etc/init.d/xinetd restart 6. Check whether nrpe has started: root@ubuntu10:~# netstat -a |grep nrpe To check whether Ubuntu is able to communicate with the Icinga server: root@ubuntu10:~# /usr/local/nagios/libexec/check_nrpe -H localhost NRPE v2.12 You should be able to get this output.
|



Recent comments
1 day 12 hours ago
1 day 20 hours ago
1 day 23 hours ago
2 days 56 min ago
2 days 2 hours ago
2 days 3 hours ago
2 days 5 hours ago
2 days 6 hours ago
2 days 22 hours ago
2 days 23 hours ago