mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Merge pull request #599 from driskell/feature/redis_graph_title_prefix
Add TITLE_PREFIX to redis_
This commit is contained in:
commit
7264ba7d09
1 changed files with 7 additions and 6 deletions
|
@ -40,6 +40,7 @@ use Switch;
|
|||
my $HOST = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1";
|
||||
my $PORT = exists $ENV{'port'} ? $ENV{'port'} : 6379;
|
||||
my $PASSWORD = exists $ENV{'password'} ? $ENV{'password'} : undef;
|
||||
my $TITLE_PREFIX = exists $ENV{'title_prefix'} ? $ENV{'title_prefix'} . ": " : "";
|
||||
|
||||
my $sock = &get_conn();
|
||||
my $config = ( defined $ARGV[0] and $ARGV[0] eq "config" );
|
||||
|
@ -75,7 +76,7 @@ switch ($0) {
|
|||
case "connected_clients" {
|
||||
if ( $config ) {
|
||||
my $maxclients= get_config("maxclients")->{"maxclients"};
|
||||
print "graph_title Connected clients\n";
|
||||
print "graph_title ${TITLE_PREFIX}Connected clients\n";
|
||||
print "graph_vlabel Connected clients\n";
|
||||
print "graph_category redis\n";
|
||||
print "graph_args -l 0\n";
|
||||
|
@ -90,7 +91,7 @@ switch ($0) {
|
|||
|
||||
case "keys_per_sec" {
|
||||
if ( $config ) {
|
||||
print "graph_title Keys Per Second\n";
|
||||
print "graph_title ${TITLE_PREFIX}Keys Per Second\n";
|
||||
print "graph_vlabel per \${graph_period}\n";
|
||||
print "graph_category redis\n";
|
||||
print "graph_args -l 0\n";
|
||||
|
@ -113,7 +114,7 @@ switch ($0) {
|
|||
|
||||
case "key_ratio" {
|
||||
if ( $config ) {
|
||||
print "graph_title Key Hit vs Miss Ratio\n";
|
||||
print "graph_title ${TITLE_PREFIX}Key Hit vs Miss Ratio\n";
|
||||
print "graph_vlabel per \${graph_period}\n";
|
||||
print "graph_category redis\n";
|
||||
print "graph_args -u 100 -l 0 -r --base 1000\n";
|
||||
|
@ -140,7 +141,7 @@ switch ($0) {
|
|||
|
||||
case "per_sec" {
|
||||
if ( $config ) {
|
||||
print "graph_title Per second\n";
|
||||
print "graph_title ${TITLE_PREFIX}Per second\n";
|
||||
print "graph_vlabel per \${graph_period}\n";
|
||||
print "graph_category redis\n";
|
||||
print "graph_args -l 0\n";
|
||||
|
@ -159,7 +160,7 @@ switch ($0) {
|
|||
case "used_memory" {
|
||||
if ( $config ) {
|
||||
my $maxmemory = get_config("maxmemory")->{"maxmemory"};
|
||||
print "graph_title Used memory\n";
|
||||
print "graph_title ${TITLE_PREFIX}Used memory\n";
|
||||
print "graph_vlabel Used memory\n";
|
||||
print "graph_category redis\n";
|
||||
print "graph_args -l 0 --base 1024\n";
|
||||
|
@ -184,7 +185,7 @@ switch ($0) {
|
|||
}
|
||||
|
||||
if ( $config ) {
|
||||
print "graph_title Used keys\n";
|
||||
print "graph_title ${TITLE_PREFIX}Used keys\n";
|
||||
print "graph_vlabel Used keys\n";
|
||||
print "graph_category redis\n";
|
||||
print "graph_args -l 0\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue