[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.3 Plugin Configuration

When creating a plugin, an appropriately named ‘.cnf’ file should be placed in ‘/etc/emt.d/’. These files need to define the fields to be gathered in an [emt_gather] section as well as any plugin-specific values in a [plugin_name] section. For example, the ‘emt_mysql.cnf’ file contains:

[emt_mysql]
host=:/home/ebergen/mysql/mysql-5.0.51a/mysql.sock
user=root
password=

[emt_gather]
field=mysql_bytes_received
field=mysql_bytes_sent
field=mysql_com
field=mysql_open_tables
field=mysql_opened_tables
field=mysql_threads_connected

The [emt_mysql] section values are passed into the config property of the command object for emt_mysql. The [emt_gather] section needs to be a part of every plugin configuration file, as it defines the active fields to gather. This will likely change before the first release, as it's duplicated in the plugin's PHP code, and doesn't support named command instances very well.