mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
7e56247745
ceph -> fs added category for some plugins from "other" section
40 lines
975 B
Bash
Executable File
40 lines
975 B
Bash
Executable File
#!/usr/local/bin/bash
|
|
|
|
if [ "$1" = "config" ]; then
|
|
echo "graph_title Available Updates"
|
|
echo "graph_category security"
|
|
echo "graph_args --base 1000 -l 0"
|
|
echo "graph_vlabel upgradeable packages/ports "
|
|
echo "pkg.label binary packages"
|
|
echo "ports.label ports"
|
|
exit 0
|
|
fi
|
|
|
|
if [ "$1" = "autoconf" ]; then
|
|
echo "yes"
|
|
exit 0
|
|
fi
|
|
|
|
updates="$(freebsd-update fetch | \
|
|
grep -v 'Looking up update.FreeBSD.org mirrors' | \
|
|
grep -v 'Fetching metadata signature' | \
|
|
grep -v 'Fetching metadata index' | \
|
|
grep -v 'Inspecting system' | \
|
|
grep -v 'Preparing to download files' | \
|
|
grep -v -e '^$' | \
|
|
grep -v 'The following files will be added' | \
|
|
grep -v 'No updates needed' | \
|
|
grep -v 'The following files will be updated' | wc -l | sed -e 's/ //g' )"
|
|
|
|
updates="$(echo -n "${updates}")"
|
|
|
|
echo "pkg.value $updates"
|
|
|
|
|
|
updates="$(portversion | grep '<' | wc -l | sed -e 's/ //g')"
|
|
updates="$(echo -n "${updates}")"
|
|
|
|
echo "ports.value $updates"
|
|
|
|
exit 0
|