
Renamed data_bag from mon_persister to monasca_persister Also, renamed attributes to appropriate names from the refactor of removing the persister. Removed attributes no longer used as well Use the monasca group instead of the persister group so /var/log/monasca can be reused between components Change the credential databag from mon_credentials to just credentials Change-Id: I5bc564ae3763ff05a44cbdc05a4550d627b4b7d2
164 lines
5.3 KiB
Plaintext
164 lines
5.3 KiB
Plaintext
name: monasca-persister
|
|
|
|
alarmHistoryConfiguration:
|
|
batchSize: <%= @settings['alarm_history']['batch_size'] %>
|
|
numThreads: <%= @settings['alarm_history']['num_threads'] %>
|
|
maxBatchTime: <%= @settings['alarm_history']['maxBatchTime'] %>
|
|
# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
|
|
topic: <%= @settings['alarm_history']['topic'] %>
|
|
groupId: <%= @settings['kafka']['group_id'] %>_<%= @settings['alarm_history']['topic'] %>
|
|
consumerId: <%= #If only 1 consumer id only one box will run at a time, if consumer id for each fqdn they will all run
|
|
if @settings['kafka']['consumer_id'].is_a? Integer
|
|
@settings['kafka']['consumer_id']
|
|
else
|
|
@settings['kafka']['consumer_id'][node[:fqdn]]
|
|
end
|
|
%>
|
|
clientId : 1
|
|
|
|
metricConfiguration:
|
|
batchSize: <%= @settings['metrics']['batch_size'] %>
|
|
numThreads: <%= @settings['metrics']['num_threads'] %>
|
|
maxBatchTime: <%= @settings['metrics']['maxBatchTime'] %>
|
|
# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
|
|
topic: <%= @settings['metrics']['topic'] %>
|
|
groupId: <%= @settings['kafka']['group_id'] %>_<%= @settings['metrics']['topic'] %>
|
|
consumerId: <%= #If only 1 consumer id only one box will run at a time, if consumer id for each fqdn they will all run
|
|
if @settings['kafka']['consumer_id'].is_a? Integer
|
|
@settings['kafka']['consumer_id']
|
|
else
|
|
@settings['kafka']['consumer_id'][node[:fqdn]]
|
|
end
|
|
%>
|
|
clientId : 1
|
|
|
|
#Kafka settings.
|
|
kafkaConfiguration:
|
|
# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
|
|
zookeeperConnect: <%= @settings['zookeeper']['hostname'] %>:2181
|
|
socketTimeoutMs: 30000
|
|
socketReceiveBufferBytes : 65536
|
|
fetchMessageMaxBytes: 1048576
|
|
queuedMaxMessageChunks: 10
|
|
rebalanceMaxRetries: 4
|
|
fetchMinBytes: 1
|
|
fetchWaitMaxMs: 100
|
|
rebalanceBackoffMs: 2000
|
|
refreshLeaderBackoffMs: 200
|
|
autoOffsetReset: largest
|
|
consumerTimeoutMs: 1000
|
|
zookeeperSessionTimeoutMs : 60000
|
|
zookeeperConnectionTimeoutMs : 60000
|
|
zookeeperSyncTimeMs: 2000
|
|
|
|
verticaMetricRepositoryConfiguration:
|
|
maxCacheSize: <%= @settings['vertica_metric_repository_config']['max_cache_size'] %>
|
|
|
|
databaseConfiguration:
|
|
<%- if @settings['database_configuration']['database_type'] == 'vertica' %>
|
|
# vertica | influxdb
|
|
databaseType: vertica
|
|
|
|
# Uncomment if databaseType is influxdb
|
|
#influxDbConfiguration:
|
|
# name: mon
|
|
# replicationFactor: 1
|
|
# url: http://127.0.0.1:8086
|
|
# user: root
|
|
# password: root
|
|
|
|
# Uncomment if databaseType is vertica
|
|
dataSourceFactory:
|
|
driverClass: com.vertica.jdbc.Driver
|
|
# url: jdbc:vertica://mon-aw1rdd1-vertica0001.rndd.aw1.hpcloud.net:5433/som
|
|
url: jdbc:vertica://<%= @settings['vertica']['hostname']%>:5433/<%= @settings['vertica']['dbname'] %>
|
|
user: <%= @credentials['vertica']['user']%>
|
|
password: <%= @credentials['vertica']['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
|
|
<%- else %>
|
|
# vertica | influxdb
|
|
databaseType: influxdb
|
|
|
|
# Uncomment if databaseType is influxdb
|
|
influxDbConfiguration:
|
|
name: <%= @settings['influxdb']['dbname'] %>
|
|
replicationFactor: 1
|
|
url: http://<%= @settings['influxdb']['hostname'] %>:8086
|
|
user: <%=@credentials['influxdb']['user'] %>
|
|
password: <%=@credentials['influxdb']['password'] %>
|
|
|
|
# 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
|
|
<%- end %>
|
|
|
|
|
|
metrics:
|
|
frequency: 1 second
|
|
|
|
|
|
# Logging settings.
|
|
logging:
|
|
|
|
# The default level of all loggers. Can be OFF, ERROR, WARN, INFO,
|
|
# DEBUG, TRACE, or ALL.
|
|
level: INFO
|
|
|
|
# Logger-specific levels.
|
|
loggers:
|
|
|
|
# Sets the level for 'com.example.app' to DEBUG.
|
|
com.example.app: DEBUG
|
|
# com.hpcloud: debug
|
|
# com.hpcloud.mon.persister.repository: DEBUG
|
|
|
|
appenders:
|
|
|
|
- type: file
|
|
threshold: INFO
|
|
archive: true
|
|
currentLogFilename: /var/log/monasca/monasca-persister.log
|
|
archivedLogFilenamePattern: /var/log/monasca/monasca-persister.log-%d.log.gz
|
|
archivedFileCount: 5
|
|
# The timezone used to format dates. HINT: USE THE DEFAULT, UTC.
|
|
timeZone: UTC
|
|
|
|
# Set the persister ports to 8090/8091 to avoid conflict with the api
|
|
server:
|
|
applicationConnectors:
|
|
- type: http
|
|
port: 8090
|
|
adminConnectors:
|
|
- type: http
|
|
port: 8091
|