검색

3.6. 브로커, 큐 및 클러스터의 상태 확인

download PDF

AMQ Broker에는 브로커 토폴로지의 브로커 및 큐에서 다양한 상태 점검을 수행할 수 있는 명령줄 유틸리티가 포함되어 있습니다. 브로커가 클러스터된 경우 유틸리티를 사용하여 클러스터 토폴로지의 상태를 확인할 수도 있습니다.

프로세스

  1. 브로커 토폴로지의 특정 브로커(즉, 노드)에 대해 실행할 수 있는 검사 목록을 참조하십시오.

    $ <broker_instance_dir>/bin/artemis help check node

    Artemis check node 명령과 함께 사용할 수 있는 옵션 세트를 설명하는 출력이 표시됩니다.

    NAME
            artemis check node - Check a node
    
    SYNOPSIS
            artemis check node [--backup] [--clientID <clientID>]
                    [--diskUsage <diskUsage>] [--fail-at-end] [--live]
                    [--memoryUsage <memoryUsage>] [--name <name>] [--password <password>]
                    [--peers <peers>] [--protocol <protocol>] [--silent]
                    [--timeout <timeout>] [--up] [--url <brokerURL>] [--user <user>]
                    [--verbose]
    
    OPTIONS
            --backup
                Check that the node has a backup
    
            --clientID <clientID>
                ClientID to be associated with connection
    
            --diskUsage <diskUsage>
                Disk usage percentage to check or -1 to use the max-disk-usage
    
            --fail-at-end
                If a particular module check fails, continue the rest of the checks
    
            --live
                Check that the node has a live
    
            --memoryUsage <memoryUsage>
                Memory usage percentage to check
    
            --name <name>
                Name of the target to check
    
            --password <password>
                Password used to connect
    
            --peers <peers>
                Number of peers to check
    
            --protocol <protocol>
                Protocol used. Valid values are amqp or core. Default=core.
    
            --silent
                It will disable all the inputs, and it would make a best guess for any required input
    
            --timeout <timeout>
                Time to wait for the check execution, in milliseconds
    
            --up
                Check that the node is started, it is executed by default if there are no other checks
    
            --url <brokerURL>
                URL towards the broker. (default: tcp://localhost:61616)
    
            --user <user>
                User used to connect
    
            --verbose
                Adds more information on the execution
  2. 예를 들어 로컬 브로커의 디스크 사용량이 브로커에 대해 구성된 최대 디스크 사용량 미만인지 확인합니다.

    $ <broker_instance_dir>/bin/artemis check node --url tcp://localhost:61616 --diskUsage -1
    
    Connection brokerURL = tcp://localhost:61616
    Running NodeCheck
    Checking that the disk usage is less then the max-disk-usage ... success
    Checks run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.065 sec - NodeCheck

    이전 예에서 --diskUsage 옵션에 -1 값을 지정하면 유틸리티에서 브로커에 대해 구성된 최대 디스크 사용량에 대해 디스크 사용량을 확인합니다. 브로커의 최대 디스크 사용은 broker.xml 구성 파일의 max-disk-usage 매개변수를 사용하여 구성됩니다. max-disk-usage 에 지정된 값은 브로커가 사용할 수 있는 사용 가능한 물리적 디스크 공간의 백분율을 나타냅니다.

  3. 브로커 토폴로지의 특정 큐에 대해 실행할 수 있는 검사 목록을 참조하십시오.

    $ <broker_instance_dir>/bin/artemis help check queue

    Artemis check queue 명령과 함께 사용할 수 있는 옵션 세트를 설명하는 출력이 표시됩니다.

    NAME
            artemis check queue - Check a queue
    
    SYNOPSIS
            artemis check queue [--browse <browse>] [--clientID <clientID>]
                    [--consume <consume>] [--fail-at-end] [--name <name>]
                    [--password <password>] [--produce <produce>] [--protocol <protocol>]
                    [--silent] [--timeout <timeout>] [--up] [--url <brokerURL>]
                    [--user <user>] [--verbose]
    
    OPTIONS
            --browse <browse>
                Number of the messages to browse or -1 to check that the queue is
                browsable
    
            --clientID <clientID>
                ClientID to be associated with connection
    
            --consume <consume>
                Number of the messages to consume or -1 to check that the queue is consumable
    
            --fail-at-end
                If a particular module check fails, continue the rest of the checks
    
            --name <name>
                Name of the target to check
    
            --password <password>
                Password used to connect
    
            --produce <produce>
                Number of the messages to produce
    
            --protocol <protocol>
                Protocol used. Valid values are amqp or core. Default=core.
    
            --silent
                It will disable all the inputs, and it would make a best guess for any required input
    
            --timeout <timeout>
                Time to wait for the check execution, in milliseconds
    
            --up
                Check that the queue exists and is not paused, it is executed by default if there are no other checks
    
            --url <brokerURL>
                URL towards the broker. (default: tcp://localhost:61616)
    
            --user <user>
                User used to connect
    
            --verbose
                Adds more information on the execution
  4. 유틸리티는 단일 명령을 사용하여 여러 옵션을 실행할 수 있습니다. 예를 들어 로컬 브로커의 기본 helloworld 대기열에서 1000개의 메시지를 프로덕션, 검색 및 소비를 확인하려면 다음 명령을 사용합니다.

    $ <broker_instance_dir>/bin/artemis check queue --name helloworld --produce 1000 --browse 1000 --consume 1000
    
    Connection brokerURL = tcp://localhost:61616
    Running QueueCheck
    Checking that a producer can send 1000 messages to the queue helloworld ... success
    Checking that a consumer can browse 1000 messages from the queue helloworld ... success
    Checking that a consumer can consume 1000 messages from the queue helloworld ... success
    Checks run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.882 sec - QueueCheck

    이전 예에서 대기열 검사를 실행할 때 브로커 URL을 지정하지 않은 것을 관찰합니다. URL을 명시적으로 지정하지 않으면 유틸리티는 기본값 tcp://localhost:61616 을 사용합니다.

  5. 브로커가 클러스터형 경우 클러스터 토폴로지에 대해 실행할 수 있는 검사 목록을 참조하십시오.

    $ <broker_instance_dir>/bin/artemis help check cluster

    Artemis check cluster 명령과 함께 사용할 수 있는 옵션 세트를 설명하는 출력이 표시됩니다.

    NAME
            artemis check cluster - Verify if all the nodes on the cluster match the same topology and time
            configuration.
    
    
    SYNOPSIS
            artemis check cluster [--acceptor=<acceptor>]
                    [--clientID=<clientID>] [--password=<password>]
                    [--protocol=<protocol>] [--silent] [--url=<brokerURL>]
                    [--user=<user>] [--variance=<variance>] [--verbose]
    OPTIONS
          --acceptor=<acceptor>
              Name used to find the default connection URL on the acceptor list. If an acceptor with that name cannot
              be found, the command looks for a connector with the same name.
    
            --clientID <clientID>
                ClientID to be associated with connection.
    
            --password <password>
                Password used to connect.
    
            --protocol <protocol>
                Protocol used. Valid values are amqp or core. Default=core.
    
            --silent
                Disables all the input options and make a best guess for any required input.
    
            --url <brokerURL>
                URL of the broker (default: tcp://localhost:61616).
    
            --user <user>
                User used to connect.
    
            --variance <variance>
                Allowed time variance in milliseconds after which check is deemed to have failed (default=1000).
    
            --verbose
                Adds more information on the execution.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

© 2024 Red Hat, Inc.