使用pcp监控spring boot的docker应用

什么是pcp

Performance Co-Pilot,提供一个框架和一组服务用来支持底层的性能监控和性能管理。为所有对性能敏感的应用提供统一的抽象层和 API。

ubuntu的docker版安装pcp

RUN echo "deb http://dl.bintray.com/pcp/trusty trusty main" | tee -a /etc/apt/sources.list
RUN apt-get update
RUN apt-get install pcp pcp-webapi --assume-yes --force-yes
RUN update-rc.d pmcd defaults
# Starting pmcd on startup
RUN update-rc.d pmwebd defaults
# Starting pmwebd on startup
RUN update-rc.d pmlogger defaults
# Starting Logger on startup
RUN service pmcd restart
RUN service pmwebd restart
RUN service pmlogger restart

EXPOSE 44321
EXPOSE 44323

entrypoint启动

#!/bin/bash
service pmcd start
service pmlogger start
service pmie start
service pmwebd start

运行

docker run -p 44321:44321 -p 44323:44323 --rm -it pcp-demo:0.1.0 /bin/bash

docker运行vector

docker pull netflixoss/vector:latest
docker run \
  -d \
  --name vector \
  -p 10080:80 \
  netflixoss/vector:latest

查看

doc

  • pcp.io

  • vector-deploying-docker

你可能感兴趣的:(performance)