Commit 88a0d0da by 陈森彬

切换elk

parent d49d2dbb
Showing with 2 additions and 2 deletions
......@@ -17,7 +17,7 @@ from utils.tas_redis import task_redis
logger = get_logger('crawler_process')
dashboard = MySqlOperator('dashboard')
ichunt_elk = Elasticsearch(host="127.0.0.1", port=9200, timeout=20)
ichunt_elk = Elasticsearch(host="172.18.137.50", port=9200, timeout=20)
def get_process_task(task_code):
......@@ -30,7 +30,7 @@ def get_process_task(task_code):
def get_error_ratio(task_code, time_range=30):
utc_since = datetime.utcnow() - timedelta(minutes=time_range)
index = 'logstash-' + utc_since.strftime('%Y.%m.%d')
index = 'spider_logs-' + utc_since.strftime('%Y.%m.%d')
query = {
"size": 0,
"query": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment