Anonymous_User Absent Member.
Absent Member.
489 views

SLM 1.2 - Trouble executing a script action


Hello everyone,

I have been having trouble trying to execute an action script in SLM.
When I query for events, I want to send the search results to a Python
script to process the data. Just for testing, I created a script which
just opens a file and writes down everything I send to him. It works
fine when executing it from the command line, but apparently never gets
executed when selected as an action in SLM web interface. Can't seem to
find any relevant logs either, so I am not sure how to troubleshoot it.
Can anyone offer help?

Thanks!
Jean-Paul


--
Jean-Paul_GM
------------------------------------------------------------------------
Jean-Paul_GM's Profile: http://forums.novell.com/member.php?userid=12809
View this thread: http://forums.novell.com/showthread.php?t=452443

0 Likes
4 Replies
Anonymous_User Absent Member.
Absent Member.

Re: SLM 1.2 - Trouble executing a script action

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Be sure you have followed the documentation and met the script
requirements as mentioned in the documentation:

http://www.novell.com/documentation/novelllogmanager12/log_manager_admin/data/bgt27de.html#bl97n7t

Specifically, marked as executable for the 'novell' (or whatever the
service is using) user somehow, in the correct directory, etc.

I'd expect for the logs to show calls to this script.

Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPQsqrAAoJEF+XTK08PnB5ADEQAIY50+zLG5ryM8BsU6V/din4
6e9tD+HYcLLfY77Yq+mgs9UeNwmKbA9m4MyTLeCnjoNgvv1ZouNfCrl1aSOLv5YM
U8sMt5rJZ7lg00xMiRdg+Y6Z6N0cZoUsuTyeBAFUr8PBXEDk+1hXYKG8VFhRQ6Qd
dxuYtUVEiJyQT1EzVB36oboOEcoiGI+WLrPDHuDgMxp0wGMbepNFYkHI2eAfGa5Q
6XQbA1dD96kkaXVOfRtBpbBAwTKvwSHzApIHxHQlkr315ckuizYZX+5g7p8NBKAy
FzyNLa3JvA67EtXswYzXc8SAUKti0lM6ED592oMBQXEA64uN08+goCSUvvQMXR9+
wmnNDn3hfudFPWC9OQZQlNhEkf1Uk9X76BzM6nGpU2R7KE/ONmVhHVJyrESFVutv
JmFRdhztQLpw46G0ljbyN3adg0yfy8DXoiZvcAMR65qilW03fIybKi8CO3ZOcmln
iDPcs6cPF3Cv3Z1tuNjoo1FBSdgd2bOlGVXGQzoIKXHJSBPoEGSvAU1qS/bsSjhI
dg1oUMniTGkCVsDAhMdX+M6Y/JAw6goE3UjynlSjrMzPHbAoMhKMytS38imjiFsr
aIw6vpHs1sm9yMHmDL9SY62zKhmOPSAMLNqzD7ZVT1R2TDKt1WD4ivt+NXfBvzXe
O2kzj5/o6qku4tIWmbAy
=NkAp
-----END PGP SIGNATURE-----
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: SLM 1.2 - Trouble executing a script action


Definitely. Configured the owner of the file to be the novell user and
gave execution permissions. I even tested it using the novell user
before trying to to execute it as an action script.

I also added a line which would ALWAYS create a file with one line to
know that the script was called. But every time I try to execute it
through Sentinel web interface ("Send to" button), nothing happens. 😞
Any ideas?


Here is the script. It's pretty simple, it just outputs whatever is
given to it out into a file:

#!/usr/bin/python
import sys

file = open('/tmp/output.txt','w')
file.write('I have been called\n') #this line always executes
while sys.argv:
file.write(sys.argv.pop())

file.close()


--
Jean-Paul_GM
------------------------------------------------------------------------
Jean-Paul_GM's Profile: http://forums.novell.com/member.php?userid=12809
View this thread: http://forums.novell.com/showthread.php?t=452443

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: SLM 1.2 - Trouble executing a script action

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well I created a script in /tmp/ called test.sh as 'novell', made it
executable for that user, and all is working well for me. My system is
using a bash script but I do not see how that should matter. Care to
try that for fun? Also, does the 'Test' option in the action
configuration return properly?

Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPRTKbAAoJEF+XTK08PnB5Y1gP/3du3JREJR6ABifEJRpH3hMj
5OKiSqbiJkaqR/MRzTe09hP7ds04qsZ4sQDS767hbcNDmI4CxSqtmeyies2cMiU3
9ApS/nqGHlFMfcW6Uf/REpEzCHvsH6TxW+g27qJ7HHoueW6tclHU+POVH7FPJx6w
a2x7jsfWQDNxoEl8E8ukbWFic/oRXmw3ZVqZedKisOuABUHhTibQMMNOfBNGUIQ1
QY2KYT04gD34jWEP4yYk91ha6VdrUl7w4j+jeK0/rXPXDqcMPCZR/9EnhcEuncMi
wJ5La7Pzs2TdKO3N/EXiFe1419asVU4W1KjIgZWVVdWxSEtsxmBufAkl6hCnQAfX
/MPf1O9qz1x+8g1nTcLUUTWoUjlIAwXVc5rFMXkTq/z34wYGLlZfKI4PfRVj6UtQ
d3n6xwO5VSBfnn4EP30qfhLfuJp4/NgV6tn0h+li5OAmn4irukT5DQ5CPmNue7rb
t4jIEjGyTUXHnnpK/ewkQyh1C0idjVxcUGeFf2Op9R499tIcUhQppWGWkIngFT3t
W5UxC6vLBw0f1YZKeFM9/sjGfERIkpYF73/A9ueETg14rpe26ApCffNCyv7PcPwP
53lmxPowZl/nRbrg6w9VdklBrGvLe80OG76ya699OJfAFjJhcu8Wpp7yAlr/Pfx3
zPhLkddGFehB4SUxLeBu
=tLkd
-----END PGP SIGNATURE-----
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: SLM 1.2 - Trouble executing a script action

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Your script, in /tmp, works on my system if marked executable, etc.

Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPRTNkAAoJEF+XTK08PnB5GG0P/AwOsiGobHPisFsazgJh4JWQ
AyJB1p8tTpwAH3fifvkUBmpUp2ZN7fxYRb+XLkwU5BeOo7DW7P96xK9YYJDxrMd2
I7cyf/iypjh3zjIXhXjI68vL3DzqudqAj/O0GTc9d1Gj36FBig65nyITAeOC/wwc
qtwYHH8XgsDVJ3d34Bg3P8RgTriP0MVk286CfnwYCRpD+8+Lqq5fzv8zJwNZMo/h
UKtlJME+j/H8YlB4jT0P9meZPeKfTrc/9KKaga8KheF5IzdPMRu6GNDspCM8Raxo
ULkz/5ruNpMFC+zu5Jo6thojxu6F1psA3tUEotRsFXYO6+ZbNkv2s5//hfsxF2X1
WqIVgTBaOSns80VbY30lkmATxEf2rk8mAlOv+X3sMRbMPyjVpFt3HPWK0/q/1P0Z
vaB8yOUQbyGELaYwKC3whUUtjAoKeyaCNlJHNT5rmBFezjo+9jR5XVNlBcbhUaN/
ayRLpz7NCl+pyk2ZkoKTSSnsfCZDPHwTOY/V3nHl3yVPMh2V+mDOGetTfvgf59Q2
Zh1BKkIuJOSagWqc/oQHLlOEnDwIavRtYpTTc1sI/f7BdSf56N16F0HYP7aR6wqd
lkpOjBEfcyE8oU6kjlX42gOYWC8kEzT9EX12JgZhCFBgnWltQonorPYzSDaBTyjh
FEGiLQEjuturEKQFO7eW
=nle1
-----END PGP SIGNATURE-----
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.