diff --git a/java/pom.xml b/java/pom.xml
index 2e3a1fb6..2f8374a4 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -252,11 +252,6 @@
/opt/monasca/monasca-persister.jar
-
- file
- ${project.basedir}/src/deb/init/monasca-persister.conf
- /etc/init/monasca-persister.conf
-
file
diff --git a/java/src/assembly/tar.xml b/java/src/assembly/tar.xml
index 1c059af5..97c9c705 100644
--- a/java/src/assembly/tar.xml
+++ b/java/src/assembly/tar.xml
@@ -25,9 +25,5 @@
${project.basedir}/src/deb/etc/persister-config.yml-sampleexamples
-
- ${project.basedir}/src/deb/init/monasca-persister.conf
- examples
-
diff --git a/java/src/deb/control/control b/java/src/deb/control/control
index 171cbb26..4d8f80e0 100644
--- a/java/src/deb/control/control
+++ b/java/src/deb/control/control
@@ -5,5 +5,5 @@ Architecture: all
Depends: openjdk-7-jre-headless | openjdk-7-jre
Version: [[version]]-[[timestamp]]-[[buildNumber]]
Maintainer: HPCloud Monitoring
-Description: Mon-Persister
- Pulls data from various sources and inserts into the SOM DB.
+Description: Monasca-Persister
+ Reads data from Kafka and inserts into the Monasca DB.
diff --git a/java/src/deb/control/postinst b/java/src/deb/control/postinst
deleted file mode 100755
index 724d8cd2..00000000
--- a/java/src/deb/control/postinst
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-case "$1" in
- configure)
- if ! [ `getent passwd persister` ]; then
- adduser --system --group persister
- fi
-
- #Restart does not pick up upstart job config changes stop/start is needed
- stop monasca-persister
- start monasca-persister
- ;;
-esac
-
-exit 0
diff --git a/java/src/deb/control/postrm b/java/src/deb/control/postrm
deleted file mode 100644
index 78d5d28b..00000000
--- a/java/src/deb/control/postrm
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-case "$1" in
- remove|purge)
- userdel persister
- ;;
-esac
-
-exit 0
diff --git a/java/src/deb/control/prerm b/java/src/deb/control/prerm
deleted file mode 100644
index 88811912..00000000
--- a/java/src/deb/control/prerm
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-case "$1" in
- remove)
- stop monasca-persister
- ;;
-esac
-
-exit 0
diff --git a/java/src/deb/etc/persister-config.yml-sample b/java/src/deb/etc/persister-config.yml-sample
index 2de7f4f1..47a6ed24 100755
--- a/java/src/deb/etc/persister-config.yml-sample
+++ b/java/src/deb/etc/persister-config.yml-sample
@@ -1,18 +1,32 @@
name: monasca-persister
-#Kafka settings.
-kafkaConfiguration:
-# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
- topic: test
+alarmHistoryConfiguration:
+ batchSize: 100
numThreads: 2
- groupId: 1
+ maxBatchTime: 15
+# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
+ topic: alarm-state-transitions
+ groupId: 1_alarm-state-transitions
+ consumerId: mini-mon
+ clientId : 1
+
+metricConfiguration:
+ batchSize: 10000
+ numThreads: 4
+ maxBatchTime: 15
+# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
+ topic: metrics
+ groupId: 1_metrics
+ consumerId: mini-mon
+ clientId : 1
+
+#Kafka settings.
+kafkaConfig:
+# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
zookeeperConnect: localhost:2181
- consumerId: 1
socketTimeoutMs: 30000
socketReceiveBufferBytes : 65536
fetchMessageMaxBytes: 1048576
- autoCommitEnable: true
- autoCommitIntervalMs: 60000
queuedMaxMessageChunks: 10
rebalanceMaxRetries: 4
fetchMinBytes: 1
@@ -20,141 +34,84 @@ kafkaConfiguration:
rebalanceBackoffMs: 2000
refreshLeaderBackoffMs: 200
autoOffsetReset: largest
- consumerTimeoutMs: -1
- clientId : 1
- zookeeperSessionTimeoutMs : 6000
- zookeeperConnectionTimeoutMs : 6000
+ consumerTimeoutMs: 1000
+ zookeeperSessionTimeoutMs : 60000
+ zookeeperConnectionTimeoutMs : 60000
zookeeperSyncTimeMs: 2000
-disruptorConfiguration:
- bufferSize: 1048576
- numProcessors: 2
-
-verticaOutputProcessorConfiguration:
- batchSize: 2
-
-monDeDuperConfiguration:
- dedupeRunFrequencySeconds: 30
-
-verticaMetricRepositoryConfiguration:
+verticaMetricRepoConfig:
maxCacheSize: 2000000
-
databaseConfiguration:
- driverClass: com.vertica.jdbc.Driver
-# url: jdbc:vertica://mini-mon:5433/monasca
- url: jdbc:vertica://15.185.94.245:5433/som
- user: persister
+# vertica | influxdb
+ databaseType: influxdb
+
+# Uncomment if databaseType is influxdb
+influxDbConfiguration:
+ # Retention policy may be left blank to indicate default policy.
+ retentionPolicy:
+ maxHttpConnections: 100
+ name: mon
+ url: http://localhost:8086
+ user: mon_persister
password: password
- properties:
- ssl: false
- # the maximum amount of time to wait on an empty pool before throwing an exception
- maxWaitForConnection: 1s
- # the SQL query to run when validating a connection's liveness
- validationQuery: "/* MyService Health Check */ SELECT 1"
+# Uncomment if databaseType is vertica
+#dataSourceFactory:
+# driverClass: com.vertica.jdbc.Driver
+# url: jdbc:vertica://locahost:5433/mon
+# user: dbadmin
+# password: password
+# properties:
+# ssl: false
+# # the maximum amount of time to wait on an empty pool before throwing an exception
+# maxWaitForConnection: 1s
+# # the SQL query to run when validating a connection's liveness
+# validationQuery: "/* MyService Health Check */ SELECT 1"
+# # the minimum number of connections to keep open
+# minSize: 8
+# # the maximum number of connections to keep open
+# maxSize: 41
+# # whether or not idle connections should be validated
+# checkConnectionWhileIdle: false
+# # the maximum lifetime of an idle connection
+# maxConnectionAge: 1 minute
- # the minimum number of connections to keep open
- minSize: 8
+metrics:
+ frequency: 1 second
- # the maximum number of connections to keep open
-
-
- maxSize: 41
-
- # whether or not idle connections should be validated
- checkConnectionWhileIdle: false
-
- # how long a connection must be held before it can be validated
- checkConnectionHealthWhenIdleFor: 10s
-
- # the maximum lifetime of an idle connection
- closeConnectionIfIdleFor: 1 minute
# Logging settings.
logging:
# The default level of all loggers. Can be OFF, ERROR, WARN, INFO,
# DEBUG, TRACE, or ALL.
- level: DEBUG
+ level: INFO
# Logger-specific levels.
loggers:
# Sets the level for 'com.example.app' to DEBUG.
- com.example.app: DEBUG
+ com.example.app: DEBUG
+ # com.hpcloud: debug
+ # com.hpcloud.mon.persister.repository: DEBUG
- # Settings for logging to stdout.
- console:
+ appenders:
- # If true, write log statements to stdout.
- enabled: true
+ - type: file
+ threshold: INFO
+ archive: true
+ currentLogFilename: /var/log/monasca/persister/monasca-persister.log
+ archivedLogFilenamePattern: /var/log/monasca/persister/monasca-persister.log-%d.log.gz
+ archivedFileCount: 5
+ # The timezone used to format dates. HINT: USE THE DEFAULT, UTC.
+ timeZone: UTC
- # Do not display log statements below this threshold to stdout.
- threshold: ALL
-
- # The time zone in which dates should be displayed.
- timeZone: UTC
-
- # A custom Logback format string.
- logFormat: null
-
- # Settings for logging to a file.
- file:
-
- # If true, write log statements to a file.
- enabled: true
-
- # Do not write log statements below this threshold to the file.
- threshold: ALL
-
- # The time zone in which dates should be displayed.
- timeZone: UTC
-
- # A custom Logback format string.
- logFormat: null
-
- # The file to which statements will be logged.
- #
- # If enabled is true, this must be specified.
- currentLogFilename: ./logs/monasca-persister.log
-
- # If true, log files are rotated and archived.
- archive: true
-
- # When the log file rolls over, the file will be archived to
- # app-2012-03-15.log.gz, example.log will be truncated,
- # and new statements written to it.
- #
- # If archive is true, this must be specified.
- archivedLogFilenamePattern: ./logs/monasca-persister-%d.log.gz
-
- # The maximum number of log files to archive.
- archivedFileCount: 5
-
- # Settings for logging to syslog.
- syslog:
-
- # If true, write log statements to syslog.
- enabled: false
-
- # The hostname of the syslog server to which statements will be
- # sent.
- #
- # N.B.: If this is the local host, the local syslog instance
- # will need to be configured to listen on an inet socket, not just
- # a Unix socket.
- host: localhost
-
- # The syslog facility to which statements will be sent.
- #
- # Can be one of: {AUTH, AUTHPRIV, DAEMON, CRON, FTP, LPR, KERN,
- # MAIL, NEWS, SYSLOG, USER, UUCP, LOCAL0, LOCAL1, LOCAL2, LOCAL3,
- # LOCAL4, LOCAL5, LOCAL6, LOCAL7}.
- facility: local0
-
- # The time zone in which dates should be displayed.
- timeZone: UTC
-
- # A custom Logback format string.
- logFormat: null
+# Set the persister ports to 8090/8091 to avoid conflict with the api
+server:
+ applicationConnectors:
+ - type: http
+ port: 8090
+ adminConnectors:
+ - type: http
+ port: 8091
diff --git a/java/src/deb/init/monasca-persister.conf b/java/src/deb/init/monasca-persister.conf
deleted file mode 100644
index a216413f..00000000
--- a/java/src/deb/init/monasca-persister.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-# Startup script for the monasca-persister
-
-description "Monasca Persister java app"
-start on runlevel [2345]
-
-console log
-respawn
-
-setgid monasca
-setuid persister
-exec /usr/bin/java -Dfile.encoding=UTF-8 -Xmx8g -cp /opt/monasca/monasca-persister.jar:/opt/monasca/vertica/vertica_jdbc.jar monasca.persister.PersisterApplication server /etc/monasca/persister-config.yml