Join fellow LogicMonitor users at the Elevate Community Conference and get hands-on with our latest product innovations.

Register Now

Resources

Explore our blogs, guides, case studies, eBooks, and more actionable insights to enhance your IT monitoring and observability.

View Resources

About us

Get to know LogicMonitor and our team.

About us

Documentation

Read through our documentation, check out our latest release notes, or submit a ticket to our world-class customer service team.

View Resources

Running your job so it can be monitored

Last updated on 18 September, 2024

In order for LogicMonitor to monitor batch jobs, they should be run within one of the LogicMonitor supplied wrappers.  Wrappers are supplied for both Windows and Linux systems, in the lib directory of the Collector, logicmonitor/agent/lib.

  • The Windows wrapper is lmbatchjobwrapper.js
  • The Linux wrapper is lmbatchjobwrapper.sh

Requirements

Batch job status is reported to a collector on TCP port 7214 by default (this port can be configured in the collector’s agent.conf).  Thus, the system running the batch job must be able to reach TCP port 7214 on the Collector or the configured port (if you’ve change it).

  • If you’re monitoring a batch job on a Linux server, the Linux wrapper requires Perl::LWP.  This is present on most systems, and if not is easily installed through your package manager (such as: yum install perl-libwww-perl) or via CPAN.
  • There are no additional requirements for the Windows wrapper.

Using the wrappers

Both the Windows and Linux batch job wrappers are used in the same way, and support the same parameters:

[wrapper script] <collectoraddr> <hostname> <jobname> <cmdline>

Parameter

Description

[wrapper script] Either “lmbatchjobwrapper.js” (for Windows), or “lmbatchjobwrapper.sh” (for Linux). These scripts can be obtained from the lib directory of any LogicMonitor Collector installation, and copied to the systems where batch jobs will be run.
<collectoraddr> The IP address or DNS name of the collector to report the results to, including the TCP port (7214 by default, but this can be changed in the collector’s agent.conf file.)
<hostname> The name of the system running the batch job. This must match either the name or displayname of the system that the batch job datasource is associated with, as defined in LogicMonitor.
<IP> The IP address of the system running the batch job. This can be used in place of the hostname.
<jobname> The name of the batchjob, as defined in the batchjob definition in LogicMonitor. If the batchjob name contains spaces, it must be enclosed in quotes.
<cmdline> The batch job to run, including any parameters. On Windows, the job and parameters must be contained within quotes.
In This Article

Get Started with LogicMonitor