mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +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.category DEFAULTS_TO_system
|
||||
env.title OPTIONAL_TITLE
|
||||
env.logarithmic 1
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
|
@ -38,13 +39,19 @@ CATEGORY=${category:-system}
|
|||
FILES=${files:-/var/log/messages}
|
||||
FILES=$(echo $(ls $FILES))
|
||||
|
||||
|
||||
if [ "$1" = "config" ] ; then
|
||||
if [ ${logarithmic} = 1 ]; then
|
||||
graph_args="-o"
|
||||
else
|
||||
graph_args="-l 0"
|
||||
fi
|
||||
cat <<EOF
|
||||
graph_title ${TITLE}
|
||||
graph_args -l 0 --base 1000
|
||||
graph_args ${graph_args} --base 1000
|
||||
graph_category ${CATEGORY}
|
||||
graph_info This graph shows the length of ${FILES}
|
||||
graph_vlabel length (lines)"
|
||||
graph_vlabel length (lines)
|
||||
EOF
|
||||
|
||||
for F in $FILES; do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue