Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixes bug 853031 - Updated configuration of processors to accept new ela... #1148

Merged
merged 1 commit into from

2 participants

@AdrianGaudebert

...sticsearch keys.

I am unable to test this locally, mainly because of the lack of a local HBase, but the config should load fine (I had some errors that I fixed), so I'd like to test this on stage asap.

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 to the elasticsearch instances (leave blank to disable)
@lonnen Owner
lonnen added a note

the urls for the elasticsearch instances

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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 to the elasticsearch instances (leave blank to disable)'
@lonnen Owner
lonnen added a note

urls for the elasticsearch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@lonnen
Owner

Fix those nits and merge at will. :secret:

@AdrianGaudebert AdrianGaudebert merged commit f2a5693 into from
@AdrianGaudebert AdrianGaudebert deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 25, 2013
  1. @AdrianGaudebert
This page is out of date. Refresh to see the latest.
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
Something went wrong with that request. Please try again.