monit not invoking python scripts
check file tsttempfile1 with path /temp/file1
if failed checksum then exec "/bin/sh -c ‘/temp/printargs.py -t "svc" -e "evnt" -b "descr"’"
[root@vm-almwebdev01 temp]# monit -V
This is Monit version 5.30.0
Comments (3)
-
-
reporter i added shebang line too, but after adding PATH variable to shell script, it worked for me.
By default, any process (crontab) which is invoking scripts passing a minimal set of environment variables to your scripts/jobs. To get around that, i set PATH variable at the top of the script after shebang line(interpretor). -
reporter - changed status to resolved
By default, any process (crontab) which is invoking scripts passes a minimal set of environment variables to your scripts/jobs. To get around that, just set your own PATH variable at the top of the script after shebang line(interpretor).
- Log in to comment
Hello Venkata,
any additional information about your python script?
Are you using a proper shebang in the python script, for example
#!/usr/bin/python
With regards,
Lutz