顯示頁面舊版反向連結Fold/unfold all回到頁頂 本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得它不應被鎖上,請詢問管理員。 ====== pgbouncer 納入 Zabbix 監控 ====== ===== @pgbouncer Server 設定程序 ===== * 新增 connection.pl <code sh> vi /usr/local/bin/connection.pl </code><file> #!/usr/bin/perl # Date : 19:44 2015/10/5 # Author : Jonathan Tsai <tryweb@ichiayi.com> # Desc : Get connection# for Zabbix $chkport=!defined($ARGV[0])?"5432":$ARGV[0]; $mrtgline1 = `netstat -n | grep ":$chkport "| wc -l|awk '{print\$1 - 1}'`; print($mrtgline1); </file><code sh> chmod a+x /usr/local/bin/connection.pl </code> * 新增 UserParameters_pgbouncer_connection <code sh> vi /etc/zabbix/zabbix_agentd.d/UserParameters_pgbouncer_connection </code><file> UserParameter=PgBouncer.Connection[*],/usr/local/bin/connection.pl $1 </file><code sh> service zabbix-agent restart </code> ==== @Zabbix Server 設定程序 ===== * 將 zbx_pgbouncer_templates.xml 匯入至 Zabbix Server → Configuration → Templates → Import <file> </file> ===== 參考網址 ===== * https://github.com/lesovsky/zabbix-extensions/tree/master/files/pgbouncer {{tag>pgbouncer zabbix}} tech/zabbix/pgbouncer.txt 上一次變更: 2015/10/05 20:14由 jonathan