모니터링

비호환OS dell Dset 실행하기.

Dell에서 cli기반의 진단Tool인 Dset은 Dell에서 정식지원되지 않는 OS버전이라도 몇가지 파일을 수정하면 실행 가능합니다.

(비호환OS이니 잘 안되도.. 어쩔수가 없어요.. ㅠㅠ)

  1. DellDset 실행파일 다운로드\\ (http://linux.dell.com)
  2. Dset 실행파일 편집

    [root@localhost ~]# vi delldset_v2.1.0.112_A00.bin
    ...
    ...
    # rm -rf $_TEMP_ARCHIVE $_TEMP_PACKAGE_GENERATOR $_TEMPDIR 2> /dev/null
    # 178번 줄 rm -rf 로 시작하는 명령어를 주석처리 후 실행
    ...
    ...
    권한
    설정 후 실행
  3. [root@localhost ~]# chmod +x delldset_v2.1.0.112_A00.bin
    [root@localhost ~]# ./delldset_v2.1.0.112_A00.bin
    Choose an option:
    1) Read DSET Release Notes First
    Show latest information concerning features and known issues
    
    2) Create DSET Report Only
    Creates a DSET report and saves it to user's home directory
    
    3) Clear ESM Hardware Log Only
    Only clears the ESM Hardware Log contents
    
    4) Install/Upgrade DSET Application
    Permanently installs or upgrades the DSET application for repeat use
    
    Enter option (1-4) or 'q' to quit: q

    실행하지 않아도 되고 quit 처리하면 /tmp폴더에 delldset으로 시작하는 폴더가 생성되어 있을꺼예요.
  4. 설치 파일 확인
    # ls -l /tmp
    total 8
    drwx------. 2 root root 4096 Jul 20 13:28 delldset_v2.1.0.112_A00.bin-1288-4067
  5. dset패키지 설치
    [root@localhost ~]# cd /tmp/delldset_v2.1.0.112_A00.bin-1288-4067
    [root@localhost ~]# yum localinstall delldset-2.1.0-112.i386.rpm
  6. dellsysteminfo명령어 수정

    [root@localhost ~]# which dellsysteminfo
    /usr/bin/dellsysteminfo

    [root@localhost ~]# vi /usr/bin/dellsysteminfo
    교체내용 –
    $RpmPath/dset/bin 에서 $RpmPath을 /opt/dell/으로 내용 교체

  7. dset 실행
    [root@localhost ~]# dellsysteminfo --time --nologs
    error: incorrect format: unknown tag
    Dell System E-Support Tool
    @Copyright Dell Inc. 2004-2010 Version 2.1 build 112
    NOTE: Customer information has not been specified yet.
    This information is optional but it can assist Dell Technical Support.
    Enter your company name:
    * Getting Linux system summary information ...
    Gathering Network Information ...
    Gathering OS Summary Information ...
    * Xsltproc is not installed. Installing now...
    * Uninstalling the installed xsltproc..
    * Getting Linux operating system configuration information ...
    Gathering Boot Information ...
    Gathering Module Information ...
    Gathering Memory Information ...
    Gathering Storage Information ...
    Gathering Network Information
    Gathering Summary Information ...
    * Gathering chassis information...
    * Gathering DRAC Information...
    * Converting DRAC txt information to XML format...
    * Gathering storage information...
    Note: Scanning for supported SCSI or RAID controllers... [please wait]
    * Collecting storage information...
    * Transforming XML files ...
    * Xsltproc is not installed. Installing now...
    * Uninstalling the installed xsltproc..
    * Xsltproc is not installed. Installing now...
    * Uninstalling the installed xsltproc..
    * Xsltproc is not installed. Installing now...
    * Uninstalling the installed xsltproc..
    * Creating table of contents ...
    * Unloading framework core
    * DSET Instrumentation uninstalled successfully
    * Compressing report...
    A compressed, encrypted ZIP report archive was saved at: /root/DSET_Report_for_123..zip
  8. dset 결과 확인
    •  /root밑에 DSET_Report로 시작하는 압축파일이 생성될꺼예용. 그 파일 압축해제 후 dsetreport.hta 파일 실행시키면
      하드웨어 정보를 볼 수 있습니다.
    • 만약에 압축파일이 생성되지 않으면 zip명령어가 없거나 정상적으로 실행되지 않는 경우이니 zip을 설치하시면 됩니다. (압축해제 비밀번호는 dell 입니다.)

Cacti 설치 메뉴얼

개요

  1. snmp를 이용해 리소스 수집 후 rrdtool을 이용해 그래프화한 오픈소스 (license : GPLv2)
  2. simple architecture ( https://docs.cacti.net/manual:088:2_basics.0_principles_of_operation#basics )
  3. Cacti버전 : 0.8.8h가 마지막 릴리즈(상용설치 버전), 2017년 1월부터 1.x 버전이 릴리즈 되고 있으며,
    1.x버전 부터는 기능추가 및 UI 개선으로 요구하는 리소스 값이 매우 커짐 (ex. php max_execution_time = 60에서 max_execution_time = 3600)
    커진 리소스 값만큼 활용도가 있을것으로 판단되지 않아 1.x은 당분간 구축계획 없음

제한사항

  1. cacti spine을 이용하면 poller시 성능향상에 도움이 되나, 리소스 수집에 문제가 생길만큼 많은 정보를 수집하지 않아 작성하지 않았음
  2. Mysql : 상용환경에서는 별도버전으로 내려받아 설치하나, 상용환경 DB설치 메뉴얼은 별도 문서로 작성되어 있기 때문에 포함하지 않음
  3. Apache / Mysql  : 어플리케이션별 보안설정이 필요하나 고객사별로 진단기준이 다르고, 설치절차에 영향받는게 아니라서 본문서에 포함하지 않음
  4. Apache / php : 소스파일을 내려받아 컴파일 하는 절차는 본 문서에서 다루지 않고, 패키지 형태로 내려받아 설치하였음
  5. OS는 Centos 7버전을 기준으로 작성하였고, Centos6버전에서 실행할 경우 "Cen6 =" 으로 추가 코멘트 작성하였음
  6. Cacti 구성은 이중화를 고려하지 않았음

경로정보

  1. Apache :  /usr/bin
  2. Apache Config : /etc/httpd/conf/
  3. Cacti webapp : /svc/cacti/public_html/

작업절차

  1. 어플리케이션 설치
    $> yum install rrdtool httpd net-snmp net-snmp-utils net-snmp-devel php-gd php php-snmp gd-devel php-mysql php-pdo php-mysqli  mariadb-server mariadb-libs -y
  1. DB구성 (database 생성 / 계정생성)
    # mysql_install_db --force --user=mysql
    Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
    
    # systemctl start mariadb
    * Cen6 = /etc/init.d/mysql start 으로 실행
    # mysql -u root
    MariaDB [(none)]> create database cacti;
    Query OK, 1 row affected (0.001 sec)
    MariaDB [(none)]> grant all privileges on cacti.* to 'cacti'@'localhost' identified by '{cacti패스워드}';
    Query OK, 0 rows affected (0.000 sec)
    MariaDB [(none)]> flush privileges;
    Query OK, 0 rows affected (0.000 sec)
  2. DB접근 테스트
    mysql -u cacti -p
    Enter password: {cacti패스워드 입력}
    MariaDB [(none)]> use cacti;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    MariaDB [cacti]>
  3. Cacti용 웹서버 구성(파일 생성하면 됨)
    # cat /etc/httpd/conf.d/cacti.conf
    Listen 8800
    <Virtualhost *:8800>
     Documentroot "/svc/cacti/public_html"
     Customlog "logs/cacti-access.log" combined
     errorlog "logs/cacti-error.log"
    </Virtualhost>
  4. Apache 접근 허용
    # vi /etc/httpd/conf/httpd.conf
    ...
    <Directory ></Directory>
        AllowOverride none
        Require all denied <-- 주석처리 혹은 삭제하면 됨
    </Directory>
    ...
    * Cen6 = Deny from all 으로 대체 표기
  5. apache name설정 (Option)
    # vi /etc/httpd/conf/httpd.conf
    ...
    ServerName localhost
    ...
  6. php 설정
    #vi /etc/php.ini
    ...
    ;date.timezone = --> timezone= Asia/Seoul 로 변경
  7. Cacti webapp 다운로드 후 설치
    # mkdir /svc/cacti/
    # wget 'https://www.cacti.net/downloads/cacti-0.8.8h.tar.gz'
    # tar -zxvf cacti-0.8.8h.tar.gz
    # mv cacti-0.8.8h /svc/cacti/public_html
    # cd /svc/cacti/public_html
  8. Cacti DB 입력
    # mysql -u cacti -p cacti < cacti.sql
    Enter password: {cacti패스워드 입력}}}}
    * Cacti DB 데이터 입력 중 2211번줄 rows 테이블 에러발생시 조치방법 (2217번에 명시된 rows 테이블이름 변경 필요)

    rows int(12) NOT NULL default '600', -->   ₩rows₩ int(12) NOT NULL default '600', 으로 변경
  9. DB 설정 (아래 내용으로 설정되면 됨)
    $> vi /svc/cacti/public_html/include/config.php
    ...
    database_default=데이터베이스이름
    database_hostname=DB서버IP
    database_username = 데이터베이스 접근 사용자이름
    database_password = 접근 사용자 패스워드
    database_port = DB포트정보
    database_ssl = DB접속시 SSL 사용여부
    url_path = 브라우져 접속 경로 (http://127.0.0.1/cacti/으로 접속해야 하는 경우 "/cacti/" 로 설정해두면 됨
  10. Apache 설정값 이상여부 확인 후 서비스 실행
    #apachectl configtest
    OK
    # systemctl start httpd;systemctl enable httpd
    Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
    * Cent6 = /etc/init.d/httpd start;chkconfig httpd on 으로 사용
  11. 프로세스 및 포트 정보 실행여부 확인
    $> ps -ef | grep http
    root     32439     1  0 17:54 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
    apache   32441 32439  0 17:54 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
    apache   32442 32439  0 17:54 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
    apache   32443 32439  0 17:54 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
    apache   32444 32439  0 17:54 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
    apache   32445 32439  0 17:54 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
    root     32512 20163  0 17:55 pts/0    00:00:00 grep --color=auto http
    
    $> netstat -antp | grep httpd
    tcp6       0      0 :::8800                 :::*                    LISTEN      32677/httpd
  12. 웹브라우저에서 접속 URL : http://{{서버IP}}:8800
  13. select type of install 에 new install 선택 후 Next
  14. 경로정보중 오류있는 설정값 있는지 확인 후 없으면 Finish
  15. 최초 로그인 정보는 user : admin / password : admin
  16. 패스워드 변경 진행
  17. Poller 실행 및 적용
    $> /bin/php /svc/cacti/public_html/poller.php
    ...
    $> echo "* * * * * /bin/php /svc/cacti/public_html/poller.php > /dev/null" >> /var/spool/cron/root

Centos에서 HP PSP설치

  1. hpe.com 에서 서버 모델별 패키지 파일 다운로드

    image-1654668614770.png


  2. snmp 서비스 설치 및 활성화
    $> yum install net-snmp -y
  3. 압축 해제
    $> tar -zxvf hp-psp-8.60-8-CentOS.tar.gz
    $> cd psp/CentOS/5/i386/current
  4. HP PSP 설치 및 구성하기
    $> yum localinstall ./*.rpm
    $> /sbin/hpsnmpconfig
    
    This configuration script will configure SNMP to integrate with the HP SIM and
    the HP System Management Homepage by editting the snmpd.conf file. The HP-SNMP-Agents can also exist in a more secure
    SNMP environment (e.g. VACM) that you have previously configured. See the
    hp-snmp-agents(4) man page for specific details on how to configure the VACM entries
    in the ‘snmpd.conf’ file. You may press <ctrl+c> now to exit now if needed.
    
    Do you wish to use an existing snmpd.conf (y/n) (Blank is n): 엔터
    
    You will now be asked a series of SNMP configuration questions. How you answer
    these question will affect the way SNMP behaves. Configuring SNMP could have
    security implications on your system. If you are not sure how to answer a
    question, you can abort by pressing and no changes will be made to
    your SNMP configuration.
    
    Enter the localhost SNMP Read/Write community string
    (one word, required, no default): public
    Re-enter the same input to confirm: public
    ACCEPTED: inputs match!
    
    Enter localhost SNMP Read Only community string
    (one word, Blank to skip):
    Enter Read/Write Authorized Management Station IP or DNS name
    (Blank to skip): 엔터
    Enter Read Only Authorized Management Station IP or DNS name
    (Blank to skip): 엔터
    Enter default SNMP trap community string
    (One word; Blank to skip): 엔터
    Enter SNMP trap destination IP or DNS name
    (One word; Blank to skip): 엔터
    The system contact is set to
    syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
    Do you wish to change it (y/n) (Blank is n): 엔터
    The system location is set to
    syslocation Unknown (edit /etc/snmp/snmpd.conf)
    Do you wish to change it (y/n) (Blank is n): 엔터
    
    ==============================================================================
    NOTE: New snmpd.conf entries were added to the top of /etc/snmp/snmpd.conf
    ==============================================================================
    snmpd is started
  5. HP PSP 서비스 실행
    $> /etc/init.d/snmpd start
    $> /etc/init.d/hp-snmp-agents start
    $> /etc/init.d/hpsmhd restart
    $> /etc/init.d/hp-health start
    $> /etc/init.d/hp-asrd start
  6. PSP 포트 상태 확인
    $> netstat -antp | grep hp
    ...
    tcp   0  0  0.0.0.0:2381    0.0.0.0:*  LISTEN   9035/hpsmhd
    tcp   0  0  0.0.0.0:2301    0.0.0.0:*  LISTEN   9035/hpsmhd
    ...
  7. PSP 접속하기 - http://서버IP:2381/ (계정정보는 root계정과 동일)

    image-1654668602392.png


  8. psp패키지 삭제절차
    $> yum erase hp*
  9. HP 툴이름별 역활
    툴 이름 역  활
    hp-healt  hhp시스템상태 및 명렬줄 유틸리티
    hponcfg iLO온라인 구성 유틸리티
    hp-snmp-agents 시스템 management snmp 에이전트
    hpsmh 시스템 관리 홈페이지
    hp-smh-templates 홈페이지 템플릿
    cpqacuxe 디스크 구성 유틸리티
    hp-ams iLO 내부상태 및 경고 지원

Centos에서 zabbix설치하기

OS : Centos6


  1. 사전에 필요한 툴 : apache, php, mysql
    $> yum install httpd mysql-server -y
  2. 필요패키지 설치
    $> yum install -y net-snmp net-snmp-devel net-snmp-utils curl-devel libxml2-devel
  3. 컴파일&설치
    $> groupadd zabbix
    $> useradd -g zabbix zabbix
    
    $> tar -zxvf zabbix-2.4.5.tar.gz
    $> cd zabbix-2.4.5
    $> ./configure \
    --prefix=/usr/local/zabbix \
    --with-mysql=/usr/local/mysql/bin/mysql_config \
    --with-net-snmp \
    --with-libcurl \
    --with-libxml2 \
    --enable-server \
    --enable-agent
    $> make;make install

    * 설치경로는 /usr/local/zabbix, mysql설치 경로는 /usr/local/mysql
  4. DB구성
    $> mysql -u root
    mysql> create database zabbix;
    mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix1';
    mysql> flush privileges;
    mysql> quit


    $> cd database/mysql/
    $> mysql -u zabbix -p zabbix < schema.sql
    $> mysql -u zabbix -p zabbix < images.sql
    $> mysql -u zabbix -p zabbix < data.sql

    * MYSQL import는 순서대로 하면 됨
  5. Frontent 적용
    $> vi /usr/local/zabbix/etc/zabbix_server.conf
    ...
    DBName=zabbix
    DBUser=zabbix
    DBPassword=zabbix1

    *기존내용에서 DBName, DBUser, DBPassword를 위에서 설정한 내용으로 적용하면 되요
  6. Frontend 복사
    $> cp -ar {소스경로}/frontends/php /usr/local/apache2/htdocs/zabbix
  7. 웹 브라우져로 접속 (기본로그인 ID는 Admin, 패스워드는 zabbix)
    http://서버IP/zabbix

dell 서버 Open Manage Server Administrator설치

패키지 설치하기

$> wget -q -O – http://linux.dell.com/repo/hardware/OMSA_6.3/bootstrap.cgi | bash
$> yum -y install srvadmin-all
$> /opt/dell/srvadmin/sbin/srvadmin-services.sh start

접속방법 https://서버IP:1311
로그인 계정은 root계정

테스트 : Dell 2950, Centos 5.8 x86
centos 6버전은 32비트는 설치가 안되고, 64비트만 공식지원한다고 하네요..ㅠ_ㅠ

URL : http://linux.dell.com/wiki/index.php/Repository/OMSA#Yum_setup

PCP기반의 시스템 모니터링

  1. 소 개
    1. PCP;Performance Co-Pilot은 성능측정 모니터링 / 시각화 / 저장 및 분석을 위한 라이브러리 입니다.
    2. 복잡한 시스템을 중앙 집중식으로 분석을 용이하하게 하기 위한 경량 분산 아키텍쳐
    3. 실시간 데이터 모니터링 및 관리 가능
    4. 로깅 저장 분석 가능
  2. 시스템 구성1. 서비스 데몬 종류는 다음과 같이 구성 

      1. pmcd - 성능 지표 수집
      2. pmda - 성능 지표 도메인 에이전트,
      3. pminfo / pmstat - 데이터 검색 / 표시 / 아키이빙
    1. 시스템 구성은 로깅 구성 방식에 따라 다르게 구현 가능

      1. 분산 로깅 구성

      image-1659416994705.png

       

       


      1. 중앙 집중 로깅 구성

         

        image-1659416948819.png



      2. 페더레이션 구성

         

        image-1659416975056.png

        image-1659416966575.png



    2. 데몬 종류
      1. pmcd - 성능 지표 수집용 데몬
      2. pmie - 성능 지표 엔진
      3. pmlogger - 성능 지표 로거
      4. pmproxy - 실시간 성능 지표 프로세스 (REST API 서비스)
    3.  Redhat에서 확인한 시스템 용량 정보1.

      시스템 수량별 구성요소

      서버수

      1~10

      10~100

      100~1000

      pmcd n개 n개 n개
      pmlogger 최소 1개 이상(n개) n개/10 ~ n개 n개/100 ~ n개
      pmproxy 최소 1개 이상(n개) n개 n개/100 ~ n개
      redis 최소 1개 이상(n개) n개 ~ n/10개 n개/100 ~ n/10개
      redis 클러스터 구성 X 권장 필수
      권장 구성 중앙 / 분산 / 페더레이션 중앙 / 분산 / 페더레이션 분산 or 페더레이션
      1. 권장 하드웨어 사양(중앙 집중 로그예제, 10초 단위 수집)

        호스트 수

        10

        50

        아카이브스토리지 (1일 기준) 91MB 522MB
        pmlogger 메모리 160MB 580MB
        pmlogger 인바운드 트래픽(1일 기준) 2MB 9MB
        pmproxy 메모리 1.4GB 6.3GB
        Redis 메모리 (1일기준) 2.6GB 12GB
      2. 권장 하드웨어 사양(중앙 집중 로그예제, 60초 단위 수집)

        호스트 수

        10

        50

        100

        아카이브스토리지 (1일 기준) 20MB 120MB 271MB
        pmlogger 메모리 104MB 524MB 1049MB
        pmlogger 인바운드 트래픽(1일 기준) 0.38MB 1.75MB 3.48MB
        pmproxy 메모리 2.67GB 5.5GB 9GB
        Redis 메모리 (1일기준) 0.54GB 2.65GB 5.3GB