List:Internals« Previous MessageNext Message »
From:Michel Stam Date:June 20 2006 10:10am
Subject:Re: MySQL / SNMP
View as plain text  
Hello Stewart,

>was this MySQL Cluster (as in NDB) or a bunch of replication slaves?

Actually its MySQL cluster 4.1. Old, but unfortunately I'm not able to 
upgrade the production servers on a regular basis.

>there's utilities such as mytop, nagios etc. too.

I know, but products such as HP OpenView talk SNMP; as its a 
standardised protocol I figured SNMP would be a good choice (the 
protocol was specifically meant for this).

>I'd be interested to see your version - as no doubt would others. Is it
>a patch to the mysql server or a separate process?

I'm currently cleaning it up and making it a little more idiot proof.
(such as when you kill the mysqld process, or all of the management 
nodes in a cluster).
The daemon is a seperate process, I thought this would be better. 
Especially since I use the standard mysqlclient libs, and the ndbclient lib.
This way it should be possible to compile it on a version anywhere from 
4.1 to 5.1beta (I develop on 4.1, but I'll try to check this before I 
submit the code).

What it currently does is export a large number of the show global and 
show status commands, list the cluster state (if configured) in the same 
way ndb_mgm does, show the process list, the table status for all tables 
in the system, and as an extra, I've coded the ndb_size.pl script into C 
which gives a fairly accurate resource usage for tables if they were 
stored on a cluster database (shown per table, unfortunately not 
databases). Including BLOBS and ENUMS.

LOBS are currently giving me a bit of an issue though, as parsing the 
column sizes drastically degrades performance (for example by selecting 
the average sizes using a query such as SELECT AVG( LENGTH( col ) ) FROM 
database.table like the perl script does). MYSQL_FIELD structures only 
provide me the maximum size of the BLOB column, which would report 
memory usage way off from the actual situation. If anyone has any 
thoughts on this, please let me know.

As the underlaying SNMP engine I use Net-SNMP (see 
http://www.net-snmp.org/). I hope that is not a problem.

I'll keep you posted.

Cheers,

Michel
Stewart Smith wrote:
> On Tue, 2006-06-20 at 10:06 +0200, Michel Stam wrote:
>   
>> A little while back I started working on a way to remotely monitor our 
>> MySQL cluster.
>> The protocol I chose to use for this, is SNMP.
>>     
>
> was this MySQL Cluster (as in NDB) or a bunch of replication slaves?
>
>   
>> As I haven't found any other means of monitoring than the various show 
>> commands from the mysql commandline client, I did a couple of searches 
>> on the MySQL website.
>>     
>
> there's utilities such as mytop, nagios etc. too.
>
>   
>> The only references I found is to a piece of commercial software from 
>> AdventNet (which if I read correctly seems to use its own SNMP daemon as 
>> well), and a posting on this list a few years ago;
>> http://lists.mysql.com/internals/1048
>>
>> I did find a so-called enterprise ID on the IANA website (number 24993, 
>> registered by Marc Paley for MySQL Inc.).
>>
>> My question; Is there an existing implementation which I haven't found 
>> yet, and if not, is anyone interested if I provide my version?
>>     
>
> I'd be interested to see your version - as no doubt would others. Is it
> a patch to the mysql server or a separate process?
>
>   
Thread
MySQL / SNMPMichel Stam20 Jun
  • Re: MySQL / SNMPStewart Smith20 Jun
    • Re: MySQL / SNMPMichel Stam20 Jun
      • Re: MySQL / SNMPStewart Smith21 Jun
        • Re: MySQL / SNMPMichel Stam21 Jun
          • Re: MySQL / SNMPStewart Smith22 Jun
            • Guidelines for accepting contributions (Was: MySQL / SNMP)Marc Alff22 Jun
              • Re: Guidelines for accepting contributions (Was: MySQL / SNMP)Stewart Smith22 Jun
            • Re: MySQL / SNMPMichel Stam22 Jun
              • Re: MySQL / SNMPStewart Smith23 Jun
                • Re: MySQL / SNMPMichel Stam23 Jun
                • Re: MySQL / SNMP (revised)Michel Stam23 Jun
                  • Re: MySQL / SNMP (revised)Michel Stam30 Jun
                    • Re: MySQL / SNMP (revised)Stewart Smith1 Jul
                      • Re: MySQL / SNMP (revised)Michel Stam5 Jul
                        • Re: MySQL / SNMP (revised)Stewart Smith5 Jul
                          • Re: MySQL / SNMP (revised)Michel Stam5 Jul
                            • Re: MySQL / SNMP (revised)Stewart Smith6 Jul
                              • Re: MySQL / SNMP (revised)Michel Stam6 Jul
Re: MySQL / SNMP (revised)Stewart Smith7 Jul
  • Re: MySQL / SNMP (revised)Michel Stam7 Jul
    • Re: MySQL / SNMP (revised)Michel Stam10 Jul
      • Re: MySQL / SNMP (revised)Michel Stam25 Jul
        • Re: MySQL / SNMP (revised)Stewart Smith28 Jul
          • Re: MySQL / SNMP (revised)Michel Stam28 Jul
            • Re: MySQL / SNMP (revised)Michel Stam15 Aug
              • Re: MySQL / SNMP (revised)Stewart Smith16 Aug
                • Re: MySQL / SNMP (revised)Michel Stam16 Aug
                  • Re: MySQL / SNMP (revised)Stewart Smith16 Aug
                    • Re: MySQL / SNMP (revised)Michel Stam16 Aug