Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1148 from AdrianGaudebert/853031-processor-config

Fixes bug 853031 - Updated configuration of processors to accept new ela...
  • Loading branch information...
commit f2a56935e529d59ad2909da54a46037178bd08fc 2 parents b5f3f0b + 2e3d1fe
@AdrianGaudebert AdrianGaudebert authored
Showing with 38 additions and 9 deletions.
  1. +15 −4 scripts/config/processorconfig.py.dist
  2. +23 −5 scripts/startProcessor.py
View
19 scripts/config/processorconfig.py.dist
@@ -48,10 +48,21 @@ temporaryFileSystemStoragePath.default = '/home/socorro/temp'
from collectorconfig import dumpField
-elasticSearchOoidSubmissionUrl = cm.Option()
-elasticSearchOoidSubmissionUrl.doc = 'a url to submit ooids for Elastic Search (use %s in place of the ooid) (leave blank for no Elastic Search)'
-#elasticSearchOoidSubmissionUrl.default = 'http://node14.generic.metrics.sjc1.mozilla.com:9999/queue/tasks/%s'
-elasticSearchOoidSubmissionUrl.default = ''
+elasticsearch_urls = cm.Option()
+elasticsearch_urls.doc = 'the urls for the elasticsearch instances (leave blank to disable)'
+elasticsearch_urls.default = 'http://localhost:9200/'
+
+elasticsearch_index = cm.Option()
+elasticsearch_index.doc = "an index to insert crashes in elasticsearch (use datetime's strftime format to have daily, weekly or monthly indexes)"
+elasticsearch_index.default = 'socorro%Y%W'
+
+elasticsearch_doctype = cm.Option()
+elasticsearch_doctype.doc = 'a type to insert crashes in elasticsearch'
+elasticsearch_doctype.default = 'crash_reports'
+
+elasticsearch_index_settings = cm.Option()
+elasticsearch_index_settings.doc = 'the mapping of crash reports to insert'
+elasticsearch_index_settings.default = './socorro/external/elasticsearch/socorro_index_settings.json'
numberOfThreads = cm.Option()
numberOfThreads.doc = 'the number of threads to use'
View
28 scripts/startProcessor.py
@@ -223,12 +223,30 @@ def processor2012(config):
trans_config.destination.storage2.crashstorage_class = \
socorro.external.elasticsearch.crashstorage.ElasticSearchCrashStorage
- # name: destination.storage2.submission_url
- # doc: a url to submit crash_ids for Elastic Search (use %s in place of the
- # crash_id) (leave blank to disable)
+ # name: destination.storage2.elasticsearch_urls
+ # doc: the urls for the elasticsearch instances (leave blank to disable)
# converter: str
- trans_config.destination.storage2.submission_url = \
- config.elasticSearchOoidSubmissionUrl
+ trans_config.destination.storage2.elasticsearch_urls = \
+ config.elasticsearch_urls
+
+ # name: destination.storage2.elasticsearch_index
+ # doc: an index to insert crashes in elasticsearch (use datetime's strftime
+ # format to have daily, weekly or monthly indexes)
+ # converter: str
+ trans_config.destination.storage2.elasticsearch_index = \
+ config.elasticsearch_index
+
+ # name: destination.storage2.elasticsearch_doctype
+ # doc: a type to insert crashes in elasticsearch
+ # converter: str
+ trans_config.destination.storage2.elasticsearch_doctype = \
+ config.elasticsearch_doctype
+
+ # name: destination.storage2.elasticsearch_index_settings
+ # doc: the mapping of crash reports to insert
+ # converter: str
+ trans_config.destination.storage2.elasticsearch_index_settings = \
+ config.elasticsearch_index_settings
# name: destination.storage2.timeout
# doc: how long to wait in seconds for confirmation of a submission
Please sign in to comment.
Something went wrong with that request. Please try again.