lesovsky / zabbix-extensions

Zabbix additional monitoring modules
BSD 3-Clause "New" or "Revised" License
316 stars 230 forks source link

pgsql.ping #7

Closed jangaraj closed 9 years ago

jangaraj commented 9 years ago

I found one issue with pgsql.ping command

echo -e "\\\timing \n select 1" | psql -qAtX $1 |grep Time |cut -d' ' -f2

Ubuntu, Zabbix 2.4.3, command is executed in sh, not bash by zabbix, so it has a problem with "-e" parameter; updated command:

echo "\\\timing \n select 1" | psql -qAtX $1 |grep Time |cut -d' ' -f2

Please test/update. Thx.

lesovsky commented 9 years ago

Yes, the sh shell in Ubuntu is dash. Its built-in echo doesn't have an -e option. Replaced it with /bin/echo instead.