Reply
Member
Posts: 204
Registered: ‎07-09-2015
Kudos: 49
Solutions: 2

Deleting multiple vouchers one by one - Seriously?!

[ Edited ]

I just ordered my receptionist to toss thousands of vouchers into the trash, as we're going to offer guests different speed limits. I whistled my way over to my computer to log into the controller, safe in the knowledge that I could exterminate all those vouchers from the system with a few clicks, as of course we don't want all those binned vouchers falling into the wrong hands. . .

 

But, I can't delete them all en masse. I hope there's a command line way of doing this, or someone here is going to have a very long day, and sore left/right click fingers. I've searched the forums, but nothing, this seems to be a shocking omission from the Unifi functionality. Please tel me I've missed a setting, or something. . .

Established Member
Posts: 1,103
Registered: ‎08-29-2016
Kudos: 503
Solutions: 50

Re: Deleting multiple vouchers one by one - Seriously?!

[ Edited ]

@Xpat wrote:

of course we don't want all those binned vouchers falling into the wrong hands. . .

 


Yeah, that'd indeed be an enormous disaster, almost worse than the sinking of Titanic. Just imagine someone might use the wifi -- with wrong speed limits!!!   

 

P.S. SCNR.

Member
Posts: 204
Registered: ‎07-09-2015
Kudos: 49
Solutions: 2

Re: Deleting multiple vouchers one by one - Seriously?!

[ Edited ]

Sarcasm noted, but really, in a country where uttering Lese Majeste could land you in jail for 15 years, we need to keep a tight grip on who accesses our internet connection, in our name. Your social media 'rebel yell' means nothing here, just jail time. I don't expect everyone to understand this...

https://asiancorrespondent.com/2016/10/thai-woman-made-kneel-kings-portrait-royal-insult/

Established Member
Posts: 1,103
Registered: ‎08-29-2016
Kudos: 503
Solutions: 50

Re: Deleting multiple vouchers one by one - Seriously?!


@Xpat wrote:

in a country where uttering Lese Majeste could land you in jail for 15 years, we need to keep a tight grip on who accesses the internet here, in our name


And he's dead anyway. Hopefully the Grim Reaper has not insulted him too much. Sigh.

Member
Posts: 204
Registered: ‎07-09-2015
Kudos: 49
Solutions: 2

Re: Deleting multiple vouchers one by one - Seriously?!

[ Edited ]

As I said, I don't expect everyone to understand this difficult environment, and Lese Majeste extends to living royals as well as those enjoying the afterlife. Getting back to the issue at hand, deleting all vouchers...

Regular Member
Posts: 446
Registered: ‎10-21-2014
Kudos: 137
Solutions: 16

Re: Deleting multiple vouchers one by one - Seriously?!

I agree that a "delete Batch" is Missing.

In the mean time you can delete the vouchers in the MongoDB directly.

There is a Lot og MongoDB managers around, find one you like. I use Mongovue.

If you run you controller on Linux you might need to configure remote Access for your MongoDB tools.

Member
Posts: 204
Registered: ‎07-09-2015
Kudos: 49
Solutions: 2

Re: Deleting multiple vouchers one by one - Seriously?!

Thanks for commenting. It's high season here now though and I don't have the time to learn new tricks and start installing applications on the server (at the risk of bringing it down while our hotel is full). I can't start fiddling around with new software in April 2017. I really just need a simple command one liner to make it all (the vouchers) go away, I'm hoping a UBNT developer will pipe up with that for me. . .

Ubiquiti Employee
Posts: 136
Registered: ‎05-12-2016
Kudos: 70
Solutions: 16

Re: Deleting multiple vouchers one by one - Seriously?!

@Xpat,

 

Thanks for reporting. Deleting multiple vouchers is still on our "to do" list. We will add it as soon as we deal with other features.

 

Best Regards

Member
Posts: 114
Registered: ‎02-01-2013
Kudos: 65
Solutions: 4

Re: Deleting multiple vouchers one by one - Seriously?!

[ Edited ]

I have just had a similar issue 200 plus vouchers issued yesterday with 5kbs up and down.

 

Come in this morning to everyone saying the wi-fi is slow!

 

I would like delete batches too after a mamoth session of deleting 200 manually. 

 

Can we also have some way of locking down vouchers by having a preset limits to tickets Zyxel used to do this and it eliminated these types of issues being created in the first place. 

 

EG. A Corporate ticket with preset limits higher than the coffee shop client from a drop down box, then the reception crew don't need to be IT literate in relation to through put. 

Regular Member
Posts: 446
Registered: ‎10-21-2014
Kudos: 137
Solutions: 16

Re: Deleting multiple vouchers one by one - Seriously?!

Deleting Vouchers by MongoDB command line is also possible and probably not too difficult.

MongoDB shell invocation will be different for Linux/MAC/WIN, so look it up.

 

Remember to take a backup first.

 

Here is a thread with some hints and a example http://community.ubnt.com/t5/UniFi-Wireless/UniFi-delete-vouchers/m-p/955419

 

Regular Member
Posts: 446
Registered: ‎10-21-2014
Kudos: 137
Solutions: 16

Re: Deleting multiple vouchers one by one - Seriously?!

[ Edited ]

So here is the How to for Linux: (on windows run mongo.exe from a command window on MAC run mongo --shell)

 

Remember your backup!

 

/*To enter the mongoDB command line shell

root@xxxx:~# mongo --port 27117

/*To open the unifi DB

> use ace

/* To find the site_id:

> db.site.find({})

/*To remove all Vouchers belonging to one Site (replace with site_id from db.site.find)

> db.voucher.remove({"site_id" : "5408e209e4b048542e965503"})

/* To remove all Voucher for all Sites

> db.voucher.remove({})

/* to list the Vouchers

> db.voucher.find({})

/* to exit the mongoDB command line shell

> exit

Member
Posts: 204
Registered: ‎07-09-2015
Kudos: 49
Solutions: 2

Re: Deleting multiple vouchers one by one - Seriously?!

[ Edited ]

Will this just remove unused vouchers, or vouchers that are currently in use also?

Regular Member
Posts: 446
Registered: ‎10-21-2014
Kudos: 137
Solutions: 16

Re: Deleting multiple vouchers one by one - Seriously?!


@Xpat wrote:

Will this just remove unused vouchers, or vouchers that are currently in use also?


This will remove all voucher. you will have to add some other parameter to the mongo command....I will look that up in the evening today (evening, Greenland, WGST, that is)

Regular Member
Posts: 446
Registered: ‎10-21-2014
Kudos: 137
Solutions: 16

Re: Deleting multiple vouchers one by one - Seriously?!

[ Edited ]

Taking an early evening :-)

 

Remember to take a backup prior to deleting.

 

/*list unused

db.voucher.find({"site_id" : "55049f97e4b0f3592348dd2d", "used" : 0})

/*list used

db.voucher.find({"site_id" : "55049f97e4b0f3592348dd2d", "used" : 1})

 

/*remove unused

db.voucher.remove({"site_id" : "55049f97e4b0f3592348dd2d", "used" : 0})

/*remove used

db.voucher.remove({"site_id" : "55049f97e4b0f3592348dd2d", "used" : 1})

 

I would not know when a voucher is marked as used. It could be at start of duration or after expiry. I suspect the first as the voucher should not be used another time.

Emerging Member
Posts: 50
Registered: ‎06-23-2015
Kudos: 4
Solutions: 1

Re: Deleting multiple vouchers one by one - Seriously?!

Do you know the date time they were created?

We can help form mongoDB commands for you.

 

Emerging Member
Posts: 103
Registered: ‎03-10-2015
Kudos: 16
Solutions: 1

Re: Deleting multiple vouchers one by one - Seriously?!

I need this option too... I just did the request, lets hope they notice.
New Member
Posts: 12
Registered: ‎08-11-2016
Kudos: 6

Re: Deleting multiple vouchers one by one - Seriously?!

Hi UBNT-Jacek,

In the meanwhile this 'deleting multiple vouchers' is still on the to-do list? :-)) I assume, since it I did not find it yet in the controller interface. Would be very nice to have this feature to keep things clean.
New Member
Posts: 44
Registered: ‎08-21-2015
Kudos: 10
Solutions: 1

Re: Deleting multiple vouchers one by one - Seriously?!

Any update with regard to deleting batch vouchers.

 

 

when can we expect this feature?

 

Thank you

Established Member
Posts: 1,480
Registered: ‎04-22-2016
Kudos: 333
Solutions: 119

Re: Deleting multiple vouchers one by one - Seriously?!

[ Edited ]

@ffdeguzman  @Xpat  @motadom

 

Hi, maybe not what you are looking for, but check it out.

 

Get the UniFi App for Android / Apple

 

Start the the App > Hotspot Manager > Voucher > select the Vouchers you want to delete > delete them with ONE CLICK.

Please reward people who have helped you with kudo's and mark your thread as solved when you receive a solution to your issue.
New Member
Posts: 44
Registered: ‎08-21-2015
Kudos: 10
Solutions: 1

Re: Deleting multiple vouchers one by one - Seriously?!

@cempa

 

how about if you messed up creating 10000 vouchers with 1kbps speed?

 

how will you be able to delete it? one by one? Smash

 

 

 

Reply