Installing Nagios 3 in CentOS 5.2

Nagios is one of the powerful network device monitoring and visualization..

I did bump on this software few year back.. but never got chance to play with it.
just saw someone else using it at that moment..

let’s give a try.. with rpmforge yum repo enabled ..

yum search nagios

wow.. someone else already made it before..

yum install nagios nagios-plugins nagios-plugins-nrpe nagios-devel -y

nagios
Hmmm.. re-configure and set password file.

vi /etc/nagios/cgi.cfg
htpasswd -c /etc/nagios/htpasswd.users nagiosadmin

start the daemon & restart HTTPd

service nagios restart
service httpd restart

then use http://localhost/nagios
enter the password..

should be able to see localhost service being monitor and all..
to add few other thing..

I love to define the folder into /etc/nagios/nagios.cfg
add this line

cfg_dir=/etc/nagios/namran

then create a directory and set permission accordingly.

mkdir /etc/nagios/namran
chown nagios:nagios /etc/nagios/namran

then create the config file to be added.
[ad#postad]

vi /etc/nagios/namran/wwwnamran.cfg

add the content such as below

define host{
use linux-server
host_name www.namran.net
alias www.namran.net
address 210.48.152.20
}
define service{
use generic-service
host_name www.namran.net
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}
define service{
use generic-service
host_name www.namran.net
service_description HTTP
check_command check_http
notifications_enabled 0
}
define service{
use generic-service
host_name www.namran.net
service_description Cpanel
check_command check_tcp!2082!
notifications_enabled 0
}

chown nagios:nagios /etc/nagios/namran/*.cfg

restart the nagios service

service nagios restart

repeat that with next few server and service that you might want to monitor..

and the result is such as below.. and few other..

Tactical overview
Tactical overview
[ad#postad] host-detail

nagios-gridnagios-screen

Get Free Email Updates!

Signup now and receive an email once I publish new content.

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Like

Related Post

2 Responses

  1. HawkEYE says:

    the step to remove old plesk before can start install a new
    but it is preferable to have a complete system restore..
    *** somehow . to wait for sys-admin to do thing to you.. ah.. a lil’ bit fu*ked thing.. why not ***..

    as root..
    1. yum remove psa-*
    2. yum remove httpd
    3. rm -rf /var/httpd -R
    4. rm -rf /usr/local/psa -R
    5. rm -rf /var/www/vhosts -R
    6. service mysqld stop
    7. If don’t know the root pass for myql .try this as root :
    mysqld_safe –skip-grant-table

    6. mysql -uroot
    i. drop database psa
    ii. drop database phpmyadmin_14813SHFF < -- some serial here can see using show databases; iii. drop database horde; iv. drop database sitebuilder; v. and any other thing .. except test and mysql; vi. may have to reset pass for root to blank ... if u want to delete other user than root in mysql use mysql; delete * from user where User!='root'; update user set Password=PASSWORD('') where User='root'; may be need to add the admin user with pass setup. and with all priv here. insert into user (Host,User,Password) values ('localhost',admin,PASSWORD('something-default-here')); then have to grant.. all the privilege. to the admin then remove mysqld. yum remove mysql. ***.. after that may proceed with re-installation process. note i did'nt remove any other user created before.. such as qmail.. bla..bla.. because we are going to re-install .. then.. ./psa_installer_v3.1.2_build070321.17_os_CentOS_4_i386 answer all question.. wait.. till finished.. hopefully no problem.. may be need to flush the firewall services iptables restart.. then can access to https://server.name.com:8443/

    you should see the login screen..
    wahaha..

    Reply
  2. HawkEYE says:

    the step to remove old plesk before can start install a new
    but it is preferable to have a complete system restore..
    *** somehow . to wait for sys-admin to do thing to you.. ah.. a lil’ bit fu*ked thing.. why not ***..

    as root..
    1. yum remove psa-*
    2. yum remove httpd
    3. rm -rf /var/httpd -R
    4. rm -rf /usr/local/psa -R
    5. rm -rf /var/www/vhosts -R
    6. service mysqld stop
    7. If don’t know the root pass for myql .try this as root :
    mysqld_safe –skip-grant-table

    6. mysql -uroot
    i. drop database psa
    ii. drop database phpmyadmin_14813SHFF < -- some serial here can see using show databases; iii. drop database horde; iv. drop database sitebuilder; v. and any other thing .. except test and mysql; vi. may have to reset pass for root to blank ... if u want to delete other user than root in mysql use mysql; delete * from user where User!='root'; update user set Password=PASSWORD('') where User='root'; may be need to add the admin user with pass setup. and with all priv here. insert into user (Host,User,Password) values ('localhost',admin,PASSWORD('something-default-here')); then have to grant.. all the privilege. to the admin then remove mysqld. yum remove mysql. ***.. after that may proceed with re-installation process. note i did'nt remove any other user created before.. such as qmail.. bla..bla.. because we are going to re-install .. then.. ./psa_installer_v3.1.2_build070321.17_os_CentOS_4_i386 answer all question.. wait.. till finished.. hopefully no problem.. may be need to flush the firewall services iptables restart.. then can access to https://server.name.com:8443/

    you should see the login screen..
    wahaha..

    Reply

Anything to add?

X