소개
이 문서에서는 샘플 앱이 포함된 Red Hat Enterprise Linux 시스템에 AppDynamics Apache 웹 서버 에이전트를 설치하는 방법에 대해 설명합니다.
사전 요구 사항
요구 사항
-
RHEL에서 실행 중인 Apache HTTP Server(httpd) 또는 컨테이너화된 Apache 서비스
-
설치 및 구성을 위한 루트 또는 sudo 액세스
-
AppDynamics 컨트롤러(SaaS 또는 온프레미스)
-
액세스 자격 증명(계정 이름, 액세스 키, 컨트롤러 호스트)
사용되는 구성 요소
이 문서의 정보는 특정 랩 환경의 디바이스를 토대로 작성되었습니다. 이 문서에 사용된 모든 디바이스는 초기화된(기본) 컨피그레이션으로 시작되었습니다. 현재 네트워크가 작동 중인 경우 모든 명령의 잠재적인 영향을 미리 숙지하시기 바랍니다.
배경 정보
AppDynamics Apache 에이전트는 들어오는 HTTP 요청에 대한 가시성을 활성화하고 트랜잭션 상관관계 헤더를 Java 또는 Node.js 에이전트와 같은 백엔드 계층에 전파합니다. 이 설정은 분산 아키텍처에서 전체 트랜잭션 추적 가능성을 관찰하는 데 특히 유용합니다.
구성
1단계: 에이전트 설치
- AppDynamics 다운로드를 방문하십시오.
- Linux 64비트용 웹 서버 에이전트를 선택합니다.
- 대상 서버 또는 Docker 빌드 컨텍스트에 .tgz 아카이브를 다운로드합니다.
2단계: Apache에 컨피그레이션 포함
팁: 코드 조각의 세부 정보를 올바른 값으로 변경해야 합니다.
# Loading AppD agent SDK
LoadFile /opt/appdynamics-sdk-native/sdk_lib/lib/libzmq.so.5
LoadFile /opt/appdynamics-sdk-native/sdk_lib/lib/libappdynamics_native_sdk.so
# Loading the AppD agent shared library for Apache 2.4
LoadModule appdynamics_module /opt/appdynamics-sdk-native/WebServerAgent/Apache/libmod_appdynamics.so
# Set agent settings here
# Hostname or IP of the AppD controller (using provided controller)
AppDynamicsControllerHost "XXXX"
# AppD account name
AppDynamicsAccountName "XXXX"
# AppD access key
AppDynamicsAccessKey "XXXX"
# Application name
AppDynamicsApplication "XXXX"
# Tier name
AppDynamicsTier "XXXX"
# Node name
AppDynamicsNode "XXXX"
# Enabling web server monitoring
AppDynamicsEnabled ON
# Port to connect with the controller
AppDynamicsControllerPort 443
# Setting SSL on
AppDynamicsControllerSSL ON
# Enabling auto-launch of the appD proxy
AppDynamicsLaunchProxy ON
그런 다음 Apache의 기본 컨피그레이션을 업데이트하여 다음 파일을 포함합니다.
echo "Include conf.d/appdynamics_agent.conf" >> /etc/httpd/conf/httpd.conf
팁: 샘플 Dockerfile입니다. Related Information(관련 정보)의 전체 샘플 앱은 Github 링크를 참조하십시오. Apache AppDynamics 에이전트의 다른 버전을 사용하는 경우 Dockerfile을 적절히 수정해야 합니다.
#Sample Dockerfile
# Start from the Red Hat Universal Base Image with Apache httpd 2.4
FROM --platform=linux/amd64 registry.access.redhat.com/ubi8/httpd-24
# installed required software
USER root
RUN dnf -y update
RUN dnf -y install tar wget nano net-tools procps
# (Optional) Copy your custom web content into the default document root.
COPY index.html /var/www/html/index.html
# Disable the SSL configuration for testing currently. Import the certificate if using SSL
#(rename it so it won't be loaded)
RUN mv /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.disabled
# Add ServerName directive to suppress the warning
RUN echo "ServerName localhost" >> /etc/httpd/conf/httpd.conf
# AppDynamics configuration
# Copying the custom config file for AppD agent
COPY ./appdynamics_agent.conf /etc/httpd/conf/appdynamics_agent.conf
# Expose HTTP port 8080
EXPOSE 8080
WORKDIR /appd
#Copy the agent files
COPY ./appdynamics-sdk-native-nativeWebServer-64bit-linux-24.11.0.2449.tgz ./
# Extracting the file downloaded
RUN tar -xzvf appdynamics*.tgz -C /opt
# Specifying the path for the required libraries
#ENV LD_LIBRARY_PATH="/opt/appdynamics-sdk-native/sdk_lib/lib/"
ENV LD_LIBRARY_PATH="/opt/appdynamics-sdk-native/sdk_lib/lib/:$LD_LIBRARY_PATH"
# Including the appdynamics config file into the original httpd configuration
RUN echo "Include /etc/httpd/conf/appdynamics_agent.conf" >> /etc/httpd/conf/httpd.conf
# Running apache agent installation script
RUN /opt/appdynamics-sdk-native/install.sh
# Running the httpd server in foreground
CMD ["/usr/sbin/httpd", "-DFOREGROUND"]
3단계: HTTPD 재시작
서버에서 실행 중인 경우 Docker의 경우 httpd 프로세스를 다시 시작하면 에이전트와 함께 apache를 시작할 때 컨테이너를 시작하여 처리됩니다.
sudo systemctl restart httpd
다음을 확인합니다.
1단계: 앱 시작
브라우저에서 Apache 서버에 액세스합니다.
http://:80/
또는 Docker를 통해
http://localhost:8080/
2단계: AppDynamics 대시보드로 이동

문제 해결
문제
|
가능한 원인
|
해결
|
아파치 재시작 실패
|
mod_appdynamics.so의 경로가 잘못되었습니다.
|
파일 경로 및 권한 검증
|
AppDynamics에 메트릭 없음
|
컨트롤러 컨피그레이션이 잘못되었습니다.
|
Access Key(액세스 키), Host(호스트), Account name(계정 이름)을 다시 확인합니다.
|
Apache 로그에 에이전트 활동이 표시되지 않음
|
모듈이 로드되지 않음
|
httpd 오류 로그를 확인하십시오. LoadModule 행 확인
|
로그가 생성되지 않음
|
로그/디렉토리 또는 권한이 없습니다.
|
<agent_install_directory>/로그 확인
|
관련 정보
추가 지원이 필요하십니까?
질문이 있거나 문제가 있는 경우 다음 세부 정보가 포함된 지원 티켓을 만드십시오.
- 오류 정보 또는 스크린샷: 특정 오류 메시지 또는 문제의 스크린샷을 제공합니다.
- 사용된 명령: 문제가 발생했을 때 실행 중이던 정확한 명령을 지정합니다.
- Apache 에이전트 로그: 생성된 경우 <agent_install_directory>/logs에서 에이전트 로그를 제공합니다.