Révision 2e5609e3
Added support for mysqlconfig in plugin configuration file
| plugins/newznab/nn_ | ||
|---|---|---|
| 13 | 13 |
name like nn_<GRAPH> to this script. |
| 14 | 14 |
|
| 15 | 15 |
To get a graph over numbers of users use nn_users |
| 16 |
=head1 APPLICABLE SYSTEMS |
|
| 17 |
|
|
| 18 |
Any MySQL platform, tested by the author on MySQL 5.1.29 and 5.0.51 |
|
| 19 |
|
|
| 20 |
=head1 CONFIGURATION |
|
| 21 |
|
|
| 22 |
This script is used to generate data for several graphs. To generate |
|
| 23 |
data for one specific graph, you need to create a symbolic link with a |
|
| 24 |
name like nn_<GRAPH> to this script. |
|
| 25 |
|
|
| 26 |
connection parameters - use this in your plugin configuration file. |
|
| 27 |
|
|
| 28 |
[nn*] |
|
| 29 |
env.mysqlconnection DBI:mysql:<yourdatabase>;host=127.0.0.1;port=3306 |
|
| 30 |
env.mysqluser <user> |
|
| 31 |
env.mysqlpassword <password> |
|
| 32 |
|
|
| 33 |
|
|
| 34 |
=head1 DEPENDENCIES |
|
| 35 |
|
|
| 36 |
=over |
|
| 37 |
|
|
| 38 |
=item DBD::mysql |
|
| 39 |
|
|
| 40 |
=back |
|
| 41 |
|
|
| 42 |
=head1 THANKS |
|
| 43 |
A special thanks to Kjell-Magne Øierud for the mysql_ plugin in munin which |
|
| 44 |
gave me the inspiration and reusable code to create this plugin. |
|
| 16 | 45 |
|
| 17 | 46 |
=head1 LICENSE |
| 18 | 47 |
|
| ... | ... | |
| 46 | 75 |
#-- CONFIG --# |
| 47 | 76 |
|
| 48 | 77 |
my %config = ( |
| 49 |
'dsn' => $env{'mysqlconnection'} || 'dbi:mysql:newznab',
|
|
| 50 |
'user' => $env{'mysqluser'} || 'test',
|
|
| 51 |
'password' => $env{'mysqlpassword'} || 'test',
|
|
| 78 |
'dsn' => $ENV{'mysqlconnection'} || 'dbi:mysql:newznab',
|
|
| 79 |
'user' => $ENV{'mysqluser'} || 'test1',
|
|
| 80 |
'password' => $ENV{'mysqlpassword'} || 'test',
|
|
| 52 | 81 |
); |
| 53 | 82 |
|
| 54 | 83 |
my %defaults = ( |
Formats disponibles : Unified diff