mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
add new option 'env.stack_usage' to lxc_ram
* draw memory usages of containers as stacked area charts * the type of other graphs are not changed (default -> LINE2)
This commit is contained in:
parent
893c3face8
commit
5dc3787f00
@ -12,10 +12,18 @@ lxc_ram - Plugin to monitor LXC memory usage.
|
||||
[lxc_*]
|
||||
user root
|
||||
|
||||
[lxc_ram]
|
||||
env.stack_usage true
|
||||
|
||||
=head1 INTERPRETATION
|
||||
|
||||
This plugin needs root privilege.
|
||||
|
||||
If env.stack_usage is set to true, all memory usages of containers will be
|
||||
drawn as stacked area charts.
|
||||
This option changes graph order, all of 'Mem usage' comes first and then others.
|
||||
(default: empty)
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
vajtsz vajtsz@gmail.com
|
||||
@ -62,13 +70,24 @@ if [ "$1" = "config" ]; then
|
||||
echo 'graph_vlabel byte'
|
||||
echo 'graph_category memory'
|
||||
|
||||
if [ "$stack_usage" = "true" ]; then
|
||||
for guest_name in $guest_names; do
|
||||
guest="$(clean_fieldname $guest_name)"
|
||||
|
||||
echo 'mem_usage_'$guest'.label '$guest_name': Mem usage'
|
||||
echo 'mem_usage_'$guest'.type GAUGE'
|
||||
echo 'mem_usage_'$guest'.draw AREASTACK'
|
||||
done
|
||||
fi
|
||||
|
||||
for guest_name in $guest_names;
|
||||
do
|
||||
guest="$(clean_fieldname $guest_name)"
|
||||
|
||||
echo 'mem_usage_'$guest'.label '$guest_name': Mem usage'
|
||||
echo 'mem_usage_'$guest'.type GAUGE'
|
||||
if [ "$stack_usage" != "true" ]; then
|
||||
echo 'mem_usage_'$guest'.label '$guest_name': Mem usage'
|
||||
echo 'mem_usage_'$guest'.type GAUGE'
|
||||
fi
|
||||
echo 'mem_cache_'$guest'.label '$guest_name': Cache'
|
||||
echo 'mem_cache_'$guest'.type GAUGE'
|
||||
echo 'mem_active_'$guest'.label '$guest_name': Active'
|
||||
|
Loading…
Reference in New Issue
Block a user