3
0
mirror of https://github.com/rvalitov/zabbix-php-fpm.git synced 2023-11-05 03:30:27 +01:00

[add] enrease Zabbix timeout

This commit is contained in:
Ramil Valitov 2020-07-07 16:09:55 +03:00
parent 06e53d2731
commit 9a4557501c
No known key found for this signature in database
GPG Key ID: 2AB186DABDFE1914

View File

@ -8,6 +8,7 @@ MAX_PORTS=3
MIN_PORT=9000 MIN_PORT=9000
TEST_SOCKET="" TEST_SOCKET=""
ONDEMAND_TIMEOUT=60 ONDEMAND_TIMEOUT=60
ZABBIX_TIMEOUT=10
function getUserParameters() { function getUserParameters() {
sudo find /etc/zabbix/ -name 'userparameter_php_fpm.conf' -type f | head -n1 sudo find /etc/zabbix/ -name 'userparameter_php_fpm.conf' -type f | head -n1
@ -171,6 +172,7 @@ oneTimeSetUp() {
#Configure Zabbix: #Configure Zabbix:
echo 'zabbix ALL=NOPASSWD: /etc/zabbix/zabbix_php_fpm_discovery.sh,/etc/zabbix/zabbix_php_fpm_status.sh' | sudo EDITOR='tee -a' visudo echo 'zabbix ALL=NOPASSWD: /etc/zabbix/zabbix_php_fpm_discovery.sh,/etc/zabbix/zabbix_php_fpm_status.sh' | sudo EDITOR='tee -a' visudo
sudo sed -i "s#.* Timeout=.*#Timeout = $ZABBIX_TIMEOUT#" "/etc/zabbix/zabbix_agentd.conf"
sudo service zabbix-agent restart sudo service zabbix-agent restart
echo "Setup PHP-FPM..." echo "Setup PHP-FPM..."
@ -357,7 +359,7 @@ testZabbixDiscoverDoubleRun() {
function discoverAllZabbix() { function discoverAllZabbix() {
DATA_OLD=$1 DATA_OLD=$1
DATA_COUNT=$2 DATA_COUNT=$2
MAX_CHECKS=50 MAX_CHECKS=150
if [[ -z $DATA_COUNT ]]; then if [[ -z $DATA_COUNT ]]; then
DATA_COUNT=0 DATA_COUNT=0