I can't figure out how to setup one of these up for the life of me. I have a working script that creates its own output file in /tmp/. The help on the web and in the help docs for setting up a Script Monitor is fairly worthless and isn't specific at all. How can I get more help on this?
We have enclosed a sample script and its output in the attached zip. This script is with reference to our environment. When using the same, change the directory path and file names accordingly. Also, please note that this is a very simple script that just forces a key value pair into a output file.
Sample execution of the script in the linux goes like this,
sh sampleTest.sh This is the sample script
While configuring this in the Applications Manager, please do the following.
1. Display Name -> Some Name to be displayed
2. Script to Monitor -> /home/harikrishnan/supportlogs/sampleTest.sh
3. Directory from which the script should be executed -> /home/harikrishnan/supportlogs/
If some output file is present, please check the "Output Settings"
1. My script is a perl script. Is 'perl' a viable mode? If not, should it work if I setup a wrapper 'sh' script that will call the perl script? It didn't seem to work when I initially tried it.
2. So I don't need to put the script in CRON, ManageEngine will actually execute the script?
3. The script has a lot of STOUT and STDERR output that doesn't get written to the "Output File". Will this cause problems for ManageEngine? Is ManageEngine actually parsing the STDOUT/STDERR output from the script?
4. It would work better for me if ManageEngine would just monitor the output file. Then I could run the job via CRON and ME would just have to look at the data. Is there a way to do this?
1. Yes. 'perl' is a valid mode. Also you can execute the perl script within a \'sh'\ script. In this case, try executing the 'sh' script before configuring in the Applications Manager.
2. Yes. Applications Manager will execute the script as per the polling interval.
3. No. Applications Manager will not worry about the way the script is written. It just needs a script to be executed and some output file to be parsed. So, you had to specify the attribute names that should be monitored by Applications Manager in the "New Monitor" configuration.
4. Yes. There is a way to do this. Just give some dummy script as the "Script to be monitored" to the Applications Manager. But give the exact "output file" that will be generated by your CRON job. So, now ,you are simply executing some dummy file using the Applications Manager and then parsing the correct output file.
According to the output of the stdout.txt file, Appmanager tries to execute any script you put in there as 'sh script' so it won't run a perl script, as i came to find out after 2 days of working on it... you have to use a shell script to call it. OpManager on the other hand will execute perl if you add it as a system command. also, can we get the text input box for the program to execute on appmanager to be something like 200 characters instead of 100? that doens't really give you enough room to do all of your command line options & script name & separaters for parsing.. thanks,
In windows operating system we can run only scripts present locally in the Applications Manager host.I think you are trying to execute application.vbs script present in the remote server abctw0456 D:\ApplicationLists\ location. Currently it is not possible configure this in Applications Manager.You can try to run scripts present locally in the Applications Manager host server only.