mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
[file_length_] Add logarithmic option
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
This commit is contained in:
parent
c3d5e109c0
commit
09d86946f1
1 changed files with 9 additions and 2 deletions
|
@ -14,6 +14,7 @@ Useful for things such as lists (white, black, user, ...).
|
||||||
env.files FILEPATHGLOB1 FILEPATHGLOB2 ...
|
env.files FILEPATHGLOB1 FILEPATHGLOB2 ...
|
||||||
env.category DEFAULTS_TO_system
|
env.category DEFAULTS_TO_system
|
||||||
env.title OPTIONAL_TITLE
|
env.title OPTIONAL_TITLE
|
||||||
|
env.logarithmic 1
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
@ -38,13 +39,19 @@ CATEGORY=${category:-system}
|
||||||
FILES=${files:-/var/log/messages}
|
FILES=${files:-/var/log/messages}
|
||||||
FILES=$(echo $(ls $FILES))
|
FILES=$(echo $(ls $FILES))
|
||||||
|
|
||||||
|
|
||||||
if [ "$1" = "config" ] ; then
|
if [ "$1" = "config" ] ; then
|
||||||
|
if [ ${logarithmic} = 1 ]; then
|
||||||
|
graph_args="-o"
|
||||||
|
else
|
||||||
|
graph_args="-l 0"
|
||||||
|
fi
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
graph_title ${TITLE}
|
graph_title ${TITLE}
|
||||||
graph_args -l 0 --base 1000
|
graph_args ${graph_args} --base 1000
|
||||||
graph_category ${CATEGORY}
|
graph_category ${CATEGORY}
|
||||||
graph_info This graph shows the length of ${FILES}
|
graph_info This graph shows the length of ${FILES}
|
||||||
graph_vlabel length (lines)"
|
graph_vlabel length (lines)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
for F in $FILES; do
|
for F in $FILES; do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue