Skip to content

Commit

Permalink
Deleted some stuff. Added splunk dependency to pom.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeperetz committed Sep 27, 2016
1 parent 48a8752 commit 79e1a0b
Show file tree
Hide file tree
Showing 6 changed files with 273 additions and 236 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ logs

# Eclipse specific ignore settings
.settings/
.project
.pmdruleset.xml
.pmd
.classpath
application.properties
/dashboard.properties

2 changes: 1 addition & 1 deletion api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ target
# Specific project files
jir-client.properties
/bin/
/src/main/resources/application.properties
application.properties
16 changes: 16 additions & 0 deletions splunk-perf-collector/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Created by .ignore support plugin (hsz.mobi)
### Java template
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

/splunk.properties
56 changes: 56 additions & 0 deletions splunk-perf-collector/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Appdynamics Collector
=====================

This project uses Spring Boot to package the collector as an executable JAR with dependencies.

Building and Deploying
--------------------------------------

Run
```
mvn install
```
to package the collector into an executable JAR file. Copy this file to your server and launch it using :
```
java -JAR appdynamics-perf-collector.jar --spring.config.name=appdynamics --spring.config.location=<appdynamics.properties location>
```
You will need to provide an **appdynamics.properties** file that contains information about how
to connect to the Dashboard MongoDB database instance, as well as properties the Appdynamics collector requires. See
the Spring Boot [documentation](http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-external-config-application-property-files)
for information about sourcing this properties file.

###Sample application.properties file
--------------------------------------

#Database Name
database=dashboard

#Database HostName - default is localhost
dbhost=localhost

#Database Port - default is 27017
dbport=27017

#Database Username - default is blank
dbusername=db

#Database Password - default is blank
dbpassword=dbpass

#Logging File
logging.file=./logs/appd-collector.log

#Collector schedule (required)
appdynamics.cron=1 * * * * *

#Appdynamics server (required)
appdynamics.instanceUrl=http://appdyn-hqa-c01.kdc.company.com

#Appdynamics Username (required)
appdynamics.username=APPD_USERNAME

#Appdynamics Password (required)
appdynamics.password=APPD_PASSWORD

#Appdynamics Dashboard (required)
appdynamics.dashboardUrl=http://appdyn-hqa-c01.kdc.company.com/controller/#/location=APP_DASHBOARD&timeRange=last_15_minutes.BEFORE_NOW.-1.-1.15&application=%s&dashboardMode=force
156 changes: 156 additions & 0 deletions splunk-perf-collector/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>splunk-perf-collector</artifactId>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<description>Github Collector Microservice collecting stats from Github</description>
<url>https://github.com/capitalone/Hygieia</url>


<parent>
<groupId>com.capitalone.dashboard</groupId>
<artifactId>Hygieia</artifactId>
<version>2.0.2-SNAPSHOT</version>
</parent>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<!-- Package as an executable jar -->
<repositories>
<repository>
<id>splunk-artifactory</id>
<name>Splunk Releases</name>
<url>http://splunk.artifactoryonline.com/splunk/ext-releases-local</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<skipDockerBuild>false</skipDockerBuild>
<imageName>hygieia-github-scm-collector</imageName>
<dockerDirectory>${project.basedir}/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
</build>

<properties>
<sonar.skip>true</sonar.skip>
<java.version>1.8</java.version>
</properties>


<dependencies>
<!-- Project Deps -->
<dependency>
<groupId>com.capitalone.dashboard</groupId>
<artifactId>core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>

<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
<dependency>
<groupId>org.joda</groupId>
<artifactId>joda-convert</artifactId>
<version>${joda-convert.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.splunk</groupId>
<artifactId>splunk</artifactId>
<version>1.5.0.0</version>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit 79e1a0b

Please sign in to comment.