Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Testing DIS Agent

Updated on 2022-02-22 GMT+08:00

Testing DIS Agent on a Linux Server

  1. Start PuTTY and log in to the server on which logs reside.
  2. Run the following command to navigate to the directory in which the DIS Agent stores logs:

    cd /opt/dis-agent-X.X.X/logs

  3. Run the following command to view logs:

    tail -100f dis-agent.log

    • If information similar to the following appears, the DIS Agent is running properly.
      Agent: Startup completed in xx ms
    • If any of the following information appears, the DIS Agent is not running properly and you need to troubleshoot the DIS Agent:
      • HttpClientErrorException: 400 Bad Request

        Possible cause: The value of DISStream or projectId in Configuring DIS Agent is incorrect.

        Solution: Stop the DIS Agent process and correct the parameter values.

      • HttpClientErrorException: 403 Forbidden

        Possible cause: The DIS gateway blacklists the IP address of the Linux server on which the DIS Agent is installed and consequently the request to view logs is blocked. Usually, the Linux server IP address is blacklisted because a DIS API is repeatedly called using incorrect configuration.

        Solution: Stop the DIS Agent process, modify the agent.yml file (see Configuring DIS Agent). Restart the DIS Agent process 30 minutes after it stops.

      • UnknownHttpStatusCodeException: Unknown status code [441]

        Possible cause: AK/SK configuration is incorrect.

        Solution: Stop the DIS Agent process and correct the AK/SK configuration.

      • ConnectTimeoutException: Connect to DOMAIN[DOMAIN/IP] failed: connect timed out

        Possible cause: The connection between the Linux server on which the DIS Agent is installed and the DIS gateway times out.

        Solution: Ensure that the Linux server on which the DIS Agent is installed can connect to the Internet.

  4. Check whether the DIS Agent can upload logs.

    • If the monitoring directory configured in agent.yml contains matched files, logs will record the information similar to the following, indicating that [N1 records (B1 bytes)/N2 files (B2 bytes)] are parsed and [N3 records/N4 files] are successfully uploaded.
      Agent: Progress: [N1 records (B1 bytes) / N2 files (B2 bytes)] parsed, and [N3 records / N4 files] sent successfully to destinations. Uptime: 30146ms
    • If no files match the filePattern, run the following command to generate log files required for testing log uploading:

      echo "`date` Hello world." >> /tmp/test.log

  5. Log in to the DIS console and view monitoring data of the DIS stream specified by the DISStream or CustomFileStream parameter in Configuring DIS Agent. If the stream monitoring data shows that data has been uploaded to the DIS stream, the DIS Agent has been successfully installed.

Testing DIS Agent on a Windows Server

  1. Use a file manager to navigate to the logs directory.
  2. Open the dis-agent.log file using an editor. View logs in the file.

    • If information similar to the following appears, the DIS Agent is running properly.
      Agent: Startup completed in xx ms
    • If any of the following information appears, the DIS Agent is not running properly and you need to troubleshoot the DIS Agent:
      • HttpClientErrorException: 400 Bad Request

        Possible cause: The value of DISStream or projectId in Configuring DIS Agent is incorrect.

        Solution: Stop the DIS Agent process and correct the parameter values.

      • HttpClientErrorException: 403 Forbidden

        Possible cause: The DIS gateway blacklists the IP address of the Linux server on which the DIS Agent is installed and consequently the request to view logs is blocked. Usually, the Linux server IP address is blacklisted because a DIS API is repeatedly called using incorrect configuration.

        Solution: Stop the DIS Agent process, modify the agent.yml file (see Configuring DIS Agent). Restart the DIS Agent process 30 minutes after it stops.

      • UnknownHttpStatusCodeException: Unknown status code [441]

        Possible cause: AK/SK configuration is incorrect.

        Solution: Stop the DIS Agent process and correct the AK/SK configuration.

      • ConnectTimeoutException: Connect to DOMAIN[DOMAIN/IP] failed: connect timed out

        Possible cause: The connection between the Linux server on which the DIS Agent is installed and the DIS gateway times out.

        Solution: Ensure that the Linux server on which the DIS Agent is installed can connect to the Internet.

  3. Check whether the DIS Agent can upload logs.

    • If the monitoring directory configured in agent.yml contains matched files, logs will record the information similar to the following, indicating that [N1 records (B1 bytes)/N2 files (B2 bytes)] are parsed and [N3 records/N4 files] are successfully uploaded.
      Agent: Progress: [N1 records (B1 bytes) / N2 files (B2 bytes)] parsed, and [N3 records / N4 files] sent successfully to destinations. Uptime: 30146ms
    • If no files match the filePattern, run the following command to generate log files required for testing log uploading:

      echo %date%time%Hello world. >> C:\test.log

  4. Log in to the DIS console and view monitoring data of the DIS stream specified by the DISStream or CustomFileStream parameter in Configuring DIS Agent. If the stream monitoring data shows that data has been uploaded to the DIS stream, the DIS Agent has been successfully installed.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback