mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Fixed firebird plugin:
* Use gstat from path if available; fall back to /opt/firebird/bin/gstat if gstat could not be found * Use bash to strip of firebird_ prefix from name * Fixed description
This commit is contained in:
parent
341798cdc3
commit
66c38543c7
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Wildcard-plugin to monitor Firebird database transaction stats. To monitor a
|
# Wildcard-plugin to monitor Firebird database transaction stats. To monitor a
|
||||||
# database, link firebird_<interface> to this file. E.g.
|
# database, link firebird_<db> to this file. E.g.
|
||||||
# ln -s /usr/share/munin/plugins/if_ /etc/munin/plugins/firebird_employee
|
# ln -s /usr/share/munin/plugins/firebird_ /etc/munin/plugins/firebird_employee
|
||||||
#
|
#
|
||||||
# ...will monitor firebird database "employee"
|
# ...will monitor firebird database "employee"
|
||||||
#
|
#
|
||||||
@ -47,9 +47,11 @@ EOM
|
|||||||
exit 0;;
|
exit 0;;
|
||||||
esac
|
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(/^ */,"");
|
'{ sub(/^ */,"");
|
||||||
if ($2 == "Oldest transaction")
|
if ($2 == "Oldest transaction")
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user