MySQL Forums
Forum List  »  Router & Proxy

Re: mysql-proxy admin functions
Posted by: Chris Calender
Date: April 20, 2010 05:48PM

Yes, as you mentioned, when using admin.lua and reporter.lua, you can only execute show proxy processlist, querycounter, and backends (and myerror).

In the older versions of the proxy, a rudimentary interface was built into the proxy for the admin interface, which is where the proxy_config and proxy_connections were available.

However, since that admin interface was removed, so was that functionality.

So, you could easily code new function in lua to create and maintain those 2 tables, and then display them with the same SELECT command.

I would refer you to admin.lua and reporter.lua to see how you would actually create a command, and how to add the functions, etc. Basically, see those for the framework. You could focus on the implementation of just a single command, such as SHOW PROXY PROCESSLIST, which should give you a good idea on how to add something similar (as I create and maintain internal tables in that function, and then also illustrate how to access and display that information).

And then as for obtaining the information you want to display for each respective SELECT, then I would refer you to the following post, which will show you many of the available variables and in which function you would access them (kind of a variable reference sheet), so hopefully that will help to easily obtain the information you want.

http://www.chriscalender.com/?p=84

Options: ReplyQuote


Subject
Views
Written By
Posted
5373
March 18, 2010 12:26PM
Re: mysql-proxy admin functions
3367
April 20, 2010 05:48PM
2173
May 03, 2010 12:30PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.