1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

areastack option

This commit is contained in:
Marc SCHAEFER 2019-08-11 11:02:35 +02:00 committed by Lars Kruse
parent 5105020fcf
commit 50a998b460

View file

@ -12,10 +12,18 @@ lxc_ram - Plugin to monitor LXC memory usage.
[lxc_*] [lxc_*]
user root user root
[lxc_ram]
env.areastack true
=head1 INTERPRETATION =head1 INTERPRETATION
This plugin needs root privilege. This plugin needs root privilege.
If env.areastack 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: false)
=head1 AUTHOR =head1 AUTHOR
vajtsz vajtsz@gmail.com vajtsz vajtsz@gmail.com
@ -40,6 +48,9 @@ or GPLv3 license, at your option
active_guests=$(active_guests) active_guests=$(active_guests)
# configurable: true/false
areastack=${areastack:-false}
if [ "$1" = "autoconf" ]; then if [ "$1" = "autoconf" ]; then
lxc_autoconf lxc_autoconf
fi fi
@ -58,6 +69,12 @@ EOF
cat <<EOF cat <<EOF
mem_usage_${g}.label ${n}: Mem usage mem_usage_${g}.label ${n}: Mem usage
mem_usage_${g}.type GAUGE mem_usage_${g}.type GAUGE
<<EOF
if [ "$areastack" = "true" ]; then
echo "mem_usage_${g}.draw AREASTACK"
fi
cat <<EOF
mem_cache_${g}.label ${n}: Cache mem_cache_${g}.label ${n}: Cache
mem_cache_${g}.type GAUGE mem_cache_${g}.type GAUGE
mem_active_${g}.label ${n}: Active mem_active_${g}.label ${n}: Active