Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bb14e5e
Support for client certificate authentication
kunalgupApDx Feb 21, 2018
c9cef9a
Added args for initializeMoreStuff()
venkatakonala Feb 27, 2018
0735390
Added Copyright
venkatakonala Feb 27, 2018
eb12629
Removed jsr dependency
venkatakonala Feb 27, 2018
f4dab28
Create CHANGELOG.md
venkatakonala Feb 27, 2018
6ab896c
CHANGELOG.md
venkatakonala Feb 27, 2018
25aa6fc
CHANGELOG.md modification
venkatakonala Feb 27, 2018
2374d82
Packaging LICENSE.txt and NOTICE.txt
venkatakonala Feb 27, 2018
5a3fc4a
Mutual Auth over SSL
kunalgupApDx Mar 2, 2018
9736c0d
JSR libarary use hack and comments ignore for XML
venkatakonala Mar 5, 2018
2256161
CHANGELOG updated to reverse chronological order
venkatakonala Mar 5, 2018
693bad6
Removed SimpleHttpClient and replaced its usage with CloseableHttpClient
venkatakonala Mar 5, 2018
2426d66
Made the passwordEncrypted and encryptionKey fields' names consistent
venkatakonala Mar 5, 2018
9229fe4
Change Encryption Fields for Trust store and Key Store
kunalgupApDx Mar 6, 2018
182d95e
Changed passwordEncrypted to encryptedPassword for different modules
venkatakonala Mar 6, 2018
e0fc9e4
Changes in Dashboard module : replacing client funtionality to Http4C…
venkatakonala Mar 6, 2018
9ca9cad
Custom Dashboad module changes and test successful
venkatakonala Mar 8, 2018
c8ecdc3
Updated expected.config.yml and changed the method name of a test to …
venkatakonala Mar 8, 2018
8e620f6
Fixed the bug caused bu casting ThreadPoolExecutor to ScheduledThread…
venkatakonala Mar 12, 2018
0bb9ab6
Removed comment from uploadDashboard() related to CloseableHttpClient…
venkatakonala Mar 13, 2018
80bf260
Merged v2.0.3.1
venkatakonala Mar 13, 2018
1e6fe83
Removed backup pom and updated CHANGELOG
venkatakonala Mar 13, 2018
34e07c2
Removed backup Http4ClientBuilder.java and expected.config.yml and up…
venkatakonala Mar 14, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# AppDynamics Extensions SDK CHANGELOG

## 2.0.4 - Mar 13, 2018
1. Implemented mutual SSL Authentication

## 2.0.3.1 - Feb 27, 2018 (UNRELEASED --> MERGED with v2.0.4)
1. Added args(task arguments from monitor.xml) as an argument to the initializeMoreStuff() method.
2. Added Copyright header to all the files.
3. Removed jsr dependency from pom.xml.
4. Packaged LICENSE.txt and NOTICE.txt.
5. Made the names for passwordEncrypted and encryptionKey consistent.
6. Refactored dashboard module to be consistent with CloseableHttpClientUsage(except the uploadFile() method).
7. Fixed the bug caused by casting ThreadPoolExecutor to ScheduledThreadPoolExecutor.

## 2.0.3 - Feb 02, 2018 (UNRELEASED --> MERGED with v2.0.4)
1. Provided a method in ABaseMonitor that can be used to set FileWatchListener callback in the setConfigYml() method of MonitorConfiguration when it is called in the initialize() method of ABaseMonitor.
2. Added changes from the commons version 1.6.6.1, related to CSRF token for accessing controller APIs in the CustomDashboardUploader.

## 2.0.2 - Jan 23, 2018
1. Added a catch statement in the TaskExecutionServiceProvider to catch a throwable(Errors that occur while executing tasks) and print errors as a log statement.

## 2.0.1 - Nov 28, 2017
1. Fixed a bug for delta metrics when the metric value is null
2. Added more test cases.

## 2.0.0 - Nov 02, 2017
1. Modularized the MonitorConfiguration class.
2. Added DerivedMetricsCalculation feature.
3. Added Metric data structure and Transformers(alias, delta, multiplier, convert, rounding).
4. Added feature to make extension job runs independent.
5. Increased the unit test coverage.






13 changes: 13 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2018 AppDynamics LLC and its affiliates

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
4 changes: 4 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Notice and Disclaimer

All Extensions published by AppDynamics are governed by the Apache License v2 and are excluded from the definition of covered software under any agreement between AppDynamics and the User governing AppDynamics Pro Edition, Test & Dev Edition, or any other Editions.

29 changes: 23 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
<!--
~ Copyright (c) 2018 AppDynamics,Inc.
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.appdynamics</groupId>
<artifactId>appd-exts-commons</artifactId>
<version>2.0.3</version>
<version>2.0.4</version>
<packaging>jar</packaging>
<name>extension-utils</name>
<properties>
Expand Down Expand Up @@ -50,6 +65,11 @@
<version>4.3.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.3.5</version>
</dependency>
<dependency>
<groupId>com.appdynamics</groupId>
<artifactId>machineagent-repackaged</artifactId>
Expand All @@ -62,11 +82,6 @@
<version>1.2.17</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.nanohttpd</groupId>
<artifactId>nanohttpd</artifactId>
Expand Down Expand Up @@ -197,6 +212,8 @@
<mkdir dir="${maven.repo.dir}"/>
<copy todir="${maven.repo.dir}">
<fileset dir="target" includes="*.jar"/>
<fileset dir="${project.basedir}" includes="LICENSE.txt"/>
<fileset dir="${project.basedir}" includes="NOTICE.txt"/>
</copy>
<copy tofile="${maven.repo.dir}/${project.artifactId}-${project.version}.pom" file="pom.xml"/>
<copy todir="../maven-repo/releases/com/appdynamics/${project.artifactId}"
Expand Down
19 changes: 17 additions & 2 deletions src/main/java/com/appdynamics/extensions/ABaseMonitor.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2018 AppDynamics,Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.appdynamics.extensions;

import com.appdynamics.extensions.conf.MonitorConfiguration;
Expand Down Expand Up @@ -99,7 +114,7 @@ public void onFileChange(File file) {
onConfigReload(file);
}
});
initializeMoreStuff(conf);
initializeMoreStuff(args, conf);
this.configuration = conf;
}
}
Expand All @@ -115,7 +130,7 @@ protected AMonitorJob createMonitorJob() {
* custom objects to be initialized in the monitor.
* @param conf
*/
protected void initializeMoreStuff(MonitorConfiguration conf) {
protected void initializeMoreStuff(Map<String, String> args, MonitorConfiguration conf) {
;
}

Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/appdynamics/extensions/AMonitorJob.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2018 AppDynamics,Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.appdynamics.extensions;


Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/appdynamics/extensions/AMonitorTaskRunnable.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2018 AppDynamics,Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.appdynamics.extensions;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2018 AppDynamics,Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.appdynamics.extensions;

import java.util.List;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/appdynamics/extensions/MetricWriteHelper.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2018 AppDynamics,Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.appdynamics.extensions;

import com.appdynamics.extensions.metrics.Metric;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2018 AppDynamics,Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.appdynamics.extensions;

import com.appdynamics.extensions.conf.MonitorConfiguration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2018 AppDynamics,Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.appdynamics.extensions;

import java.util.concurrent.Callable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
/*
* Copyright (c) 2018 AppDynamics,Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.appdynamics.extensions;

import com.appdynamics.extensions.util.AssertUtils;
import org.apache.http.MethodNotSupportedException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
Expand Down Expand Up @@ -38,8 +54,13 @@ public <T> Future<T> submit(String name,Callable<T> task) {

@Override
public void scheduleAtFixedRate(String name,Runnable task, int initialDelaySeconds, int taskDelaySeconds, TimeUnit seconds) {
ScheduledThreadPoolExecutor scheduledExecutor = (ScheduledThreadPoolExecutor)executor;
scheduledExecutor.scheduleAtFixedRate(wrapWithRunnable(name,task),initialDelaySeconds,taskDelaySeconds,seconds);
if(executor instanceof ScheduledThreadPoolExecutor) {
ScheduledThreadPoolExecutor scheduledExecutor = (ScheduledThreadPoolExecutor) executor;
scheduledExecutor.scheduleAtFixedRate(wrapWithRunnable(name, task), initialDelaySeconds, taskDelaySeconds, seconds);
}
else {
throw new RuntimeException("The ThreadPoolExecutor being used does not support scheduleAtFixedRate() method");
}
}

@Override
Expand Down
23 changes: 19 additions & 4 deletions src/main/java/com/appdynamics/extensions/TaskInputArgs.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2018 AppDynamics,Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.appdynamics.extensions;

import com.google.common.base.Strings;
Expand All @@ -13,12 +28,12 @@
public class TaskInputArgs {
public static final String USER = "username";
public static final String PASSWORD = "password";
public static final String PASSWORD_ENCRYPTED = "password-encrypted";
public static final String ENCRYPTED_PASSWORD = "encryptedPassword";
public static final String AUTH_TYPE = "auth-type";
public static final String HOST = "host";
public static final String URI = "uri";
public static final String PORT = "port";
public static final String USE_SSL = "use-ssl";
public static final String USE_SSL = "useSsl";
public static final String DISABLE_SSL_CERT_VALIDATION = "disable-ssl-cert-validation";
public static final String METRIC_PREFIX = "metric-prefix";
public static final String TRUST_STORE_FILE = "trust-store-file";
Expand All @@ -32,8 +47,8 @@ public class TaskInputArgs {
public static final String PROXY_PASSWORD_ENCRYPTED = "proxy-password-encrypted";
public static final String PROXY_USE_SSL = "proxy-use-ssl";
public static final String PROXY_AUTH_TYPE = "proxy-auth-type";
public static final String ENCRYPTION_KEY = "encryption-key";
public static final String SSL_PROTOCOL = "ssl-protocol";
public static final String ENCRYPTION_KEY = "encryptionKey";
public static final String SSL_PROTOCOL = "sslProtocols";

public static String getArg(Map<String, String> taskArgs, String key, String defaultValue) {
if (taskArgs.containsKey(key)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2018 AppDynamics,Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.appdynamics.extensions;

import com.appdynamics.extensions.conf.MonitorConfiguration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2018 AppDynamics,Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.appdynamics.extensions.alerts.customevents;


Expand Down
Loading