opsview를 CentOS에서 설치 하는 방법입니다.
( tested CentOS 6.4 x86_64 )
opsview는 nagios를 기반으로 한 모니터링 관리툴입니다.
core 버전의 경우 무료로 사용할수 있으며 모니터링 하고자 하는 시스템에 agent를 따로 설치해서 설정 해두면 관리가 수월해집니다.
1. SELINUX 비활성화
[root@ruo91 ~]# sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/g’ /etc/sysconfig/selinux
2. opsview 저장소 등록
RPMForge 저장소를 등록 합니다.
[root@ruo91 ~]# rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
opsview.repo라는 이름으로 저장소 파일을 하나 생성합니다.
[root@ruo91 ~]# nano /etc/yum.repos.d/opsview.repo
[opsview]
name = Opsview
baseurl = http://downloads.opsview.com/opsview-core/latest/yum/centos/6/$basearch
enabled = 1
protect = 0
gpgcheck = 0
3. opsview 설치
[root@ruo91 ~]# yum update -y ; yum install -y opsview perl-DBIx-Class
4. MySQL 설정
[root@ruo91 ~]# mysqladmin -u root password ‘123456789’
시스템 부팅시 자동으로 실행 되도록 설정
[root@ruo91 ~]# chkconfig –level 345 mysqld on
5. opsview 설정
db, rumtime 데이터베이스의 password를 설정 합니다.
[root@ruo91 ~]# sed -i ‘s/”changeme”/”123456789″/g’ /usr/local/nagios/etc/opsview.conf
mysql의 권한 설정
[root@ruo91 ~]# /usr/local/nagios/bin/db_mysql -u root -p123456789
opsview 데이터베이스를 설치 합니다.
[root@ruo91 ~]# /usr/local/nagios/bin/db_opsview db_install
[root@ruo91 ~]# /usr/local/nagios/bin/db_runtime db_install
필요한 구성 파일을 생성합니다.
[root@ruo91 ~]# chmod 777 /var/log/opsview
[root@ruo91 ~]# /usr/local/nagios/bin/rc.opsview gen_config
Thu Aug 8 01:45:50 2013 Starting
Thu Aug 8 01:45:50 2013 –> Writing config files for Master Monitoring Server
Thu Aug 8 01:45:50 2013 Created distributed information
Thu Aug 8 01:45:50 2013 Created keyword lookup list for 2 keywords
Thu Aug 8 01:45:50 2013 71 commands written to checkcommands.cfg
Thu Aug 8 01:45:50 2013 22 service definitions written to services.cfg
Thu Aug 8 01:45:50 2013 1 hosts written to hosts.cfg
Thu Aug 8 01:45:50 2013 1 hostgroups written to hostgroups.cfg
Thu Aug 8 01:45:50 2013 3 contacts (2 profiles) written to contacts.cfg
Thu Aug 8 01:45:50 2013 3 contacts written to htpasswd.users
Thu Aug 8 01:45:50 2013 6 groups written to contactgroups.cfg
Thu Aug 8 01:45:50 2013 Written nagios.cfg
Thu Aug 8 01:45:50 2013 Written cgi.cfg
Thu Aug 8 01:45:50 2013 Written misccommands.cfg
Thu Aug 8 01:45:50 2013 Written timeperiods.cfg
Thu Aug 8 01:45:50 2013 Written notificationmethodvariables.cfg
Thu Aug 8 01:45:50 2013 Written nsca.cfg
Thu Aug 8 01:45:50 2013 Written nrd.conf
Thu Aug 8 01:45:50 2013 Written send_nrd.cfg
Thu Aug 8 01:45:50 2013 Written send_nsca.cfg
Thu Aug 8 01:45:50 2013 Written ndo2db.cfg
Thu Aug 8 01:45:50 2013 Written ndomod.cfg
Thu Aug 8 01:45:50 2013 5 dependencies written to services.cfgNagios config re-generated in 0.364 seconds
6. opsview web application server 실행
[root@ruo91 ~]# /etc/init.d/opsview-web start
Starting opsview-web: done
기본적으로 아이디와 비밀번호는 아래와 같습니다. (로그인 후 비밀번호를 변경 해주세요.)
ID : admin
Pass : initial