Skip to content
Snippets Groups Projects
Commit 4e480d92 authored by Seblu's avatar Seblu
Browse files

Add munin plugins

2 plugins:
- Supervise packages (count, updatable, local, unused)
- Supervice pacfiles (pacsave, pacorig, pacnew)

Moved from a long scp tradition :/
parent 0a4fd742
No related branches found
No related tags found
No related merge requests found
......@@ -11,12 +11,14 @@ depends=('python' 'bash')
package() {
cd "$startdir"
install -dm755 "$pkgdir"/usr/{share/licenses/$pkgname,bin}
install -dm755 "$pkgdir"/usr/{share/licenses/$pkgname,bin,lib/munin/plugins}
# install legal stuff
install -m644 COPYRIGHT LICENSE "$pkgdir/usr/share/licenses/$pkgname"
# install binaries
install -m755 atc aurdown go2chroot addpkg sign archbuild-dl pkgbuild2json \
tmpmakepkg reinstallpkgs checkservices "$pkgdir/usr/bin"
# install munin stuff
install -m755 archlinux-{pacfiles,packages} "$pkgdir/usr/lib/munin/plugins"
}
# vim:set ts=2 sw=2 et:
#!/bin/bash
# (c) 2013 Sebastien Luttringer
if [ "$1" = "config" ]; then
echo "graph_title Archlinux Pacman Files"
echo 'graph_category archlinux'
echo "pacsave.label .save files count"
echo "pacorig.label .orig files count"
echo "pacnew.label .new files count"
exit 0
fi
out="$(find /etc -xdev \( -name \*.pacnew -o -name \*.pacorig -o -name \*.pacsave \) 2>/dev/null)"
echo pacsave.value $(find /etc -xdev -name \*.pacsave 2>/dev/null|wc -l)
echo pacorig.value $(find /etc -xdev -name \*.pacorig 2>/dev/null|wc -l)
echo pacnew.value $(find /etc -xdev -name \*.pacnew 2>/dev/null|wc -l)
#!/bin/bash
# (c) 2013 Sebastien Luttringer
if [ "$1" = "config" ]; then
echo "graph_title Archlinux Packages"
echo 'graph_category archlinux'
echo "total.label Total"
echo "local.label Local"
echo "unused.label Unused"
echo "updatable.label Updatable"
exit 0
fi
echo total.value $(pacman -Qq|wc -l)
echo local.value $(pacman -Qqm|wc -l)
echo unused.value $(pacman -Qqdt|wc -l)
echo updatable.value $(( $(pacman -Squp|wc -l) - 1))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment