Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index delete #445

Closed
ricgatti opened this issue Jan 3, 2023 · 2 comments
Closed

Index delete #445

ricgatti opened this issue Jan 3, 2023 · 2 comments

Comments

@ricgatti
Copy link

ricgatti commented Jan 3, 2023

Hello I have two index that are to much big and fill my data disk, how can i remove it?

image

they are also old

viya_logs-nunatacsas--2022-12-18
viya_logs-nunatacsas-
-2022-12-17

@gsmith-sas
Copy link
Member

@ricgatti The indices containing the collected log messages are automatically deleted after a pre-defined number of days. By default, they are deleted after 3 days. It looks like something interrupted that automatic process and these indices were left in place. However, this isn't a big problem as you can manully delete these indices easily via the OpenSearch Dashboards web application.

You can delete these two indices from within OpenSearch Dashboards using the following steps:

  • Log into OpenSearch Dashboards (OSD) as the admin user
  • Select the DEV TOOLS option from the main menu (appears when you click on the 3 horizontal lines in the upper left)
  • Dismiss the informational window that appears after reviewing the information there
  • This CONSOLE window allows you to submit API calls directly to OpenSearch
  • There may be a sample query in the left-hand panel of the Console, if so, delete it by selecting all of the rows and hitting the DELETE key on your keyboard
  • The API call syntax to delete an index is fairly straight-forward, type the following into the left-hand panel of the Console:
    DELETE viya_logs-nunatacsas--2022-12-18 and click on the right-pointing triangle (i.e. the 'play' button) to the right of the text you entered.
  • If the API call executes successfully, you should see a JSON formatted message that reads "acknowledged" : true
  • Do the same thing for the 2nd index you want to delete
  • After submitting the two API calls and getting confirmation that they succeeded, you may want to return to the Index Management screen (i.e. the one you took a screenshot of) to confirm they have been deleted. You may also want to look for other old indices that may be left around. If you find any, you can delete them using the same technique. It is also possible to use wild-card characters in the API calls. For example, if you submit the call DELETE viya_logs-nunatacsas--2022-12-* , you would delete ALL indices containing log messages collected in December of 2022. Please be very careful when using wild-card characters in DELETE calls; it is very easy to accidentally delete more indices than you intended.

@ricgatti
Copy link
Author

ricgatti commented Jan 3, 2023

@gsmith-sas thanks a lot this way solve my problem.

@ricgatti ricgatti closed this as completed Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants