mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Added support for mysqlconfig in plugin configuration file
This commit is contained in:
parent
9171087314
commit
2e5609e325
@ -13,6 +13,35 @@ data for one specific graph, you need to create a symbolic link with a
|
||||
name like nn_<GRAPH> to this script.
|
||||
|
||||
To get a graph over numbers of users use nn_users
|
||||
=head1 APPLICABLE SYSTEMS
|
||||
|
||||
Any MySQL platform, tested by the author on MySQL 5.1.29 and 5.0.51
|
||||
|
||||
=head1 CONFIGURATION
|
||||
|
||||
This script is used to generate data for several graphs. To generate
|
||||
data for one specific graph, you need to create a symbolic link with a
|
||||
name like nn_<GRAPH> to this script.
|
||||
|
||||
connection parameters - use this in your plugin configuration file.
|
||||
|
||||
[nn*]
|
||||
env.mysqlconnection DBI:mysql:<yourdatabase>;host=127.0.0.1;port=3306
|
||||
env.mysqluser <user>
|
||||
env.mysqlpassword <password>
|
||||
|
||||
|
||||
=head1 DEPENDENCIES
|
||||
|
||||
=over
|
||||
|
||||
=item DBD::mysql
|
||||
|
||||
=back
|
||||
|
||||
=head1 THANKS
|
||||
A special thanks to Kjell-Magne Øierud for the mysql_ plugin in munin which
|
||||
gave me the inspiration and reusable code to create this plugin.
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
@ -46,9 +75,9 @@ use File::Basename;
|
||||
#-- CONFIG --#
|
||||
|
||||
my %config = (
|
||||
'dsn' => $env{'mysqlconnection'} || 'dbi:mysql:newznab',
|
||||
'user' => $env{'mysqluser'} || 'test',
|
||||
'password' => $env{'mysqlpassword'} || 'test',
|
||||
'dsn' => $ENV{'mysqlconnection'} || 'dbi:mysql:newznab',
|
||||
'user' => $ENV{'mysqluser'} || 'test1',
|
||||
'password' => $ENV{'mysqlpassword'} || 'test',
|
||||
);
|
||||
|
||||
my %defaults = (
|
||||
|
Loading…
Reference in New Issue
Block a user