Ad Widget

Collapse

zabbix not execute commands

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mixmox
    Member
    • Apr 2020
    • 54

    #1

    zabbix not execute commands

    hello
    ive enable remot command on agent
    checking log file seems zabbix run command successfully::

    29639:20220217:202721.151 Executing command 'python /etc/zabbix/scripts/generate.py'

    but nothing happen, seems script run but cant do anything, also running command on agent is working fine.
    any idea?
  • mdudka
    Junior Member
    • Nov 2020
    • 7

    #2
    If you run you command into the linux Shell, Dose anything happen? Also for troubleshooting with my scripts I would write to a txt file within the python script and use it as my log.
    Code:
    import sys
    from datetime import datetime
    f = open("/etc/zabbix/scripts/PythonLog.txt", "a")
    f.write(datetime.now()+'\n')
    Which you can write some print statements which you might use for troubleshooting.

    Comment

    • mixmox
      Member
      • Apr 2020
      • 54

      #3
      Originally posted by mdudka
      If you run you command into the linux Shell, Dose anything happen? Also for troubleshooting with my scripts I would write to a txt file within the python script and use it as my log.
      Code:
      import sys
      from datetime import datetime
      f = open("/etc/zabbix/scripts/PythonLog.txt", "a")
      f.write(datetime.now()+'\n')
      Which you can write some print statements which you might use for troubleshooting.
      python script can execute withput any problem on agent but zabbix cant run it,
      ive check my zabbix server configuration several times toopython script can execute withput any problem on agent but zabbix cant run it,
      ive check my zabbix server configuration several times too

      nothing logged !

      Comment

      Working...