diff --git a/plugins/firebird/firebird b/plugins/firebird/firebird index b29a2246..74781a9b 100755 --- a/plugins/firebird/firebird +++ b/plugins/firebird/firebird @@ -1,7 +1,7 @@ #!/bin/bash # Wildcard-plugin to monitor Firebird database transaction stats. To monitor a -# database, link firebird_ to this file. E.g. -# ln -s /usr/share/munin/plugins/if_ /etc/munin/plugins/firebird_employee +# database, link firebird_ to this file. E.g. +# ln -s /usr/share/munin/plugins/firebird_ /etc/munin/plugins/firebird_employee # # ...will monitor firebird database "employee" # @@ -47,9 +47,11 @@ EOM exit 0;; esac -db=`echo $0 | awk -F'_' '{print $2}'` +db=${0/firebird_/} -/opt/firebird/bin/gstat -h ${db} | awk -F'[\t]+' \ +gstat=$(which gstat 2> /dev/null) + +${gstat:=/opt/firebird/bin/gstat} -h ${db} | awk -F'[\t]+' \ '{ sub(/^ */,""); if ($2 == "Oldest transaction") {