Closed FL0od13 closed 4 years ago
Thank you very much! I hope I will soon try out myself the Zabbix 5 #33 and will make the required updates.
I believe the sudo
part of your comments are related to #32 and it was fixed in the latest release. Now the userparameter_php_fpm.conf
file contains the sudo
word in them by default, so no need to edit this file anymore. Your part of code:
zabbix ALL = NOPASSWD: /etc/zabbix/zabbix_php_fpm_discovery.sh
zabbix ALL = NOPASSWD: /etc/zabbix/zabbix_php_fpm_status.sh
I changed to:
zabbix ALL = NOPASSWD: /etc/zabbix/zabbix_php_fpm_discovery.sh,/etc/zabbix/zabbix_php_fpm_status.sh
This syntax should be valid, can you please confirm that it works in your case?
There was a typo in syntax for zabbix_get
, thank you for finding this, Wiki fixed.
P.S. I also tested template with Zabbix 5.0.1 and it works.
>>This syntax should be valid, can you please confirm that it works in your case?
Yes, this syntax also works.
Thank you!
Great, thank you! I'm closing this issue then.
Hi! I installed your solution on Zabbix 5.0.1 It's works, but wiki needs corrections.
1) Installation 1.3.2
_Add the following line to this file: zabbix ALL = NOPASSWD: /etc/zabbix/zabbix_php_fpmdiscovery.sh
Replace for:
_Add the following lines to this file: zabbix ALL = NOPASSWD: /etc/zabbix/zabbix_php_fpm_discovery.sh zabbix ALL = NOPASSWD: /etc/zabbix/zabbix_php_fpmstatus.sh
And
_Now edit the file /etc/zabbix/zabbix_agentd.d/userparameter_php_fpm.conf. Find the line: UserParameter=php-fpm.discover[],/etc/zabbix/zabbix_php_fpm_discovery.sh $1 Add sudo there, so the line should be: UserParameter=php-fpm.discover[],sudo /etc/zabbix/zabbix_php_fpmdiscovery.sh $1
Replace for:
_Now edit the file /etc/zabbix/zabbix_agentd.d/userparameter_php_fpm.conf. Find the lines: UserParameter=php-fpm.discover[],/etc/zabbix/zabbix_php_fpm_discovery.sh $1 UserParameter=php-fpm.status[],/etc/zabbix/zabbix_php_fpm_status.sh $1 $2 Add sudo there, so the lines should be: UserParameter=php-fpm.discover[],sudo /etc/zabbix/zabbix_php_fpm_discovery.sh $1 UserParameter=php-fpm.status[],sudo /etc/zabbix/zabbix_php_fpmstatus.sh $1 $2
2) Testing 2.2
_Command syntax: zabbix_get -s ZABBIX_HOST_IP -p ZABBIX_HOST_PORT -k php-fpm.discover.status["POOL_URL","POOLPATH"]
Replace for:
_Command syntax: zabbix_get -s ZABBIX_HOST_IP -p ZABBIX_HOST_PORT -k php-fpm.status["POOL_URL","POOLPATH"]
Thank you!