AOS-CLI를 통한 인텐트 기반 분석
IBA with AOS-CLI 개요
Apstra 청사진을 구축한 후에는 인텐트 기반 분석(IBA)을 시작할 수 있습니다. Apstra GUI를 사용하여 IBA와 작업하거나, 생산 외 환경에서는 실험적인 AOS-CLI 유틸리티를 사용할 수 있습니다. GUI에서 IBA 프로브를 사용하는 방법에 대한 자세한 내용은 분석 섹션의 프로브 를 참조하십시오. 이 가이드에서는 AOS-CLI를 사용하는 방법을 설명합니다.
AOS-CLI 유틸리티는 실험적인 도구이며 지원이 제한되어 있습니다. 주니퍼 지원의 조언을 받지 않는 한 운영 환경에서 AOS-CLI를 사용하지 마십시오. 일부 AOS-CLI 버전은 특정 Apstra 릴리스를 위한 것이 아닙니다. 일부 AOS-CLI 명령은 서로 다른 Apstra 릴리스 간에 작동하거나 작동하지 않을 수 있습니다. 운영 외 환경에서 특정 Apstra 릴리스를 사용하는 AOS-CLI 버전을 테스트하거나 주니퍼 지원에 도움을 문의하는 것이 가장 좋습니다.
AOS-CLI 유틸리티를 사용하면 분석 및 기타 기능을 위해 Apstra 서버에서 정보를 추출할 수 있습니다. IBA 프로브의 워크플로우는 다음과 같습니다.
- AOS-CLI를 설치합니다.
- 패키지를 설치합니다.
- 디바이스 에이전트 프로필을 만듭니다.
- 디바이스 에이전트를 설치합니다.
- IBA 프로브를 설치합니다.
프로브가 인스턴스화되면 Syslog를 사용하여 Syslog 서버로 메시지를 보낼 수 있습니다. 자세한 내용은 Syslog Configuration 에서 확인하십시오.
AOS-CLI 설치
Juniper Support Knowledge Base 기사 KB36747에서 지침별로 AOS-CLI 유틸리티를 설치합니다.
패키지 설치
에이전트 프로필 만들기
에이전트 프로파일을 사용하면 프로필에 패키지를 한 번 지정한 다음 여러 에이전트에 동시에 프로파일을 적용할 수 있습니다. 4가지 패키지가 모두 포함된 프로필을 생성해 보겠습니다. (환경에 인터넷 액세스가 있는 경우 사용자 지정 컬렉터 패키지만 포함하면 됩니다.)
- 왼쪽 탐색 메뉴에서 Devices > System Agents > Agent Profiles로 이동하고 Agent Profile 만들기를 클릭합니다.
- 이 예에서는 플랫폼 드롭다운 목록에서 EOS를 선택합니다.
- 패키지 섹션에서 4개의 업로드된 패키지를 선택하여 에이전트 프로파일과 연결합니다.
- Create를 클릭하여 에이전트 프로파일을 생성하고 목록 보기로 돌아갑니다.
에이전트 프로파일에 대한 자세한 내용은 Agent Profiles를 참조하십시오.
에이전트 생성
이제 Arista 디바이스용 에이전트를 생성하고 에이전트 프로필을 사용하여 패키지를 연결합니다. 필요에 따라 나중에 단일 명령으로 에이전트를 대량 업데이트할 수 있도록 에이전트 프로파일을 사용하여 사용자 지정 수집기 패키지를 연결하는 것이 좋습니다.
- 왼쪽 탐색 메뉴에서 Devices > System Agents > Agents로 이동하고 Create Onbox Agent를 클릭합니다.
- 에이전트에 대한 세부 정보를 입력하고 아래
이미지와 같이 드롭다운 목록에서 에이전트 프로필을 선택합니다.
- 왼쪽 탐색 메뉴에서 에이전트에 패키지가 성공적으로 설치되었는지 확인하려면 Devices > System Agents < Agents로 이동한 후 장비의 장비 주소를 클릭하여 확인합니다. Config 섹션에서는 설치된 패키지를 나열합니다. Python 패키지(netaddr, gtextfsm 및 pyeapi)를 수동으로 업로드한 경우 이 패키지가 나열됩니다. Apstra 서버에 인터넷 액세스가 있는 경우 자동으로 업로드되며 여기에 나열되지 않습니다. (장비에 설치된 모든 패키지를 확인하려면 디바이스에 로그인하고 폴더를
/tmp/plugins
확인합니다.)
에이전트에 대한 자세한 내용은 Agents를 참조하십시오.
AOS-CLI의 에이전트 업데이트
AOS-CLI 빌드 423을 사용하면 IP/ID 또는 OS 유형(os_type)(예: EOS)을 기반으로 필요에 따라 지정된 에이전트 프로필로 에이전트를 업데이트할 수 있습니다.
특정 에이전트 프로파일을 사용하여 IP 범위별로 에이전트를 업데이트하려면 아래 예제와 같이 명령을 system-agents update-profile
사용합니다. 옵션을 설정하면 --profile
AOS-CLI에서 사용 가능한 에이전트 프로파일을 표시합니다. 선택하려면 아래 화살표 키를 사용합니다.
aos> system-agents update-profile --ip 172.20.120.6-11 --profile EOS-IBA EOS
예를 들어.
aos> system-agents update-profile --ip 172.20.120.6-11 --profile 692bb0bb-c5e0-4d7e-a70c-c24b0d5650a8 Successfully updated agent 172.20.120.9 with given profile Successfully updated agent 172.20.120.6 with given profile Successfully updated agent 172.20.120.11 with given profile Successfully updated agent 172.20.120.7 with given profile Successfully updated agent 172.20.120.10 with given profile Successfully updated agent 172.20.120.8 with given profile aos>
IBA 프로브 설치
Apstra GUI를 사용하여 IBA 프로브를 설치하거나 AOS-CLI를 사용할 수 있는 비생산 환경에서도 설치할 수 있습니다. GUI에서 사전 정의된 프로브를 생성하거나 인스턴스화하는 방법에 대한 자세한 내용은 분석 섹션의 프로브 를 참조하십시오. 이 섹션에서는 AOS-CLI 유틸리티를 사용하는 방법을 설명합니다.
이 문서에 설명된 모든 프로브는 AOS-CLI 빌드 412 이상에 포함되어 있습니다. 프로브 파일이 AOS-CLI 빌드에 내장되지 않은 경우 프로브 .j2
파일을 사용할 수 있습니다.
이러한 프로브 중 일부는 업데이트된 서비스 레지스트리를 요구합니다. 최신 Apstra SDK를 다운로드하고 파일을 추출합니다json-schemas.tar.gz
. AOS-CLI /mytmp
디렉토리에서 /home/admin
사용할 수 있도록 파일을 Apstra 서버의 디렉토리로 복사합니다.
aos> service-registry import-from --file /mytmp/json-schemas.tar.gz Successfully imported service registry entry for interface_details Successfully imported service registry entry for route_count Successfully imported service registry entry for multicast_groups Successfully imported service registry entry for sfp Successfully imported service registry entry for resource_usage Successfully imported service registry entry for mlag_domain Successfully imported service registry entry for stp Successfully imported service registry entry for vtep_counters Successfully imported service registry entry for vlan Successfully imported service registry entry for evpn_type5 Successfully imported service registry entry for ping Successfully imported service registry entry for vxlan_info Successfully imported service registry entry for pim_neighbor_count Successfully imported service registry entry for lldp_details Successfully imported service registry entry for evpn_type3 Successfully imported service registry entry for multicast_info Successfully imported service registry entry for bgp_vrf Successfully imported service registry entry for traceroute Successfully imported service registry entry for vrf Successfully imported service registry entry for table_usage Successfully imported service registry entry for vxlan_address_table Successfully imported service registry entry for acl_stats Successfully imported service registry entry for device_info Successfully imported service registry entry for power_supply Successfully imported service registry entry for interface_buffer Successfully imported service registry entry for pim_rp Successfully imported service registry entry for anycast_rp Successfully imported service registry entry for bgp_iba Successfully imported service registry entry for interface_iba aos>
프로브를 생성하려면 AOS-CLI 명령을 사용합니다 probe create
. 추가 옵션에 대한 프롬프트가 표시됩니다.
aos> probe create --blueprint Id of the blueprint --file Filename of json file with probe data. Choose from dropdown or specify custom path --skip-service-check [Optional] By default, required telemetry services are checked and enabled on target --check-status [Optional] Wait for probe to become operational. Default: False --service-interval When skip-service-check is False and service is not alreadypresent, this indicates
청사진 ID를 선택하려면, 사용 및 탭 완료를 선택합니다 --blueprint
.
aos> probe create --blueprint 67cd936d-c2de-49f8-8708-df465f0cdc68 L2 Virtual two_stage_l3clos
AOS-CLI와 함께 제공되는 가용 프로브를 나열하려면 사용 --file
및 탭 완료를 사용하십시오. 위/아래 화살표 키로 목록을 스크롤합니다.
aos> probe create --blueprint 67cd936d-c2de-49f8-8708-df465f0cdc68 --file evpn.j2 sfp.j2 memory_usage_threshold_anomalies.j2 bandwidth_utilization_history.j2 power_supply_anomalies.j2 virtual_infra_vlan_mismatch.j2 hardware_vtep_counters_enabled.j2
일부 프로브에는 추가 Probe template variables
프로브가 필요합니다.
aos> probe create --blueprint 67cd936d-c2de-49f8-8708-df465f0cdc68 --file /usr/local/lib/python2.7/site-packages/aos_cli/resources/probes/memory_usage_threshold_anomalies.j2 --skip-service-check [Optional] By default, required telemetry services are checked and enabled on target --check-status [Optional] Wait for probe to become operational. Default: False --service-interval When skip-service-check is False and service is not alreadypresent, this indicates --process Probe template variable --os_family Probe template variable
청사진에 설치된 IBA 프로브를 보려면 Analytics > 프로브를 탐색합니다.
Apstra IBA 프로브 예
다음 섹션에서는 기본적으로 사용할 수 없는 가장 흥미로운 프로브를 설치하는 방법을 설명합니다.
패킷 드롭
패킷 드롭 IBA 프로브는 디바이스 에이전트가 수집한 인터페이스 텔레메트리를 기반으로 Apstra가 관리하는 디바이스 인터페이스에서 비정상적인 양의 패킷 드롭을 감지합니다.
파일 이름 | 설명 |
---|---|
pkt_discard_anomalies.j2 | 지속적인 패킷 폐기가 있는 패브릭 인터페이스 감지 |
IBA 프로브를 설치하려면 다음을 pkt_discard_anomalies.j2
수행합니다.
aos> probe create --blueprint 67cd936d-c2de-49f8-8708-df465f0cdc68 --file /usr/local/lib/python2.7/site-packages/aos_cli/resources/probes/pkt_discard_anomalies.j2 Ensuring needed telemetry services for probe are enabled... Successfully created probe f472ba21-d60f-44dc-9f5d-8318c8b9c07b in blueprint 67cd936d-c2de-49f8-8708-df465f0cdc68 aos>
SFP 옵틱스
SFP 옵틱 IBA 프로브는 디바이스 에이전트가 수집한 SFP 텔레메트리를 기반으로 Apstra가 관리하는 디바이스 인터페이스에서 호환 광학 모듈의 경우 SFP RX 전력, TX 전원, 온도, 전압 또는 전류에서 높거나 낮은 경고 임계값을 감지합니다.
파일 이름 | 설명 |
---|---|
sfp.j2 | SFP RX 전원, TX 전원, 온도, 전압 또는 전류에서 높거나 낮은 경고 임계값 감지 |
IBA 프로브를 설치하려면 다음을 sfp.j2
수행합니다.
aos> probe create --blueprint 67cd936d-c2de-49f8-8708-df465f0cdc68 --file /usr/local/lib/python2.7/site-packages/aos_cli/resources/probes/sfp.j2 Ensuring needed telemetry services for probe are enabled... Enabled service sfp on device l2-virtual-002-leaf1:172.20.60.11 Enabled service sfp on device l2-virtual-001-leaf1:172.20.60.9 Enabled service sfp on device spine2:172.20.60.8 Enabled service sfp on device spine1:172.20.60.6 Enabled service sfp on device l2-virtual-003-leaf1:172.20.60.10 Enabled service sfp on device l2-virtual-004-leaf1:172.20.60.7 Successfully created probe b0c32a46-636c-4f82-b026-e9925b696625 in blueprint 67cd936d-c2de-49f8-8708-df465f0cdc68 aos>
스위치 메모리 누수(Arista EOS만 해당)
Switch Memory Leak IBA 프로브는 디바이스 에이전트가 수집한 시스템 텔레메트리를 기반으로 Apstra가 관리하는 디바이스의 특정 프로세스에서 비정상적인 메모리 누출을 감지합니다. 이 프로브는 장비 BASH 프롬프트에 로그인하고 액세스할 수 있는 장비 에이전트 구성에서 설정된 장비 사용자 인증 정보를 요구합니다.
파일 이름 | 설명 |
---|---|
memory_usage_threshold_anomalies.j2 | 패브릭의 모든 스위치에서 지정된 프로세스에서 메모리 누수 감지 |
system_memory_usage_threshold_anomalies.j2 | 패브릭에서 잠재적 메모리 누수 가능성이 있는 스위치 감지 |
IBA 프로브는 memory_usage_threshold_anomalies.j2
및 에 대한 추가 "프로브 템플릿 변수"를 os_family
process
요구합니다.
aos> probe create --blueprint 67cd936d-c2de-49f8-8708-df465f0cdc68 --file /usr/local/lib/python2.7/site-packages/aos_cli/resources/probes/memory_usage_threshold_anomalies.j2 --skip-service-check [Optional] By default, required telemetry services are checked and enabled on target --check-status [Optional] Wait for probe to become operational. Default: False --service-interval When skip-service-check is False and service is not alreadypresent, this indicates --process Probe template variable --os_family Probe template variable
유일한 옵션은 os_family
Arista EOS입니다eos
. (2) 에 대한 process
fastcapi
edac-poller
configagent
옵션은
aos> probe create --blueprint 67cd936d-c2de-49f8-8708-df465f0cdc68 --file /usr/local/lib/python2.7/site-packages/aos_cli/resources/probes/memory_usage_threshold_anomalies.j2 --os_family eos --process fastcapi Ensuring needed telemetry services for probe are enabled... Enabled service resource_usage on device l2-virtual-002-leaf1:172.20.60.11 Enabled service resource_usage on device l2-virtual-001-leaf1:172.20.60.9 Enabled service resource_usage on device spine2:172.20.60.8 Enabled service resource_usage on device spine1:172.20.60.6 Enabled service resource_usage on device l2-virtual-003-leaf1:172.20.60.10 Enabled service resource_usage on device l2-virtual-004-leaf1:172.20.60.7 Successfully created probe 6a258d83-1053-42ad-935c-0550cc500b7d in blueprint 67cd936d-c2de-49f8-8708-df465f0cdc68 aos>
aos> probe create --blueprint rack-based-blueprint-10990707 --file /usr/local/lib/python2.7/site-packages/aos_cli/resources/probes/memory_usage_threshold_anomalies.j2 --os_family eos --process configagent Ensuring needed telemetry services for probe are enabled... Successfully created probe ed2c6be1-b4b1-4e1b-bd07-da431e89eeec in blueprint rack-based-blueprint-10990707 aos>
서비스 프로세스로서의 "FastCapi"는 EOS 버전 4.18에만 유효합니다. EOS의 최신 버전( 예: 4.20 이상에서만 ConfigAgent)이 유효합니다. 프로브가 생성되는 동안 서비스 이름이 소문자로 입력되도록 주의하십시오. 그래서 대신해야한다 configagent
ConfigAgent
.
두 번째 프로세스를 위해 IBA 프로브를 설치하려면 다른 프로세스에 probe create
대한 명령을 반복합니다.
IBA 프로브 이름을 편집하여 프로세스 이름을 포함할 수 있습니다.
IBA 프로브를 설치하려면 다음을 수행 system_memory_usage_threshold_anomalies.j2
합니다.
aos> probe create --blueprint 67cd936d-c2de-49f8-8708-df465f0cdc68 --file /usr/local/lib/python2.7/site-packages/aos_cli/resources/probes/system_memory_usage_threshold_anomalies.j2 Ensuring needed telemetry services for probe are enabled... Successfully created probe a669ccf8-cba7-414b-ad46-a7d4b4ca3928 in blueprint 67cd936d-c2de-49f8-8708-df465f0cdc68 aos>
내결함성을
이들 (2) 프로브는 430개 이상의 AOS-CLI 빌드를 필요로 합니다.
파일 이름 | 설명 |
---|---|
spine_fault_tolerance.j2 | 패브릭에서 주어진 스파인 수의 장애가 발생했는지 알아보십시오. 모든 스파인의 총 트래픽이 지정된 스파인 장애 수와 함께 사용 가능한 스파인 용량보다 많은 경우 이상을 발생합니다. |
lag_link_fault_tolerance.j2 | 서버 LAG에서 한 링크의 장애가 발생했는지 알아보십시오. 단일 링크 장애를 통해 각 LAG의 총 트래픽을 채권의 총 가용 용량에 대해 모니터링합니다. 특정 기간 동안 지속되는 과용 채권의 50% 이상을 보유한 랙의 이상 징후를 발생합니다. |
IBA 프로브를 설치하려면 다음을 spine_fault_tolerance.j2
수행합니다.
aos> probe create --blueprint bf7a322c-ee3a-4dcf-aa20-df0560f538da --file /usr/local/lib/python2.7/site-packages/aos_cli/resources/probes/spine_fault_tolerance.j2 --number_of_faulty_spines_to_be_tolerated 1 Successfully created probe 0f0e9bf7-d9b3-43d7-906e-a9f0675e68f2 in blueprint bf7a322c-ee3a-4dcf-aa20-df0560f538da aos>
number_of_faulty_spines_to_be_tolerated
지정해야 합니다.
IBA 프로브를 설치하려면 다음을 lag_link_fault_tolerance.j2
수행합니다.
aos> probe create --blueprint bf7a322c-ee3a-4dcf-aa20-df0560f538da --file /usr/local/lib/python2.7/site-packages/aos_cli/resources/probes/lag_link_fault_tolerance.j2 Successfully created probe 45ce5fe8-555f-41a9-b0ae-267125669d3f in blueprint bf7a322c-ee3a-4dcf-aa20-df0560f538da aos>