Change attribute separator in HAproxy monitoring
Rework HAproxy monitoring so the item's parameters gets properly separated using commas, allowing to use dots in parameter name. Closes-bug: 1525713 Change-Id: I912ec25c34e52b0917715b271e198c4fd9f331fe
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -34,12 +34,9 @@ case $1 in
|
||||
;;
|
||||
"-v")
|
||||
OPER='value'
|
||||
IFS=$'.'
|
||||
QA=($2)
|
||||
unset IFS
|
||||
HAPX=${QA[0]}
|
||||
HASV=${QA[1]}
|
||||
ITEM=${QA[2]}
|
||||
HAPX=$2
|
||||
HASV=$3
|
||||
ITEM=$4
|
||||
FESQ="grep ^${HAPX},${HASV},"
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -29,19 +29,19 @@ class plugin_zabbix::monitoring::haproxy_mon {
|
||||
command => '/etc/zabbix/scripts/haproxy.sh -b';
|
||||
'haproxy.be':
|
||||
key => 'haproxy.be[*]',
|
||||
command => '/etc/zabbix/scripts/haproxy.sh -v $1';
|
||||
command => '/etc/zabbix/scripts/haproxy.sh -v $1 $2 $3';
|
||||
'haproxy.fe.discovery':
|
||||
key => 'haproxy.fe.discovery',
|
||||
command => '/etc/zabbix/scripts/haproxy.sh -f';
|
||||
'haproxy.fe':
|
||||
key => 'haproxy.fe[*]',
|
||||
command => '/etc/zabbix/scripts/haproxy.sh -v $1';
|
||||
command => '/etc/zabbix/scripts/haproxy.sh -v $1 $2 $3';
|
||||
'haproxy.sv.discovery':
|
||||
key => 'haproxy.sv.discovery',
|
||||
command => '/etc/zabbix/scripts/haproxy.sh -s';
|
||||
'haproxy.sv':
|
||||
key => 'haproxy.sv[*]',
|
||||
command => '/etc/zabbix/scripts/haproxy.sh -v $1';
|
||||
command => '/etc/zabbix/scripts/haproxy.sh -v $1 $2 $3';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user