Forum Discussion
23 hours ago, Stuart Weenig said:Welcome to LM!
You're on the right track with the EventSource, but you'll want to make it a scripted EventSource. Normally, this would be done in Groovy, but you can do it in any language, provided the Collector can execute it from the command line. More information here and here. Essentially, you will need to modify your script to match the output format that LogicMonitor expects. That part should be pretty trivial.
When building the EventSource, you'll need to choose the "Script Event" Type and select "Upload Script file". You'll upload your script to LM, which will cause it to be pushed to any collector executing this task. The "Windows Script" field will point to powershell.exe (use the full path). Your uploaded script will be found in the lib subdirectory of the LogicMonitor program directory. So in the "Parameters" field, you'll point to your script (i.e. "C:\Program Files\logicmonitor\lib\adlockout.ps1". When the task is run, the two are concatenated onto the command line. Command calls powershell who runs the PS1 script. As long as your output syntax is correct, it should generate one alert for each entry in your output.
Thank you for your response Stuart. So when I go to EventSource and click add, I don't see the option "Script Event". Am I looking in the wrong spot?
Related Content
- 5 months ago
- 12 months ago
- 7 months ago