No such file or directory when executing script in Check_MK
Posted: Fri Mar 09, 2018 4:40 am
Hi,
Im trying to execute a simple notification script but when check_km try to execute it give me the next error:
2018-03-09 11:00:19 Executing 1 notifications:
2018-03-09 11:00:19 * notifying Prueba via scriptPrueba, parameters: (no parameters), bulk: no
2018-03-09 11:00:19 executing /omd/sites/check_mk/local/share/check_mk/notifications/scriptPrueba
2018-03-09 11:00:19 ERROR: [Errno 2] No such file or directory
2018-03-09 11:00:19 Traceback (most recent call last):
File "/omd/sites/check_mk/share/check_mk/modules/notify.py", line 466, in notify_rulebased
call_notification_script(plugin, plugin_context)
File "/omd/sites/check_mk/share/check_mk/modules/notify.py", line 1169, in call_notification_script
stderr=subprocess.STDOUT, env=notification_script_env(plugin_context))
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I put the script here with the permisons: /omd/sites/check_mk/local/share/check_mk/notifications/
The script Im trying to execute is the example script placed on the check_mk page:
#!/bin/bash
# encoding: utf-8
# Prueba
env | grep NOTIFY_ | sort > $OMD_ROOT/tmp/foobar.out
echo "Successfully written $OMD_ROOT/tmp/foobar.out"
exit 0
Thanks
Im trying to execute a simple notification script but when check_km try to execute it give me the next error:
2018-03-09 11:00:19 Executing 1 notifications:
2018-03-09 11:00:19 * notifying Prueba via scriptPrueba, parameters: (no parameters), bulk: no
2018-03-09 11:00:19 executing /omd/sites/check_mk/local/share/check_mk/notifications/scriptPrueba
2018-03-09 11:00:19 ERROR: [Errno 2] No such file or directory
2018-03-09 11:00:19 Traceback (most recent call last):
File "/omd/sites/check_mk/share/check_mk/modules/notify.py", line 466, in notify_rulebased
call_notification_script(plugin, plugin_context)
File "/omd/sites/check_mk/share/check_mk/modules/notify.py", line 1169, in call_notification_script
stderr=subprocess.STDOUT, env=notification_script_env(plugin_context))
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I put the script here with the permisons: /omd/sites/check_mk/local/share/check_mk/notifications/
The script Im trying to execute is the example script placed on the check_mk page:
#!/bin/bash
# encoding: utf-8
# Prueba
env | grep NOTIFY_ | sort > $OMD_ROOT/tmp/foobar.out
echo "Successfully written $OMD_ROOT/tmp/foobar.out"
exit 0
Thanks