Exiting: resource 'metricbeat-7.4.2' exists, but it is not an alias

After upgrading from 6.8.2 to 7.4.2, when executing metricbeat setup, I receive the error

Exiting: resource 'metricbeat-7.4.2' exists, but it is not an alias

Visualizations and dashboards are of course largely broken. Any assistance you can offer would be most appreciated.

Thanks in advance.

I'm having almost exactly the same issue. I can see how this happened but I can't see a way out of it.

In my case, it's because the original metricbeat indexed index (!!) had been removed due to space issues. So the various (several hundred) metricbeat agents come in and try and write to the alias. But there is no alias so the index is created with the name of the alias. This causes ILM to break.

I've tried to delete the index but of course it just comes back again because one of the several hundred agents just re-creates it.

Is there some way to "pause" ingestion on the server side? If so, I can then manually re-create the correct index name and alias and everything should be good. Stopping all of the clients is pretty well impossible across several hundred agents so really looking for something on the server side.



I managed to find a way around this in case anyone else is interested. Here's what I had to do:

  • Stop new index auto-creation

    • Added action.auto_create_index: false to the user override settings for the node
  • Deleted the metricbeat-7.4.0 index (I can afford to lose this data)

  • Created a new metricbeat-7.4.0-2019-11-06 index and assign it the alias

PUT /metricbeat-7.4.0-2019-11-06

    "actions" : [
        { "add" : { "index" : "metricbeat-7.4.0-2019.11.06-000001", "alias" : "metricbeat-7.4.0", "is_write_index" : "true" }
  • Re-enable auto-index creation (remove from user config)

The index I created quickly rolled over but I'm all good now. None of the metricbeat clients had to be touched to get back to a working state. Hoorah!



@dnorth98 , thanks for the tip - that got me moving in the right direction. If switching off action.auto_create_index in the metricbeat.yml instead of the user override, you must comment it out rather than setting to false, as this is too restrictive according to the error I received when I first set it false. I then deleted the metricbeat-n.n.n index, and the correct dated index with non-dated alias was created on the next agent connection after restart.


@dnorth98 is there any bug raised for this on Github ?

I'm not sure. Since I solved this myself, I've not upgraded again yet

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.