1. 程式人生 > >解決elasticsearch主分片unassigned的問題

解決elasticsearch主分片unassigned的問題

[[email protected] ~]# sh -x /tmp/es.sh
+ curl -XPOST localhost:9500/_cluster/reroute -d ‘{
“commands”:[
{
“allocate”:{
“index”: “simtest”,
“shard”: 0,
“node”: “Lady Mastermind”,
“allow_primary”: true
}
}
]
}’

{
    "acknowledged": true,
    "state": {
        "version": 40,
        "master_node": "zVTN_KP_TX6o1RrZNr4TAg",
        "blocks": {},
        "nodes": {
            "zVTN_KP_TX6o1RrZNr4TAg": {
                "name": "Lady Mastermind",
                "transport_address": "inet[/192.168.126.182:9511]"
, "attributes": {} } }, "metadata": { "templates": { "ss_template_v1": { "template": "ss_index*", "order": 0, "settings": { "index": { "number_of_replicas"
: "0", "analysis": { "filter": { "filter1": { "type": "standard" }, "filter3": { "type": "stop" }, "filter2": { "type": "lowercase" } }, "analyzer": { "virus_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "virus_tokenizer" }, "md5_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "md5_tokenizer" }, "url_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "url_tokenizer" }, "char_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "char_tokenizer" }, "virus_type_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "file_tokenizer" }, "gene_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "gene_tokenizer" }, "ip_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "ip_tokenizer" }, "key_analyzer": { "type": "custom", "filter": ["filter2"], "tokenizer": "key_tokenizer" }, "file_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "file_tokenizer" } }, "tokenizer": { "char_tokenizer": { "group": "-1", "type": "pattern", "pattern": "[\\W+]" }, "md5_tokenizer": { "pattern": "[\\W]", "group": "-1", "type": "pattern" }, "file_tokenizer": { "group": "-1", "type": "pattern", "pattern": "[_\\-]" }, "virus_tokenizer": { "group": "-1", "pattern": "[\\\\{\\\\}\\\\.:/&=)(\\[\\]\\s]", "type": "pattern" }, "ip_tokenizer": { "pattern": "[\\\\.]", "type": "pattern", "group": "-1" }, "gene_tokenizer": { "group": "-1", "pattern": "[\\\\._]", "type": "pattern" }, "key_tokenizer": { "type": "keyword", "buffer_siz": "2028" }, "url_tokenizer": { "type": "pattern", "group": "-1", "pattern": "[:\\\\?\\\\./&=]" } } }, "number_of_shards": "5" } }, "mappings": { "ss_type": { "properties": { "crc32": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "sha256": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "virus_family": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "archive_info": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "virus_name": { "store": true, "analyzer": "char_analyzer", "type": "string" }, "sha1": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "is_child_file": { "index": "not_analyzed", "store": true, "null_value": "false", "type": "boolean" }, "is_digital_signa": { "index": "not_analyzed", "store": true, "null_value": "false", "type": "boolean" }, "compiler_info": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "original_file_name": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "source_name": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "archive_bom": { "index": "not_analyzed", "store": true, "null_value": "false", "type": "boolean" }, "avpscan": { "store": true, "analyzer": "char_analyzer", "type": "string" }, "is_exe_embedded": { "index": "not_analyzed", "store": true, "null_value": "false", "type": "boolean" }, "ssdeep": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "file_size": { "index": "not_analyzed", "store": true, "null_value": 0, "type": "integer" }, "is_archive": { "index": "not_analyzed", "store": true, "null_value": "false", "type": "boolean" }, "is_unknown_detection": { "index": "not_analyzed", "store": true, "null_value": "false", "type": "boolean" }, "is_virus": { "index": "not_analyzed", "store": true, "null_value": "false", "type": "boolean" }, "avp_virus_type": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "format_name": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "virus_platform": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "self_extract_achieve": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "self_extract_achieve_flag": { "index": "not_analyzed", "store": true, "null_value": "false", "type": "boolean" }, "infected_judgement": { "index": "not_analyzed", "store": true, "null_value": "false", "type": "boolean" }, "compiler_info_flag": { "index": "not_analyzed", "store": true, "null_value": "false", "type": "boolean" }, "pack_info": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "final_result": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "md5": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "virus_action": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "is_product_version": { "index": "not_analyzed", "store": true, "null_value": "false", "type": "boolean" }, "detectvm": { "index": "not_analyzed", "store": true, "null_value": "false", "type": "boolean" }, "ex_time": { "index": "not_analyzed", "store": true, "format": "yyyy-MM-dd HH:mm:ss", "type": "date" }, "is_pack": { "index": "not_analyzed", "store": true, "null_value": "false", "type": "boolean" } } } } }, "ss_url_ip_dom_v1": { "template": "t_relate*", "order": 0, "settings": { "index": { "number_of_replicas": "0", "analysis": { "filter": { "filter1": { "type": "standard" }, "filter3": { "type": "stop" }, "filter2": { "type": "lowercase" } }, "analyzer": { "virus_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "virus_tokenizer" }, "md5_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "md5_tokenizer" }, "url_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "url_tokenizer" }, "char_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "char_tokenizer" }, "virus_type_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "file_tokenizer" }, "gene_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "gene_tokenizer" }, "ip_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "ip_tokenizer" }, "key_analyzer": { "type": "custom", "filter": ["filter2"], "tokenizer": "key_tokenizer" }, "file_analyzer": { "type": "custom", "filter": ["filter1", "filter2", "filter3"], "tokenizer": "file_tokenizer" } }, "tokenizer": { "char_tokenizer": { "group": "-1", "type": "pattern", "pattern": "[\\W+]" }, "md5_tokenizer": { "pattern": "[\\W]", "group": "-1", "type": "pattern" }, "file_tokenizer": { "group": "-1", "type": "pattern", "pattern": "[_\\-]" }, "virus_tokenizer": { "group": "-1", "pattern": "[\\\\{\\\\}\\\\.:/&=)(\\[\\]\\s]", "type": "pattern" }, "ip_tokenizer": { "pattern": "[\\\\.]", "type": "pattern", "group": "-1" }, "gene_tokenizer": { "group": "-1", "pattern": "[\\\\._]", "type": "pattern" }, "key_tokenizer": { "type": "keyword", "buffer_siz": "2028" }, "url_tokenizer": { "type": "pattern", "group": "-1", "pattern": "[:\\\\?\\\\./&=]" } } }, "number_of_shards": "5" } }, "mappings": { "es_source_data": { "properties": { "t_domain": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "crc32": { "index": "no", "store": true, "type": "string" }, "source": { "store": true, "null_value": "yq-system", "analyzer": "key_analyzer", "type": "string" }, "dst_ip": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "md5": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "virus_name": { "index": "no", "store": true, "type": "string" }, "family_name": { "index": "no", "store": true, "type": "string" }, "s_port": { "index": "no", "store": true, "type": "string" }, "src_ip": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "up_time": { "index": "not_analyzed", "store": true, "format": "yyyy-MM-dd HH:mm:ss", "type": "date" }, "capture_province": { "index": "no", "store": true, "type": "string" }, "d_port": { "index": "no", "store": true, "type": "string" }, "url": { "store": true, "analyzer": "key_analyzer", "type": "string" } } }, "tip_url": { "properties": { "tip_url": { "store": true, "null_value": "yq-system", "analyzer": "key_analyzer", "type": "string" } } }, "t_url": { "properties": { "crc32": { "index": "no", "store": true, "type": "string" }, "source": { "store": true, "null_value": "t-system", "analyzer": "key_analyzer", "type": "string" }, "md5": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "method": { "index": "no", "store": true, "type": "string" }, "ex_time": { "index": "not_analyzed", "store": true, "format": "yyyy-MM-dd HH:mm:ss", "type": "date" }, "url": { "store": true, "analyzer": "key_analyzer", "type": "string" } } }, "t_shunt_virus_event": { "properties": { "t_domain": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "crc32": { "index": "no", "store": true, "type": "string" }, "probe_id": { "index": "no", "store": true, "type": "string" }, "t_virus_name": { "index": "no", "store": true, "type": "string" }, "dst_ip": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "r_time": { "index": "no", "store": true, "type": "string" }, "up_time": { "index": "not_analyzed", "store": true, "format": "yyyy-MM-dd HH:mm:ss", "type": "date" }, "virus_name": { "index": "no", "store": true, "type": "string" }, "t_virus_type": { "index": "no", "store": true, "type": "string" }, "proto": { "index": "no", "store": true, "type": "string" }, "url": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "source": { "store": true, "null_value": "1xx-system", "analyzer": "key_analyzer", "type": "string" }, "from_log": { "index": "no", "store": true, "type": "string" }, "md5": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "filename": { "index": "no", "store": true, "type": "string" }, "src_ip": { "store": true, "analyzer": "key_analyzer", "type": "string" }, "s_port": { "index": "no", "store": true, "type": "string" }, "family_name": { "index": "no", "store": true, "type": "string" }, "ex_time": { "index": "not_analyzed", "store": true, "type": "string" }, "d_port": { "index": "no", "store": true, "type": "string" }, "log_type": { "index": "no", "store": true, "type": "string" } } }, "t_ip": { "properties": { "port": { "index": "no", "store": true, "type": "string" }, "crc32": { "index": "no", "store": true, "type": "string" }, "locat": { "index": "no", "store": true, "type": "string" }, "source": { "store": true