APM监控--(四)Pinpoint扩展报警--超详细,各种问题解决之后的顺畅版本

本文详细介绍了如何在Pinpoint APM中开发和部署自定义报警功能,包括下载源码、编译、新增报警类、初始化数据库、部署及常见问题。主要步骤涉及修改POM文件、配置邮件发送、更新数据库脚本以及设置报警规则。
摘要由CSDN通过智能技术生成

部署完成pinpoint之后,并没有开放报警功能,而报警是每个公司都必要的功能,以下就跟着我一起开始开发报警功能并部署到服务器。

1,下载源码包

地址:https://github.com/naver/pinpoint/releases

选择对应版本源码包,本次为1.7.1,单击下载



2,编译

源码在maven端增加了很多检查和限制,保证jdk版本1.8,maven为3.1.1就可以去除这些限制,修改后pom文件为:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <organization>
        <name>Naver Corporation</name>
        <url>http://www.navercorp.com/</url>
    </organization>
    <groupId>com.navercorp.pinpoint</groupId>
    <artifactId>pinpoint</artifactId>
    <version>1.7.1</version>
    <name>pinpoint</name>
    <packaging>pom</packaging>

    <repositories>
        <repository>
            <id>cloudera</id>
            <url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
        </repository>
        <repository>
            <id>spring-maven-repository</id>
            <name>Spring Framework Maven Release Repository</name>
            <url>http://maven.springframework.org/release/</url>
        </repository>
        <repository>
            <id>spring-maven-release-remote</id>
            <name>Spring Framework Maven Release Remote Repository</name>
            <url>http://repo.spring.io/libs-release-remote/</url>
        </repository>
        <repository>
            <id>bintray</id>
            <name>bintray</name>
            <url>http://jcenter.bintray.com</url>
        </repository>
        <repository>
            <id>jboss-3rd-party-releases</id>
            <name>Jboss Third Party Repository</name>
            <url>https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <name>Maven central plugin repository</name>
            <url>http://repo1.maven.org/maven2/</url>
        </pluginRepository>
    </pluginRepositories>

    <modules>
        <module>annotations</module>
        <module>agent</module>
        <module>bootstrap-core</module>
        <module>bootstrap-core-optional</module>
        <module>bootstrap</module>
        <module>collector</module>
        <module>commons</module>
        <module>commons-hbase</module>
        <module>commons-server</module>
        <module>tools</module>
        <module>plugins</module>
        <module>profiler</module>
        <module>profiler-optional</module>
        <module>profiler-test</module>
        <module>rpc</module>
        <module>thrift</module>
        <module>test</module>
        <module>web</module>
        <module>hbase</module>
        <module>flink</module>
    </modules>

    <properties>
        <encoding>UTF-8</encoding>
        <jdk.version>1.8</jdk.version>
        <slf4j.version>1.7.21</slf4j.version>
        <metrics.version>3.1.2</metrics.version>
        <jetty.version>8.1.12.v20130726</jetty.version>
        <fastxml.jackson.version>2.6.7</fastxml.jackson.version>
        <httpcomponents.version>4.3</httpcomponents.version>
        <jedis.version>2.4.2</jedis.version>
        <cloverLicenseLocation>${basedir}/clover.license</cloverLicenseLocation>
        <spring.version>4.3.8.RELEASE</spring.version>
        <spring.batch.version>3.0.7.RELEASE</spring.batch.version>
        <spring.security.version>4.2.2.RELEASE</spring.security.version>
        <docker.maven.plugin.version>0.4.3</docker.maven.plugin.version>
        <cassandra.driver.version>2.1.7.1</cassandra.driver.version>
        <sniffer.artifactid>java16</sniffer.artifactid>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-annotations</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-commons</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-commons-server</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-commons-hbase</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-rpc</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-thrift</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-bootstrap-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-bootstrap-core-optional</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-bootstrap</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-profiler</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-profiler-optional</artifactId>
                <type>pom</type>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-profiler-test</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-collector</artifactId>
                <type>war</type>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-collector</artifactId>
                <classifier>classes</classifier>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-web</artifactId>
                <version>${project.version}</version>
                <type>war</type>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-web</artifactId>
                <classifier>classes</classifier>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-plugins</artifactId>
                <type>pom</type>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-plugins</artifactId>
                <type>zip</type>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-tools</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-test</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.navercorp.pinpoint</groupId>
                <artifactId>pinpoint-flink</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-orm</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值