티스토리 뷰

ERROR    elasticsearch/client.go:343    Failed to perform any bulk index operations: 400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"no write index is defined for alias [apm-7.3.0-metric]. The write index may be explicitly disabled using is_write_index=false or the alias points to multiple indices without one being designated as a write index"}],"type":"illegal_argument_exception","reason":"no write index is defined for alias [apm-7.3.0-metric]. The write index may be explicitly disabled using is_write_index=false or the alias points to multiple indices without one being designated as a write index"},"status":400}

ERROR    elasticsearch/client.go:343    Failed to perform any bulk index operations: 400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"no write index is defined for alias [apm-7.3.0-span]. The write index may be explicitly disabled using is_write_index=false or the alias points to multiple indices without one being designated as a write index"}],"type":"illegal_argument_exception","reason":"no write index is defined for alias [apm-7.3.0-span]. The write index may be explicitly disabled using is_write_index=false or the alias points to multiple indices without one being designated as a write index"},"status":400}

ERROR    elasticsearch/client.go:343    Failed to perform any bulk index operations: 400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"no write index is defined for alias [apm-7.3.0-trasaction]. The write index may be explicitly disabled using is_write_index=false or the alias points to multiple indices without one being designated as a write index"}],"type":"illegal_argument_exception","reason":"no write index is defined for alias [apm-7.3.0-span]. The write index may be explicitly disabled using is_write_index=false or the alias points to multiple indices without one being designated as a write index"},"status":400}

위와 같이 alias에 is_write_index가 false 로 되어 있어서, apm-server에서 elastic-search 에 write가 불가해? 에러가 발생하는 경우가 있다. apm-agent 에서 데이터를 잘 보내주어도 apm-server에서 elastic-search에 정상적으로 데이터를 쓰지못해 kibana에서 apm 정보를 전혀 볼 수가 없게 된다.

이때는 해당 alias를 is_write_index 를 true 로 해주면 된다. 제일 마지막/최신 index의 alias 를 추가하며 is_write_index를 true로 해주면 된다.

PUT /_aliases
{
    "actions" : [
        { "add" : { "index" : "apm-7.3.0-metric-000002", "alias" : "apm-7.3.0-metric", "is_write_index":true} }
    ]
}

 

alias와 is_write_index에 관련해서는 조금 더 찾아봐야 할 것 같다.

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
글 보관함