Ad Widget

Collapse

Properly run daemon script as external check

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Virtul
    Junior Member
    • Jun 2011
    • 7

    #1

    Properly run daemon script as external check

    Hi! I'm trying to find workaround for 30 seconds for external scripts limitation by running my python script as daemon process, the script utilizes python-daemon module and is trivial:
    Code:
    import time
    import daemon
    
    if __name__ == '__main__':
        print "ok"
        with daemon.DaemonContext():
            time.sleep(31)
            print "done"
    however Zabbix (2.0.9) recieves only empty string from it.

    Why does it happen? Did anyone anything similar? Please share your experience.

    Thanks in advance!
Working...