diff --git a/LICENSE b/LICENSE
index ef6771d..f6107ec 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright © 2019 MarkLogic Corporation.
+Copyright © 2020 MarkLogic Corporation.
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
diff --git a/NOTICE b/NOTICE
index 23104e8..7cf8d9e 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,6 +1,6 @@
MarkLogic® Monitoring App for Splunk
-Copyright © 2019 MarkLogic Corporation.
+Copyright © 2020 MarkLogic Corporation.
This project and its code and functionality is not representative of MarkLogic Server and is not supported by MarkLogic.
diff --git a/README.md b/README.md
index f4a0868..56db3bd 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# MarkLogic Monitoring for Splunk
-MarkLogic Monitoring for Splunk provides configurations and pre-built dashboards that deliver real-time visibility into Error, Access, and Audit log events
- to monitor and analyze MarkLogic logs with Splunk.
+MarkLogic Monitoring for Splunk provides configurations and pre-built dashboards that deliver real-time visibility into Error, Access, Request,
+and Audit log events to monitor and analyze MarkLogic logs with Splunk.
![Monitoring dashboard](src/main/resources/appserver/static/screenshot.png "Monitoring dashboard")
@@ -46,10 +46,11 @@ Below are example stanzas that can be applied to your *inputs.conf* in order to
The MarkLogic Monitoring dashboard queries make use of *macros* in order to construct base queries that target
MarkLogic log events from the MarkLogic sourcetypes for Error, Access, and Audit logs
-- *marklogic_index* - search criteria limited to `(index=main OR index=marklogic)`
+- *marklogic_index* - search criteria limited to `(index=default OR index=main OR index=marklogic)`
- *marklogic_access* - restricts searches to the MarkLogic *_AccessLog.txt events
- *marklogic_audit* - restricts searches to the MarkLogic AuditLog.txt events
- *marklogic_error* - restricts searches to the *ErrorLog.txt events
+- *marklogic_request* - restricts searches to the *_RequestrLog.txt events
You can change these by modifying the *marklogic*, *marklogic_index*, *marklogic_error*, *marklogic_access*,
and *marklogic_audit* macros under *Settings > Advanced search > Search macros*.
diff --git a/build.gradle b/build.gradle
index c8f3b5e..9806724 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,20 +1,24 @@
import org.apache.tools.ant.filters.ReplaceTokens
import com.marklogic.client.DatabaseClient
-import sun.misc.BASE64Encoder
plugins {
id 'base'
id 'net.saliman.properties' version '1.5.1'
- id 'com.marklogic.ml-gradle' version '3.16.2'
+ id 'com.marklogic.ml-gradle' version '4.5.3'
}
class GenerateLookups extends com.marklogic.gradle.task.MarkLogicTask {
+ @Input
String modulesDir = 'src/main/ml-modules/'
+ @Input
String featureQuery = new File("${modulesDir}get-marklogic-features.xqy").getText('UTF-8')
+ @Input
String errorQuery = new File("${modulesDir}get-marklogic-error-codes.xqy").getText('UTF-8')
-
+ @Input
String lookupsDir = 'src/main/resources/lookups/'
+ @Input
String featureFile = 'marklogic_feature.csv'
+ @Input
String errorFile = 'marklogic_error.csv'
@TaskAction
@@ -104,9 +108,8 @@ def addAuthorizationToken(connection, token){
def appInpsectLogin() {
def connection = buildAppInspectConnection( 'https://api.splunk.com/2.0/rest/login/splunk', 'GET')
- BASE64Encoder enc = new sun.misc.BASE64Encoder();
String userpassword = project.appInspectUsername + ':' + project.appInspectPassword;
- String encodedAuthorization = enc.encode( userpassword.getBytes() );
+ String encodedAuthorization = new String(java.util.Base64.getMimeEncoder().encode( userpassword.getBytes() ), java.nio.charset.StandardCharsets.UTF_8);
connection.setRequestProperty('Authorization', 'Basic ' + encodedAuthorization);
new groovy.json.JsonSlurper().parse(connection.getInputStream())
}
diff --git a/gradle.properties b/gradle.properties
index d1dd68d..1bca6bf 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,7 +1,7 @@
name=marklogic-monitoring-for-splunk
group=com.marklogic
# Splunk requires major.minor.release
-version=1.1.0
+version=1.1.1
appName=marklogic
splunk_home=/Applications/Splunk
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 933b647..3c9d085 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
diff --git a/src/main/ml-modules/get-marklogic-error-codes.xqy b/src/main/ml-modules/get-marklogic-error-codes.xqy
index e99d675..91f29a0 100644
--- a/src/main/ml-modules/get-marklogic-error-codes.xqy
+++ b/src/main/ml-modules/get-marklogic-error-codes.xqy
@@ -18,9 +18,14 @@ string-join(
(
"error_code,feature,error_description,error_cause,error_response,error_url",
- for $feature in tokenize($FEATURES, ",")
- let $error-doc := xdmp:http-get("http://docs.marklogic.com/guide/messages/"||$feature||"-en?print=yes")
+ for $feature in distinct-values((tokenize($FEATURES, ","), "HEALTH", "JSEARCH"))
+ let $error-doc := xdmp:http-get("https://docs.marklogic.com/guide/messages/"||$feature||"-en?print=yes",
+