mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 10:28:36 +00:00
Merge pull request #992 from tsaavik/master
Added Redis replication backlog graph
This commit is contained in:
commit
428b58278b
1 changed files with 16 additions and 2 deletions
|
@ -59,7 +59,7 @@ if ( $autoconf ) {
|
|||
my $suggest = ( defined $ARGV[0] and $ARGV[0] eq "suggest" );
|
||||
if ( $suggest ) {
|
||||
if ( defined( $sock ) ) {
|
||||
my @plugins = ('connected_clients', 'key_ratio', 'keys_per_sec', 'per_sec', 'used_keys', 'used_memory');
|
||||
my @plugins = ('connected_clients', 'key_ratio', 'keys_per_sec', 'per_sec', 'repl_backlog_size', 'used_keys', 'used_memory');
|
||||
foreach my $plugin (@plugins) {
|
||||
print "$plugin\n";
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ switch ($0) {
|
|||
|
||||
case "per_sec" {
|
||||
if ( $config ) {
|
||||
print "graph_title ${TITLE_PREFIX}Per second\n";
|
||||
print "graph_title ${TITLE_PREFIX}Requests Per second\n";
|
||||
print "graph_vlabel per \${graph_period}\n";
|
||||
print "graph_category search\n";
|
||||
print "graph_args -l 0\n";
|
||||
|
@ -158,6 +158,20 @@ switch ($0) {
|
|||
print "connections.value ". $hash->{'total_connections_received'} ."\n";
|
||||
}
|
||||
|
||||
case "repl_backlog_size" {
|
||||
if ( $config ) {
|
||||
my $maxclients= get_config("maxclients")->{"maxclients"};
|
||||
print "graph_title ${TITLE_PREFIX}replication backlog\n";
|
||||
print "graph_vlabel replication backlog\n";
|
||||
print "graph_category search\n";
|
||||
print "graph_args -l 0\n";
|
||||
print "repl_backlog_size.label bytes behind master\n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
print "repl_backlog_size.value " . $hash->{'repl_backlog_size'} . "\n";
|
||||
}
|
||||
|
||||
|
||||
case "used_memory" {
|
||||
if ( $config ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue