{ Josh Rendek }

<3 Go & Kubernetes

ELK Stack

ELK Operations

Fix an index not being an alias

Example log message

1
Connection marked as failed because the onConnect callback failed: resource 'apm-7.17.18-error' exists, but it is not an alias
 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
PUT metricbeat-7.10.0/_settings
{
    "settings": {
        "index.blocks.write": true
    }
}

PUT metricbeat-7.10.0-000001


POST _aliases
{
    "actions": [
        {
        "remove_index": { "index": "metricbeat-7.10.0" }
    },
        {
        "add": {
            "index": "metricbeat-7.10.0-000001",
            "alias": "metricbeat-7.10.0",
            "is_write_index": true
        }
    }
    ]
}

GET _cat/aliases/apm*error*?s=index&v=true&h=alias,index,is_write_index

metricbeat may need a bounce after:

1
kubectl rollout restart daemonset metricbeat -n kube-system