Red Hat OpenStack Platform 운영 툴


Red Hat OpenStack Platform 8

OpenStack 환경의 중앙 집중식 로깅 및 모니터링

OpenStack Documentation Team

초록

이 문서에서는 중앙 집중식 로깅, 가용성 모니터링 및 성능 모니터링을 제공하는 운영 툴의 설치 및 구성에 대해 설명합니다.

머리말

Red Hat OpenStack Platform에는 운영자가 OpenStack 환경을 유지 관리할 수 있도록 설계된 선택적 툴 모음이 포함되어 있습니다. 툴은 다음 기능을 수행합니다.

  • 중앙 집중식 로깅
  • 가용성 모니터링
  • 성능 모니터링

이 문서에서는 이러한 툴의 준비 및 설치에 대해 설명합니다.

주의

Red Hat OpenStack Platform Operational Tool Suite는 현재 기술 프리뷰입니다. Red Hat 기술 프리뷰에 대한 자세한 내용은 기술 프리뷰 기능 지원 범위를 참조하십시오.

1장. 아키텍처

1.1. 중앙 집중식 로깅

중앙 집중식 로깅 툴체인은 다음과 같은 여러 구성 요소로 구성됩니다.

  • 로그 컬렉션 에이전트(Fluentd)
  • 로그 릴레이/Transformer(Fluentd)
  • 데이터 저장소(Elasticsearch)
  • API/Presentation Layer (Kibana)

이러한 구성 요소와 상호 작용은 다음 다이어그램에 나와 있습니다.

그림 1.1. 높은 수준의 중앙 집중식 로깅 아키텍처

그림 1.2. Red Hat OpenStack Platform용 단일 노드 배포

그림 1.3. Red Hat OpenStack Platform용 HA 배포

1.2. 가용성 모니터링

가용성 모니터링 툴체인은 다음과 같은 여러 구성 요소로 구성됩니다.

  • 모니터링 에이전트(Sensu)
  • 모니터링 릴레이/Proxy(RabbitMQ)
  • 모니터링 컨트롤러/서버(Sensu)
  • API/Presentation Layer(Uchiwa)

이러한 구성 요소와 상호 작용은 다음 다이어그램에 나와 있습니다.

그림 1.4. 높은 수준의 가용성 모니터링 아키텍처

그림 1.5. Red Hat OpenStack Platform용 단일 노드 배포

그림 1.6. Red Hat OpenStack Platform용 HA 배포

1.3. 성능 모니터링

성능 모니터링 툴체인은 다음과 같은 여러 구성 요소로 구성됩니다.

  • 컬렉션 에이전트(컬렉션됨)
  • 컬렉션 수집기/레이어(Graphite)
  • 데이터 저장소(whisperdb)
  • API/Presentation Layer(Grafana)

이러한 구성 요소와 상호 작용은 다음 다이어그램에 나와 있습니다.

그림 1.7. 높은 수준의 성능 모니터링 아키텍처

그림 1.8. Red Hat OpenStack Platform용 단일 노드 배포

그림 1.9. Red Hat OpenStack Platform용 HA 배포

2장. 중앙 집중식 로깅 제품군 설치

2.1. 중앙 집중식 로그 릴레이/Transformer 설치

  1. 다음 최소 사양을 충족하는 베어 메탈 시스템을 찾습니다.

    • 8GB 메모리
    • 단일 소켓 Xeon 클래스 CPU
    • 500GB의 디스크 공간
  2. Red Hat Enterprise Linux 7을 설치합니다.
  3. 시스템이 Operational Tools 패키지에 액세스할 수 있도록 허용합니다.

    1. 시스템을 등록하고 구독하십시오.

      # subscription-manager register
      # subscription-manager list --consumed
      Copy to Clipboard Toggle word wrap

      OpenStack 서브스크립션이 자동으로 연결되지 않은 경우 수동으로 서브스크립션을 연결하는 설명서를 참조하십시오.

    2. 처음 활성화된 리포지토리를 비활성화하고 Operational Tools에 적합한 리포지토리만 활성화합니다.

      # subscription-manager repos --disable=*
      # subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-7-server-optional-rpms --enable=rhel-7-server-openstack-8-optools-rpms
      Copy to Clipboard Toggle word wrap
      참고

      기본 OpenStack 리포지토리(rhel-7-server-openstack-8-rpms)는 이 노드에서 활성화되지 않아야 합니다. 이 리포지토리에는 Operational Tools 패키지와 호환되지 않을 수 있는 특정 운영 툴 종속 항목의 최신 버전이 포함될 수 있습니다.

  4. 다음 명령을 실행하여 Elasticsearch,FluentdKibana 소프트웨어를 설치합니다.

    # yum install elasticsearch fluentd rubygem-fluent-plugin-elasticsearch kibana httpd
    Copy to Clipboard Toggle word wrap
  5. Elasticsearch 에서 CORS(Cross-origin resource sharing)를 활성화합니다. 이렇게 하려면 /etc/elasticsearch/elasticsearch.yml 을 편집하고 파일 끝에 다음 행을 추가합니다.

    http.cors.enabled: true
    http.cors.allow-origin: "/.*/"
    Copy to Clipboard Toggle word wrap
    참고

    이렇게 하면 모든 웹 서버의 모든 웹 페이지에서 Elasticsearch JavaScript 애플리케이션을 호출할 수 있습니다. Kibana 서버의 CORS만 허용하려면 다음을 사용합니다.

    http.cors.allow-origin: "http://LOGGING_SERVER"
    Copy to Clipboard Toggle word wrap

    IP 주소 또는 호스트 이름을 Kibana에 액세스할지 여부에 따라 LOGGING_SERVER Kibana 서버의 IP 주소 또는 호스트 이름으로 교체합니다. 그러나 Elasticsearch 서비스가 신뢰할 수 있는 호스트에서만 액세스할 수 있는 경우 "/.*/" 를 사용하는 것이 안전합니다.

  6. Elasticsearch 인스턴스를 시작하고 부팅 시 활성화합니다.

    # systemctl start elasticsearch
    # systemctl enable elasticsearch
    Copy to Clipboard Toggle word wrap

    Elasticsearch 인스턴스가 작동하는지 확인하려면 다음 명령을 실행합니다.

    # curl http://localhost:9200/
    Copy to Clipboard Toggle word wrap

    다음과 유사한 응답이 제공됩니다.

    {
      "status" : 200,
      "name" : "elasticsearch.example.com",
      "cluster_name" : "elasticsearch",
      "version" : {
        "number" : "1.5.2",
        "build_hash" : "c88f77ffc81301dfa9dfd81ca2232f09588bd512",
        "build_timestamp" : "2015-02-19T13:05:36Z",
        "build_snapshot" : false,
        "lucene_version" : "4.10.3"
      },
      "tagline" : "You Know, for Search"
    }
    Copy to Clipboard Toggle word wrap
  7. 로그 데이터를 수락하고 Elasticsearch 에 작성하도록 Fluentd 를 구성합니다. /etc/fluentd/fluent.conf 를 편집하고 해당 콘텐츠를 다음으로 바꿉니다.

    # In v1 configuration, type and id are @ prefix parameters.
    # @type and @id are recommended. type and id are still available for backward compatibility
    
    <source>
      @type forward
      port 4000
      bind 0.0.0.0
    </source>
    
    <match **>
      @type elasticsearch
      host localhost
      port 9200
      logstash_format true
      flush_interval 5
    </match>
    Copy to Clipboard Toggle word wrap
  8. Fluentd 를 시작하고 부팅 시 활성화합니다.

    # systemctl start fluentd
    # systemctl enable fluentd
    Copy to Clipboard Toggle word wrap
    작은 정보

    Fluentd 의 저널을 확인하고 시작 시 오류가 없는지 확인합니다.

    # journalctl -u fluentd -l -f
    Copy to Clipboard Toggle word wrap
  9. Elasticsearch 인스턴스를 가리키도록 Kibana 를 구성합니다. /etc/httpd/conf.d/kibana3.conf 를 만들고 다음 내용을 내부에 배치합니다.

    <VirtualHost *:80>
    
      DocumentRoot /usr/share/kibana
      <Directory /usr/share/kibana>
        Require all granted
        Options -Multiviews
      </Directory>
    
    </VirtualHost>
    Copy to Clipboard Toggle word wrap
  10. KibanaElasticsearch 에 대한 액세스를 권한 있는 사용자에게만 제한하려면 이러한 서비스가 개방형 네트워크의 시스템에서 실행되고 HTTP 기본 인증을 사용하여 가상 호스트를 보호하고 프록시 뒤에서 Elasticseach 를 이동하기 때문입니다. 이렇게 하려면 다음 단계를 수행합니다.

    1. 다음 콘텐츠를 사용하여 /etc/httpd/conf.d/kibana3.conf 파일을 생성(또는 다시 작성)합니다.

      <VirtualHost *:80>
      
        DocumentRoot /usr/share/kibana
        <Directory /usr/share/kibana>
          Options -Multiviews
          AuthUserFile /etc/httpd/conf/htpasswd-kibana
          AuthName "Restricted Kibana Server"
          AuthType Basic
          Require valid-user
        </Directory>
      
        # Proxy for Elasticsearch
        <LocationMatch "^/(_nodes|_aliases|.*/_aliases|_search|.*/_search|_mapping|.*/_mapping)$">
          ProxyPassMatch http://127.0.0.1:9200/$1
          ProxyPassReverse http://127.0.0.1:9200/$1
        </LocationMatch>
      
        # Proxy for kibana-int/{dashboard,temp}
        <LocationMatch "^/(kibana-int/dashboard/|kibana-int/temp)(.*)$">
          ProxyPassMatch http://127.0.0.1:9200/$1$2
          ProxyPassReverse http://127.0.0.1:9200/$1$2
        </LocationMatch>
      
      </Virtualhost>
      Copy to Clipboard Toggle word wrap
      참고

      AuthUserFile 옵션과 AuthName 옵션에 대해 다른 경로를 사용할 수 있습니다.

    2. Kibana 에 액세스할 수 있는 사용자 이름과 암호 쌍을 생성합니다. 이렇게 하려면 다음 명령을 실행합니다.

      # htpasswd -c /etc/httpd/conf/htpasswd-kibana user_name
      Copy to Clipboard Toggle word wrap
      참고

      AuthUserFile 옵션에 다른 경로를 사용하는 경우 그에 따라 명령을 변경합니다.

      user_name 을 선택한 사용자 이름으로 교체합니다. 메시지가 표시되면 이 사용자 이름과 함께 사용할 암호를 입력합니다. 암호를 다시 입력하라는 메시지가 표시됩니다.

    3. 선택적으로 다음 명령을 실행하여 자체 암호를 사용하여 더 많은 사용자를 생성합니다.

      # htpasswd /etc/httpd/conf/htpasswd-kibana another_user_name
      Copy to Clipboard Toggle word wrap
    4. localhost 인터페이스에서만 수신 대기하도록 Elasticsearch 를 구성합니다. 이렇게 하려면 편집기에서 /etc/elasticsearch/elasticsearch.yml 파일을 열고 다음 옵션을 추가합니다.

      network.host: 127.0.0.1
      Copy to Clipboard Toggle word wrap
    5. 다음 옵션을 /etc/elasticsearch/elasticsearch.yml 에 추가하여 CORS로 HTTP 기본 인증 데이터를 사용할 수 있도록 Elasticsearch 를 구성해야 합니다.

      http.cors.allow-credentials: true
      Copy to Clipboard Toggle word wrap
    6. 이러한 변경 사항을 적용하려면 Elasticsearch 를 다시 시작하십시오.

      # systemctl restart elasticsearch
      Copy to Clipboard Toggle word wrap
    7. 마지막으로 프록시를 사용하여 Elasticsearch 파일을 다운로드하고 브라우저에서 HTTP 기본 인증 데이터를 전송하는지 확인합니다. 이렇게 하려면 /usr/share/kibana/config.js 파일을 편집합니다. 이 파일에서 다음 행을 찾습니다.

      elasticsearch: "http://"+window.location.hostname+":9200",
      Copy to Clipboard Toggle word wrap

      다음과 같이 변경합니다.

      elasticsearch: {server: "http://"+window.location.hostname, withCredentials: true},
      Copy to Clipboard Toggle word wrap
  11. Kibana (Inside Apache)를 활성화하여 Elasticsearch 에 연결한 다음 Apache를 시작하고 부팅 시 활성화합니다.

    # setsebool -P httpd_can_network_connect 1
    # systemctl start httpd
    # systemctl enable httpd
    Copy to Clipboard Toggle word wrap
  12. 시스템에서 방화벽을 열어 Fluentdhttpd 에 대한 연결을 허용합니다.

    # firewall-cmd --zone=public --add-port=4000/tcp --permanent
    # firewall-cmd --zone=public --add-service=http --permanent
    # firewall-cmd --reload
    Copy to Clipboard Toggle word wrap
  13. 또한 HTTP 인증 및 Elasticsearch 프록시를 구성하지 않은 경우 방화벽을 열어 Elasticsearch 에 대한 직접 연결을 허용합니다.

    # firewall-cmd --zone=public --add-port=9200/tcp --permanent
    # firewall-cmd --reload
    Copy to Clipboard Toggle word wrap
    중요

    HTTP 인증을 사용하여 KibanaElasticseach 에 대한 액세스를 제한하지 않으면 Kibana 및 Elasticsearch에서 제공하는 정보는 인증 없이 모든 사람이 사용할 수 있습니다. 데이터를 보호하려면 시스템 또는 열려 있는 TCP 포트(80, 4000, 9200)가 신뢰할 수 있는 호스트에서만 액세스할 수 있는지 확인합니다.

2.2. 모든 노드에 로그 컬렉션 에이전트 설치

OpenStack 환경의 모든 시스템에서 로그를 수집하여 중앙 집중식 로깅 서버로 보내려면 모든 OpenStack 시스템에서 다음 명령을 실행합니다.

  1. 운영 툴 리포지토리를 활성화합니다.

    # subscription-manager repos --enable=rhel-7-server-openstack-8-optools-rpms
    Copy to Clipboard Toggle word wrap
  2. fluentdrubygem-fluent-plugin-add:을 설치합니다.

    # yum install fluentd rubygem-fluent-plugin-add
    Copy to Clipboard Toggle word wrap
  3. 모든 OpenStack 로그 파일을 읽을 수 있는 권한이 있도록 Fluentd 사용자를 구성합니다. 다음 명령을 실행하여 수행합니다.

    # for user in {keystone,nova,neutron,cinder,glance}; do usermod -a -G $user fluentd; done
    Copy to Clipboard Toggle word wrap

    누락된 그룹에 대한 일부 노드에서 오류가 발생할 수 있습니다. 일부 노드에서 모든 서비스를 실행하는 것은 아니므로 무시할 수 있습니다.

  4. Fluentd 를 구성합니다. /etc/fluentd/fluent.conf 가 다음과 같이 표시되는지 확인합니다. LOGGING_SERVER 를 위에 구성된 중앙 집중식 로깅 서버의 호스트 이름 또는 IP 주소로 교체하십시오.

    # In v1 configuration, type and id are @ prefix parameters.
    # @type and @id are recommended. type and id are still available for backward compatibility
    
    # Nova compute
    <source>
      @type tail
      path /var/log/nova/nova-compute.log
      tag nova.compute
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match nova.compute>
      type add
      <pair>
        service nova.compute
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Nova API
    <source>
      @type tail
      path /var/log/nova/nova-api.log
      tag nova.api
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match nova.api>
      type add
      <pair>
        service nova.api
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Nova Cert
    <source>
      @type tail
      path /var/log/nova/nova-cert.log
      tag nova.cert
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match nova.cert>
      type add
      <pair>
        service nova.cert
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Nova Conductor
    <source>
      @type tail
      path /var/log/nova/nova-conductor.log
      tag nova.conductor
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match nova.conductor>
      type add
      <pair>
        service nova.conductor
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Nova Consoleauth
    <source>
      @type tail
      path /var/log/nova/nova-consoleauth.log
      tag nova.consoleauth
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match nova.consoleauth>
      type add
      <pair>
        service nova.consoleauth
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Nova Scheduler
    <source>
      @type tail
      path /var/log/nova/nova-scheduler.log
      tag nova.scheduler
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match nova.scheduler>
      type add
      <pair>
        service nova.scheduler
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Neutron Openvswitch Agent
    <source>
      @type tail
      path /var/log/neutron/openvswitch-agent.log
      tag neutron.openvswitch
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match neutron.openvswitch>
      type add
      <pair>
        service neutron.openvswitch
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Neutron Server
    <source>
      @type tail
      path /var/log/neutron/server.log
      tag neutron.server
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match neutron.server>
      type add
      <pair>
        service neutron.server
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Neutron DHCP Agent
    <source>
      @type tail
      path /var/log/neutron/dhcp-agent.log
      tag neutron.dhcp
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match neutron.dhcp>
      type add
      <pair>
        service neutron.dhcp
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Neutron L3 Agent
    <source>
      @type tail
      path /var/log/neutron/l3-agent.log
      tag neutron.l3
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match neutron.l3>
      type add
      <pair>
        service neutron.l3
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Neutron Metadata Agent
    <source>
      @type tail
      path /var/log/neutron/metadata-agent.log
      tag neutron.metadata
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match neutron.metadata>
      type add
      <pair>
        service neutron.metadata
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Keystone
    <source>
      @type tail
      path /var/log/keystone/keystone.log
      tag keystone
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match keystone>
      type add
      <pair>
        service keystone
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Glance API
    <source>
      @type tail
      path /var/log/glance/api.log
      tag glance.api
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match glance.api>
      type add
      <pair>
        service glance.api
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Glance Registry
    <source>
      @type tail
      path /var/log/glance/registry.log
      tag glance.registry
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match glance.registry>
      type add
      <pair>
        service glance.registry
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Cinder API
    <source>
      @type tail
      path /var/log/cinder/api.log
      tag cinder.api
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match cinder.api>
      type add
      <pair>
        service cinder.api
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Cinder Scheduler
    <source>
      @type tail
      path /var/log/cinder/scheduler.log
      tag cinder.scheduler
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match cinder.scheduler>
      type add
      <pair>
        service cinder.scheduler
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    # Cinder Volume
    <source>
      @type tail
      path /var/log/cinder/volume.log
      tag cinder.volume
      format multiline
      format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>.*)\] (?<message>.*)/
      time_format %F %T.%L
    </source>
    
    <match cinder.volume>
      type add
      <pair>
        service cinder.volume
        hostname "#{Socket.gethostname}"
      </pair>
    </match>
    
    <match greped.**>
      @type forward
      heartbeat_type tcp
      <server>
        name LOGGING_SERVER
        host LOGGING_SERVER
        port 4000
      </server>
    </match>
    Copy to Clipboard Toggle word wrap
  5. Fluentd 가 구성되었으므로 Fluentd 서비스를 시작하고 부팅 시 활성화합니다.

    # systemctl start fluentd
    # systemctl enable fluentd
    Copy to Clipboard Toggle word wrap

이제 http://LOGGING_SERVER/index.html#/dashboard/file/logstash.json 에서 실행되는 Kibana 에 액세스하여 로그 채우기를 시작할 수 있습니다. Kibana 구성에서 HTTP 기본 인증을 활성화한 경우 이 페이지에 액세스하려면 유효한 사용자 이름과 암호를 입력해야 합니다.

참고

기본적으로 로깅 서버의 프런트 페이지인 http://LOGGING_SERVER/ 는 기술 요구 사항 및 추가 구성 정보를 제공하는 Kibana 시작 화면입니다. 여기에서 로그를 사용할 수 있도록 하려면 Kibana 애플리케이션 디렉터리의 default.json 파일을 logstash.json 으로 교체하지만 나중에 이 파일이 다시 필요한 경우 default.json 의 백업 사본을 생성합니다.

# mv /usr/share/kibana/app/dashboards/default.json /usr/share/kibana/app/dashboards/default.json.orig
# cp /usr/share/kibana/app/dashboards/logstash.json /usr/share/kibana/app/dashboards/default.json
Copy to Clipboard Toggle word wrap

3장. Availability Monitoring Suite 설치

3.1. 모니터링 릴레이/Controller 설치

  1. 다음 최소 사양을 충족하는 베어 메탈 시스템을 찾습니다.

    • 4GB 메모리
    • 단일 소켓 Xeon 클래스 CPU
    • 100GB의 디스크 공간
  2. Red Hat Enterprise Linux 7을 설치합니다.
  3. 시스템이 Operational Tools 패키지에 액세스할 수 있도록 허용합니다.

    1. 시스템을 등록하고 구독하십시오.

      # subscription-manager register
      # subscription-manager list --consumed
      Copy to Clipboard Toggle word wrap

      OpenStack 서브스크립션이 자동으로 연결되지 않은 경우 수동으로 서브스크립션을 연결하는 설명서를 참조하십시오.

    2. 처음 활성화된 리포지토리를 비활성화하고 Operational Tools에 적합한 리포지토리만 활성화합니다.

      # subscription-manager repos --disable=*
      # subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-7-server-optional-rpms --enable=rhel-7-server-openstack-8-optools-rpms
      Copy to Clipboard Toggle word wrap
      참고

      기본 OpenStack 리포지토리(rhel-7-server-openstack-8-rpms)는 이 노드에서 활성화되지 않아야 합니다. 이 리포지토리에는 Operational Tools 패키지와 호환되지 않을 수 있는 특정 운영 툴 종속 항목의 최신 버전이 포함될 수 있습니다.

  4. 시스템에서 방화벽을 열어 RabbitMQUchiwa 에 대한 연결을 허용합니다.

    # firewall-cmd --zone=public --add-port=5672/tcp --permanent
    # firewall-cmd --zone=public --add-port=3000/tcp --permanent
    # firewall-cmd --reload
    Copy to Clipboard Toggle word wrap
  5. 모니터링 서버에 필요한 구성 요소를 설치합니다.

    # yum install sensu uchiwa redis rabbitmq-server
    Copy to Clipboard Toggle word wrap
  6. 백본 서비스인 RabbitMQRedis 를 구성합니다. RedisRabbitMQ 를 모두 시작하고 부팅 시 활성화합니다.

    # systemctl start redis
    # systemctl enable redis
    # systemctl start rabbitmq-server
    # systemctl enable rabbitmq-server
    Copy to Clipboard Toggle word wrap
  7. 호스트에 액세스할 수 있는 사용자 이름 및 암호 조합을 사용하여 sensu 에 대해 새 RabbitMQ 가상 호스트를 구성합니다.

    # rabbitmqctl add_vhost /sensu
    # rabbitmqctl add_user sensu sensu
    # rabbitmqctl set_permissions -p /sensu sensu ".*" ".*" ".*"
    Copy to Clipboard Toggle word wrap
  8. 이제 기본 서비스가 실행 및 구성되었으므로 Sensu 모니터링 서버를 구성합니다. 다음 콘텐츠를 사용하여 /etc/sensu/conf.d/rabbitmq.json 을 생성합니다.

    {
      "rabbitmq": {
        "port": 5672,
        "host": "localhost",
        "user": "sensu",
        "password": "sensu",
        "vhost": "/sensu"
      }
    }
    Copy to Clipboard Toggle word wrap
  9. 다음으로 다음 콘텐츠를 사용하여 /etc/sensu/conf.d/redis.json 을 생성합니다.

    {
      "redis": {
        "port": 6379,
        "host": "localhost"
      }
    }
    Copy to Clipboard Toggle word wrap
  10. 마지막으로 다음 콘텐츠를 사용하여 /etc/sensu/conf.d/api.json 을 생성합니다.

    {
      "api": {
        "bind": "0.0.0.0",
        "port": 4567,
        "host": "localhost"
      }
    }
    Copy to Clipboard Toggle word wrap
  11. 모든 Sensu 서비스를 시작하고 활성화합니다.

    # systemctl start sensu-server
    # systemctl enable sensu-server
    # systemctl start sensu-api
    # systemctl enable sensu-api
    Copy to Clipboard Toggle word wrap
  12. Sensu 의 웹 인터페이스인 Uchiwa 를 구성합니다. 이렇게 하려면 /etc/uchiwa/uchiwa.json 을 편집하고 기본 콘텐츠를 다음으로 바꿉니다.

    {
      "sensu": [
        {
          "name": "Openstack",
          "host": "localhost",
          "port": 4567
        }
      ],
      "uchiwa": {
        "host": "0.0.0.0",
        "port": 3000,
        "refresh": 5
      }
    }
    Copy to Clipboard Toggle word wrap
  13. Uchiwa 웹 인터페이스를 시작하고 활성화합니다.

    # systemctl start uchiwa
    # systemctl enable uchiwa
    Copy to Clipboard Toggle word wrap

3.2. 모든 노드에 가용성 모니터링 에이전트 설치

OpenStack 환경의 모든 시스템을 모니터링하려면 모두 다음 명령을 실행합니다.

  1. 운영 툴 리포지토리를 활성화합니다.

    # subscription-manager repos --enable=rhel-7-server-openstack-8-optools-rpms
    Copy to Clipboard Toggle word wrap
  2. Sensu 설치:

    # yum install sensu
    Copy to Clipboard Toggle word wrap
  3. Sensu 에이전트를 구성합니다. /etc/sensu/conf.d/rabbitmq.json 을 다음과 같이 편집합니다. MONITORING_SERVER 를 이전 섹션에 구성된 모니터링 서버의 호스트 이름 또는 IP 주소로 교체합니다.

    {
      "rabbitmq": {
        "port": 5672,
        "host": "MONITORING_SERVER",
        "user": "sensu",
        "password": "sensu",
        "vhost": "/sensu"
      }
    }
    Copy to Clipboard Toggle word wrap
  4. 다음 콘텐츠를 포함하도록 /etc/sensu/conf.d/client.json 을 편집합니다. FQDN 을 시스템의 호스트 이름으로 바꾸고 ADDRESS 를 시스템의 공용 IP 주소로 교체하십시오.

    {
      "client": {
        "name": "FQDN",
        "address": "ADDRESS",
        "subscriptions": [ "all" ]
      }
    }
    Copy to Clipboard Toggle word wrap
  5. 마지막으로 Sensu 클라이언트를 시작하고 활성화합니다.

    # systemctl start sensu-client
    # systemctl enable sensu-client
    Copy to Clipboard Toggle word wrap

이제 http://MONITORING_SERVER:3000 에서 실행되는 Uchiwa 에 액세스할 수 있습니다.

4장. Performance Monitoring Suite 설치

4.1. 컬렉션 수집기/Relay 설치

  1. 다음 최소 사양을 충족하는 베어 메탈 시스템을 찾습니다.

    • 4GB 메모리
    • 단일 소켓 Xeon 클래스 CPU
    • 500GB의 디스크 공간
  2. Red Hat Enterprise Linux 7을 설치합니다.
  3. 시스템이 Operational Tools 패키지에 액세스할 수 있도록 허용합니다.

    1. 시스템을 등록하고 구독하십시오.

      # subscription-manager register
      # subscription-manager list --consumed
      Copy to Clipboard Toggle word wrap

      OpenStack 서브스크립션이 자동으로 연결되지 않은 경우 수동으로 서브스크립션을 연결하는 설명서를 참조하십시오.

    2. 처음 활성화된 리포지토리를 비활성화하고 Operational Tools에 적합한 리포지토리만 활성화합니다.

      # subscription-manager repos --disable=*
      # subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-7-server-optional-rpms --enable=rhel-7-server-openstack-8-optools-rpms
      Copy to Clipboard Toggle word wrap
      참고

      기본 OpenStack 리포지토리(rhel-7-server-openstack-8-rpms)는 이 노드에서 활성화되지 않아야 합니다. 이 리포지토리에는 Operational Tools 패키지와 호환되지 않을 수 있는 특정 운영 툴 종속 항목의 최신 버전이 포함될 수 있습니다.

  4. 시스템에서 방화벽을 열어 GraphiteGrafana 에 연결할 수 있습니다 :

    # firewall-cmd --zone=public --add-port=2003/tcp --permanent
    # firewall-cmd --zone=public --add-port=3030/tcp --permanent
    # firewall-cmd --reload
    Copy to Clipboard Toggle word wrap
  5. 완료되면 다음 명령을 실행하여 GraphiteGrafana 소프트웨어를 설치합니다.

    # yum install python-carbon graphite-web grafana httpd
    Copy to Clipboard Toggle word wrap
  6. 액세스를 허용하도록 Grafana 웹 인터페이스를 구성합니다. /etc/httpd/conf.d/graphite-web.conf 를 편집하고 다음과 같이 Require 행을 수정합니다.

    ...
    <Directory "/usr/share/graphite/">
        <IfModule mod_authz_core.c>
            # Apache 2.4
            Require all granted
        </IfModule>
    ...
    Copy to Clipboard Toggle word wrap
  7. /etc/grafana/grafana.ini 를 편집하고 http_port3030 으로 변경합니다.
  8. Graphite 웹 뒤에 있는 데이터베이스를 동기화합니다. 다음 명령을 실행합니다. 슈퍼유저를 만들려면 메시지가 표시되면 no 를 선택합니다.

    # sudo -u apache /usr/bin/graphite-manage syncdb --noinput
    Copy to Clipboard Toggle word wrap
  9. 모든 GraphiteGrafana 서비스를 시작하고 활성화합니다.

    # systemctl start httpd
    # systemctl enable httpd
    # systemctl start carbon-cache
    # systemctl enable carbon-cache
    # systemctl start grafana-server
    # systemctl enable grafana-server
    Copy to Clipboard Toggle word wrap
  10. Graphite 인스턴스와 통신하도록 Grafana 를 구성합니다.

    1. http://PERFORMANCE_MONITORING_HOST:3030/ 로 이동합니다. Grafana 로그인 페이지가 표시됩니다.
    2. 시스템에 로그인할 admin/admin 의 기본 자격 증명을 입력합니다.
    3. 로그인한 후 화면의 왼쪽 상단에 있는 Grafana 로고를 클릭한 다음 데이터 소스를 선택합니다.
    4. 페이지 상단에 새 추가 를 클릭하고 다음 세부 정보를 입력합니다.

      Expand

      이름

      Graphite

      기본

      제공됨 (선택)

      유형

      Graphite

      Url

      http://localhost/

      액세스

      proxy

      기본 인증

      no (unselected)

    5. 마지막으로 하단의 추가 버튼을 클릭합니다.

4.2. 모든 노드에 성능 모니터링 컬렉션 에이전트 설치

OpenStack 환경의 모든 시스템의 성능을 모니터링하려면 모두 다음 명령을 실행합니다.

  1. 운영 툴 리포지토리를 활성화합니다.

    # subscription-manager repos --enable=rhel-7-server-openstack-8-optools-rpms
    Copy to Clipboard Toggle word wrap
  2. collectd 설치 :

    # yum install collectd
    Copy to Clipboard Toggle word wrap
  3. 성능 모니터링 집계자/레이레이에 데이터를 전송하도록 collectd 를 구성합니다. 이렇게 하려면 다음 콘텐츠를 사용하여 /etc/collectd.d/10-write_graphite.conf 를 생성합니다. 여기서 PERFORMANCE_MONITORING_HOST 는 이전에 성능 모니터링 수집기/리레이어로 구성된 호스트의 호스트 이름 또는 IP 주소입니다.

    <LoadPlugin write_graphite>
      Globals false
    </LoadPlugin>
    
    <Plugin write_graphite>
      <Carbon>
        Host "PERFORMANCE_MONITORING_HOST"
        Port "2003"
        Prefix "collectd."
        EscapeCharacter "_"
        StoreRates true
        LogSendErrors true
        Protocol "tcp"
      </Carbon>
    </Plugin>
    Copy to Clipboard Toggle word wrap
  4. SELinux를 사용하는 경우 collectd to tcp 네트워크 연결을 허용합니다.

    # setsebool -P collectd_tcp_network_connect=1
    Copy to Clipboard Toggle word wrap
  5. collectd 를 시작하고 활성화합니다.

    # systemctl start collectd
    # systemctl enable collectd
    Copy to Clipboard Toggle word wrap

잠시 후 http://PERFORMANCE_MONITORING_HOST:3030/ 에서 실행되는 Graphite 웹 사용자 인터페이스에 메트릭이 표시됩니다.

법적 공지

Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat