Navigation: Monitoring with EventSentry > System Health Monitoring > Application Scheduler |
You can schedule to run any command-line application from within EventSentry for custom system monitoring. For example, you can use executable files, Perl, Visual Basic Script and other scripting languages to monitor virtually anything.
The application scheduler allows you to not only schedule applications at a set date and time, but also to run applications continuously every X minutes.
Additionally, EventSentry can also log the output of the application to the event log with a dynamic severity (information or error). See Event Logs for all possible event log records logged by this feature.
Embedded Scripts The application scheduler can either launch existing scripts that are present on the host, or launch an embedded script.
Scheduling an application to run at set date/time To schedule an application to run at a preset date and time, for example every day at 3pm, click the plus button next to the schedule list. You will be presented with the following dialog:
Set the Schedule Type to "Regular Schedule", and in the Date & Time area schedule the application to either run on certain weekdays, on certain days of the month or both. The Process Timeout feature allows you to terminate a process if it runs longer than X minutes.
Specify the file to be executed in the Filename field. You can either specify or select an existing script with the "Browse" button, or select an embedded script with the drop-down menu. Embedded scripts are specified with the @ symbol in front of the file, as shown in the screenshot above.
When Terminate child processes is checked, then all child processes that have been launched by Filename will be terminated recursively.
Scheduling an application to run periodically To schedule an application to run continuously, for example every 5 minutes, click the plus button next to the schedule list. You will be presented with the following dialog:
Set the Schedule Type to "Recurring Schedule" and configure the Recurring Schedule accordingly. You can further restrict the schedule and only have the application run during certain time period, for example between 8AM and 5PM.
Changing an Existing Schedule You can change existing schedules by double-clicking on the entries in the schedule list.
Application Return Codes If you want to take advantage of the return code analysis then it is recommend that you either call executable applications directly (e.g. ping.exe) or invoke scripts using a scripting engine that let you specify the return code (e.g. VBScript using cscript.exe). It is not recommended that you use batch files if the application return code is of significance.
If you check the "Log application return code 0 to event log", then EventSentry will log an information event showing the text output of the script you ran to the Application event log.
If you check the "Log application return code > 0 to event log", then EventSentry will log an error event showing the text output of the script you ran to the Application event log.
The next chapter, "Example Scripts", lists Visual Basic scripts that would work well with the Application Scheduler feature.
|