• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Forcing hard Bandwidht limit?

S

shastacola

Guest
Hello,

Is there anyway to force a badwidth quota in plesk. I would like to be able to assign a bandwidth and if a user exceeds their bandwidth, it would display some sort of message?
 
Wouldn't that be nice! The only thing I know to do is to make an event handler (through the Plesk GUI) to suspend the domain when it reaches it's traffic limit. Customers generally don't take kindly to things like that without advance notice though..
 
Originally posted by ptrost
Customers generally don't take kindly to things like that without advance notice though..

That's why it should really be handled by a billing system rather than Plesk itself.
 
Originally posted by ptrost
Wouldn't that be nice! The only thing I know to do is to make an event handler (through the Plesk GUI) to suspend the domain when it reaches it's traffic limit. Customers generally don't take kindly to things like that without advance notice though..

How does one do that using the event handler exactly?

Thanks,
Evren
 
Go to Server -> Event Handler > select Traffic Limit for Domain Reached

User is root

Command is:

"/usr/local/psa/admin/bin/domainmng --turn-off --domain-name=<domain_name>"


I'm not sure if <domain_name> is the correct parameter or not, but if it is, then when the traffic limit for the domain is excceded, it will trigger the event to turn off the domain name and that command will run with the proper domain name substituted.

Be sure to change the path to where domainmng is on your server.
 
Originally posted by ptrost
Go to Server -> Event Handler > select Traffic Limit for Domain Reached

"/usr/local/psa/admin/bin/domainmng --turn-off --domain-name=<domain_name>"

I think this is a very bad idea, if you turn off domain it also turns off all e-mail / dns, if you turn it back on, it takes at least 24 hours before domain is propagated to other dns servers (worldwide)

Better solution is to make use of mod_cband (http://cband.linux.pl/) or equivalent.
 
Originally posted by pdreissen
I think this is a very bad idea, if you turn off domain it also turns off all e-mail / dns, if you turn it back on, it takes at least 24 hours before domain is propagated to other dns servers (worldwide)

Better solution is to make use of mod_cband (http://cband.linux.pl/) or equivalent.

I already tried this, it doesnt seem to work. Because domain_name is not a part of the traffic limit reached event.

Please see:
http://download1.swsoft.com/Plesk/Plesk8.0/Doc/plesk-8-admins-guide/22819.htm

Do you know a working way of making this happen?

Thanks,
Evren
 
Originally posted by pdreissen
I think you are responding to the message of ptrost!

Yes sorry my mistake, but it doesnt work. Is there any way to do this anyway?
 
I'm confused, domain_name is part of "For the event 'Limit on traffic reached for domain'"

I've never had the need to try this so I'm not sure if it works or not :(
 
Originally posted by ptrost
I'm confused, domain_name is part of "For the event 'Limit on traffic reached for domain'"

I've never had the need to try this so I'm not sure if it works or not :(

Please check the available templates
http://download1.swsoft.com/Plesk/Plesk8.0/Doc/plesk-8-admins-guide/22819.htm

It is not part of limit
For the event 'Limit on traffic reached for domain' There is not domain_name.

Domain name
old_domain_name
new_domain_name
required

Traffic limit
old_maximum_traffic
new_maximum_traffic

There is old_domain_name and new_domain_name but what does old and new mean?
 
Originally posted by yurtesen
There is old_domain_name and new_domain_name but what does old and new mean? [/B]

Can be used if you rename your domain for ex. i don't know if these vars are available in all the event manager handlers.

However as i stated before i think it is a very bad solution to disable your complete domain.

Please look and search for mod_cband for a nice solution!
 
Originally posted by pdreissen
Can be used if you rename your domain for ex. i don't know if these vars are available in all the event manager handlers.

However as i stated before i think it is a very bad solution to disable your complete domain.

Please look and search for mod_cband for a nice solution!

Thats right, it is a bad idea. That is why I dont use plesk myself but my friend who is using plesk needs this feature and he doesnt mind that it is a bad idea.

mod_cband looks interesting but is there any way to integrate it with plesk?

Also, I still dont get the old domain, new domain concept. New domain should be set somewhere or how can plesk set some domain name into a variable just like that? is the old_domain variable holding the domain name of the domain which passed the limit? is there any documentation about these? something a little bit more detailed?

Thanks
Evren
 
Back
Top