root/src/modules/mysql.xml

Revision 644a39f2b16d4123980672227c37632008c01012, 2.0 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 6 years ago)

MySQL from Dave Gray with some cleanup, refs #10

  • Property mode set to 100644
Line 
1 <module>
2   <name>mysql</name>
3   <description><para>The mysql module allows queries to be performaed against targets as checks.  The results of the query are used as metrics.</para>
4   </description>
5   <loader>C</loader>
6   <image>mysql.so</image>
7   <moduleconfig />
8   <checkconfig>
9     <parameter name="dsn"
10                required="required"
11                allowed=".+">The connect string for MySQL.  The syntax of this string is explained in the PostgreSQL documentation. See <ulink url="http://www.postgresql.org/docs/8.3/static/libpq-connect.html"><citetitle>Database Connection Control Functions</citetitle></ulink>. The MySQL-specific behavior is explained in the <ulink url="http://dev.mysql.com/doc/refman/4.1/en/mysql-real-connect.html"><citetitle>mysql_real_connect</citetitle></ulink> documentation.</parameter>
12     <parameter name="sql"
13                required="required"
14                allowed=".+">The query that will be executed.</parameter>
15   </checkconfig>
16   <examples>
17     <example>
18       <title>Tracking MySQL database sizes.</title>
19       <para>This will track the sizes of all databases on 10.225.209.35 and 10.225.209.56. We will connect to the mysql database as the user "noit" with password "noit." We only run this check every 5 minutes.</para>
20       <programlisting><![CDATA[
21       <noit>
22         <modules>
23           <module image="mysql" name="mysql"/>
24         </modules>
25         <checks>
26           <databases>
27             <mysql module="mysql" period="300000">
28               <config>
29                 <dsn>host=%[target] dbname=%[name] user=noit password=noit</dsn>
30                 <sql>select table_schema "dbname", sum( data_length + index_length ) "size" from information_schema.tables group by table_schema</sql>
31               </config>
32               <check uuid="8c5ca46c-77d7-11dd-ab5b-53bc639517d6" target="10.225.209.35"/>
33               <check uuid="90b8aea2-77d7-11dd-8447-0f281e6a48eb" target="10.225.209.56"/>
34             </mysql>
35           </databases>
36         </checks>
37       </noit>
38     ]]></programlisting>
39     </example>
40   </examples>
41 </module>
Note: See TracBrowser for help on using the browser.