OpenVZ Forum


Home » General » Support » Monitor Beans
Monitor Beans [message #14684] Thu, 05 July 2007 16:15 Go to next message
jpastore is currently offline  jpastore
Messages: 21
Registered: July 2007
Location: South Florida
Junior Member
I would like to start by saying I'm new to contributing to open source projects. I've definitely used enough over the past decade and always wanted to be able to give something back. I did a little looking around and couldn't find something that would monitor bean counters so I wrote a quick and dirty perl script to run in a cronjob and email me if the bean counters increase or the disk quota goes over 80%.

If anyone would like to modify/improve this script feel free...I hope this helps other people as it has us with the numerous issues that arose from using openvz and not knowing that these bean counters are the source of the problem.

We've quickly resolved any issue where things didn't work when we were trying to get them going, but for stuff like ProFTPd where we need feed back from users...and we all know how well that works out...this has proven to keep us in a more proactive support situation.


CRON entry:

MAILTO=jpastore@mydomain.com
0,15,30,45 * * * * /opt/monitor_beans/monitor_beans.pl

Comments welcome...
Re: Monitor Beans [message #29427 is a reply to message #14684] Sat, 12 April 2008 11:42 Go to previous messageGo to next message
SoftDux is currently offline  SoftDux
Messages: 55
Registered: November 2007
Location: Johannesburg, South Afric...
Member
Thanx for the great contribution - it adds value to my sysadmin duties Smile
Re: Monitor Beans [message #29428 is a reply to message #29427] Sat, 12 April 2008 12:54 Go to previous messageGo to next message
jpastore is currently offline  jpastore
Messages: 21
Registered: July 2007
Location: South Florida
Junior Member
no problem. If you need any help with it or have any suggestions for improvement. Let me know.
Re: Monitor Beans [message #29593 is a reply to message #14684] Thu, 17 April 2008 18:11 Go to previous messageGo to next message
SoftDux is currently offline  SoftDux
Messages: 55
Registered: November 2007
Location: Johannesburg, South Afric...
Member
it does a good job of monitoring the beans. I gues if you want to, implement a way of automatically increasing a set list of beans?

Let's say one creates a list of "auto-change-on-failure" beans, like the inodes, or tcpsock or stuff like that, and then when an alarm get's triggered, the monitor could automatically increase it by say 10% ?
Re: Monitor Beans [message #29600 is a reply to message #29593] Fri, 18 April 2008 00:02 Go to previous messageGo to next message
jpastore is currently offline  jpastore
Messages: 21
Registered: July 2007
Location: South Florida
Junior Member
Well that's kind of a scary thought. Personally I don't like the idea of automated scripts running as root. Especially since you're increasing the resources allocated to the VE in an automated fashion...if something gets out control in the VE and we auto increment beans...how do we stop it from over allocating beans?
Re: Monitor Beans [message #29601 is a reply to message #14684] Fri, 18 April 2008 00:22 Go to previous messageGo to next message
SoftDux is currently offline  SoftDux
Messages: 55
Registered: November 2007
Location: Johannesburg, South Afric...
Member
Yes, it could be dangerous, but so can everything else Smile

It's only an idea, and with proper thought behind it, could work well. With limits on everything, a given VPS could be allowed to grow as needed untill it reaches the limits. I have a VPS which runs well below the set mem & HDD limits, but I occasionally need to adjust the numsock values a bit.
Re: Monitor Beans [message #29602 is a reply to message #29601] Fri, 18 April 2008 00:34 Go to previous message
jpastore is currently offline  jpastore
Messages: 21
Registered: July 2007
Location: South Florida
Junior Member
I think if it were easier to understand what resources really translated to in beans in plain english it would easy to set variables and describe them with comments.

For example:

# this should be at least X each represents
# this much mem being used etc...
$max_numothersock = 500;

it wouldn't be hard to do math and set a limit being that var...this way you can conserve resources and increase as needed...I would still keep the notices coming until you reach the max failure point.

If you would be willing to do the research and documentation I can try and make some time this weekend to code it.
Previous Topic: Weird vzquota error
Next Topic: boot.log and Samba on VM
Goto Forum:
  


Current Time: Tue May 14 12:03:13 GMT 2024

Total time taken to generate the page: 0.01407 seconds