Clearing snapshots

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
hcltech
Posts: 31
Joined: Wed Aug 21, 2019 10:37 am

Clearing snapshots

Post by hcltech »

I had to redo my servers and attached to my offsite storage for snapshots before i removed them. Now that I have cleaned it out they are still showing up in the snapshot list. Is there a way to clear these out of nagios log server?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Clearing snapshots

Post by scottwilkerson »

If you want to delete all the snapshots you need to gran the name of the repository from Admin -> Snapshots & Maintenance in the repository section and then replace <repository> in the command below and run from the CLI

Note: This will delete all snapshots and is not reversible

Code: Select all

curl -XDELETE localhost:9200/_snapshot/<repository>/*
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hcltech
Posts: 31
Joined: Wed Aug 21, 2019 10:37 am

Re: Clearing snapshots

Post by hcltech »

{"error":"InvalidSnapshotNameException[[QNAP:*] Invalid snapshot name [*], must not contain the following characters [\\, /, *, ?, \", <, >, |, , ,]]","status":400}root@cl-p-nagioslog01
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Clearing snapshots

Post by scottwilkerson »

Can you delete them through the GUI?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hcltech
Posts: 31
Joined: Wed Aug 21, 2019 10:37 am

Re: Clearing snapshots

Post by hcltech »

I tried that first it just sits there forever and does nothing.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Clearing snapshots

Post by cdienger »

Give this a try:

Code: Select all

/usr/local/nagioslogserver/scripts/curator.sh delete snapshots--all-snapshots --repository 'REPOSITORY_NAME'
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
hcltech
Posts: 31
Joined: Wed Aug 21, 2019 10:37 am

Re: Clearing snapshots

Post by hcltech »

It looked like that errored out as well but it created a bunch of files in the repository. I went in and deleted all those and now my storage snapshots list is clear in the UI. Thank you.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Clearing snapshots

Post by cdienger »

Odd that it would give you an error. If you run into the error again on the new setup please open a new thread and we'll take a look.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked