Ad Widget

Collapse

UserParameter just run in client side

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tiagobaptista
    Junior Member
    • Jul 2015
    • 2

    #1

    UserParameter just run in client side

    Hello, how are you ?

    I need some help with a custom userparameter.

    I have this userparameter: UserParameter=bacula.check[*],php /etc/zabbix/zabbix_agentd.d/job_status.php $1 $2

    If I run this script on client side with this command: php /etc/zabbix/zabbix_agentd.d/job_status.php 25 2 the command returns OK

    But if I run this commando from zabbix server with the command: zabbix_get -s x.x.x.x -k bacula.check 25 2 the command don't return anything.

    In the zabbix_agentd.log I have this log: EXECUTE_STR() command:'php /etc/zabbix/zabbix_agentd.d/job_status.php ' len:177 cmd_result

    The data inputed on the zabbix_get command don't are running.

    Anyone could help me ?
  • aigars.kadikis
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2018
    • 208

    #2
    Hello! I'm OK, thanks.

    I would suggest to test the key on client side from zabbix agent perspektive:
    zabbix_agentd -t "bacula.check[25,2]"

    I think you missed syntax in zabbix_get command. Should be:
    zabbix_get -s x.x.x.x -k "bacula.check[25,2]"

    p.s.
    In order to proceed with successful zabbix_get testing you must restart zabbix agent to (re)load UserParameter keys.

    Comment

    Working...