Chances are that if you are an avid Windows user, you have probably come across the Perfmon utility at least once in your exploration of system and network monitoring.

Most of LogicMonitor’s Windows data collection uses WMI queries, but we do utilize Perfmon counters for our Windows SQL Server, Exchange (earlier versions), and SMTP DataSources. If you see gaps of No Data for these DataSources in particular, but the rest of your data collection (CPU, Disk, Memory, Ping, DNS metrics) is stable, then it is likely there is an issue with Perfmon on the monitored device.

Because Perfmon accesses performance counters from remote hosts, it is necessary that your collector services have Local Administrative privileges to access counters on your remote host if you are using a domain. If you are using a workgroup, your collector will need to be running under a user that has Local Administrative rights on the remote workgroup host that you are attempting to monitor.

NOTE: If the WMI credentials set for your device include a domain\user, but the remote computer is in a different domain, and the user is local, you may need to define pdh.user and pdh.pass properties to access Perfmon data.  If pdh.user and pdh.pass properties are defined on your device, they will be used over any WMI username and password properties defined for collecting Perfmon data.  

Perfmon Connection Timeouts & Latency

The most common symptoms seen when troubleshooting Perfmon instability are issues where Perfmon is having difficulty initiating a connection to a remote host. This must succeed between the collector and host in order for the LogicMonitorActive Discovery mechanism to detect which Perfmon performance counters are available on the remote host and to read data from the host.

After DataSource instances have been added to the host, Perfmon connectivity must continue to function in order for data collection to operate in a stable manner. If connectivity is interrupted after DataSource instances have been discovered, you will end up with blank or spotty graphs that are returning No Data.

To troubleshoot these connectivity issues:

  1. Remote into the collector machine under the user that your collector services are running under, and open a Run prompt > “perfmon.exe” to access the Perfmon GUI.
  2. Use the green “+” option to “Add” a new count.
  3. Specify the UNC path of your remote machine. When you are finished adding the path, Perfmon will pause while it automatically attempts to make a connection.
  4. If the connection is successful, you should be returned with a listing of all of the available Perfmon performance counters for your remote machine.
  5. If the connection fails, please attempt the same procedure from the local collector to itself, and from the local host to itself, to isolate the issue down to the host machine or the collector machine.

If you are unable to make a connection using the perfmon.exe utility on your collector to your remote host, the collector services will be unable to do so as well. This indicates an issue not with LogicMonitor, but with your Windows configuration or authentication.

Services & Dependencies

If WMI-based data collection succeeds, but Perfmon DataSources fail & you cannot get a connection established via the Perfmon utility, the issue may be that certain services need to be running on the host being monitored for Perfmon to respond to RPC queries.

The following services must be set to an Automatic startup type:

  • Remote Procedure Call (RPC)
  • Remote Registry

And the following services must set to Manual or greater startup type:

  • WMI Performance Adapter
  • Performance Counter DLL Host
  • Performance Logs and Alerts
  • Remote Procedure Call (RPC) Locator

Ports

Perfmon relies on inbound RPC port 135 TCP and Windows SMB port 445 TCP on the host. When troubleshooting Perfmon connectivity issues, please ensure that these ports are unrestricted in your firewall configuration.

Permissions

If the steps above do not resolve the issue and you suspect permission issues are to blame, you can work around this via regedit:

  1. Open regedit on the machine to which you are trying to connect to perfmon.
  2. Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Perflib.
  3. Right click on Perflib key and select permissions.
  4. Click Add and add Local Service with full control.
  5. Save and exit.
  6. Restart the Remote Registry Service.

Rebuilding Perfmon Performance Counters

If you are able to retrieve data using the Perfmon utility and the Collector Debug Facility, but receive an error such as “Object Not Found” when attempting to view specific counters, the issue may be due to corrupted or improperly registered performance counters. To resolve this, see the following steps to rebuild the counters:

  1. Open a Command Prompt with administrative privileges.
  2. Run the following commands to repair the counters:
    cd C:\Windows\System32
    lodctr /R
    cd C:\Windows\SysWOW64
    lodctr /R
    WINMGMT.EXE /RESYNCPERF
    

Recommendation:A system restart is recommended to fully apply changes.

  1. If a system restart is not possible, manually restart the following services:
    • Windows Management Instrumentation (WMI)—Ensure the service is set to Automatic.
    • Performance Logs and Alerts—Ensure the service is set to Automatic.

Note:Each performance counter has a specific counter type (for example, NumberOfItems32, NumberOfItems64). You can identify the type of a counter using the Get-Counter command in PowerShell.
For example, to find the type of the “System\Processes” counter, see the following:


([xml](((Get-Counter -Counter "\System\Processes").CounterSamples | ConvertTo-Xml -As String))).Objects.Object.Property |
    Where-Object { $_.Name -eq 'CounterType' } |
    Select-Object -ExpandProperty '#text'

The PDH data source only supports counters whose types begin with “NumberOfItems*.”
For counters of other types, use a WMI data source, which offers more flexibility and customization options when collecting performance data.

For more information, see Microsoft SQL Server Monitoring.

For additional help with troubleshooting, submit a support ticket or use the support chat. 

To monitor a Citrix XenServer installation, the LogicMonitor collector needs credentials to connect to the XenServer(s).

  1. Define the properties xen.user, xen.pass, and xen.url on either the global, group, or device level. Please note: unless you are using Active Directory authentication, the xen.user will typically be root.
  2. Add the XenServer as a device, as normal.

Note: If you are running a resource pool of XenServers, all Xen specific monitoring data for the entire pool will be collected from the pool master.  However, you should still add all pool members to LogicMonitor for collection of device specific performance data and alerts.

It is strongly recommended to enable SNMP and to allow the LogicMonitor collector to query ntp on all XenServer devices.  This enables LogicMonitor to collect more detailed data about device performance than is available solely relying on the Citrix XenServer API.

To enable SNMP on a Citrix XenServer, follow the procedures in “How to Configure SNMP in XenServer 5.x” from the Citrix site.

The procedures below detail how to enable both SNMP and NTP access.

  • Access the command shell of the XenServer (via ssh or from the console).
  • Open the file/etc/sysconfig/iptables in your preferred editor.
  • Add the following lines to the INPUT section after the line with -A RH-Firewall-1-INPUT –p udp –dport 5353… :

-A RH-Firewall-1-INPUT -p udp –dport 161 -j ACCEPT

-A RH-Firewall-1-INPUT -p udp –dport 123 -j ACCEPT

  • Save and close the file.
  • Restart the firewall service:

# service iptables restart

Citrix XenServer – SNMP Configuration

Change SNMP configuration

We recommend you replace the  /etc/snmp/snmpd.conf with a simple version:

rocommunity YOURSNMPCOMMUNITY 10.0.0.0/8

Change the 10.0.0.0/8 to the network containing the IP address of the LogicMonitor collectors that will monitor this XenServer.

If you are running Dell hardware you will also want to include these lines in snmpd.conf so the underlying hardware can be monitored via the Dell OpenManage suite of packages

smuxsocket 127.0.0.1
smuxpeer .1.3.6.1.4.1.674.10892.1

After updating the snmpd.conf file, set snmpd to start on boot and start it now:

# chkconfig snmpd on

# service snmpd restart

NTP configuration

insert a line allowing the LogicMonitor collector to query the ntp daemon in /etc/ntp.conf

restrict 10.0.0.0 mask 255.255.255.0

Change the ip address and mask as appropriate to include your LogicMonitor collector(s) IP address.

You may add multiple restrict lines.
Restart ntp:
# service ntpd restart

Solaris 10 should have Net-SNMP package installed already. It’s preferable to use it instead of the Sun’s SNMP package.

Below info is taken from this documentation. Please note that some Solaris DataSources require SSH credentials. Please refer to the DataSource description to verify whether these are required. 

Log To disable Sun’s SNMP

#svcadm disable svc:/application/management/snmpdx:default

the Net-SNMP daemon program locates at /usr/sfw/sbin/snmpd, and configure file of snmpd saved with the name snmpd.conf at /etc/sma/snmp. Use svcadm to start of stop snmpd:#svcadm enable svc:/application/management/sma:default#svcadm disable svc:/application/management/sma:default

Log File

If there’s any error or warning messages, see the file /var/svc/log/application-management-sma\:default.log. The default log file of snmpd is /var/log/snmpd.log.

Configuration fileWe may use /etc/sma/snmp/snmpd.conf.save as the working configure file to test wheather our snmpd daemon is ok.#cp /etc/sma/snmp/snmpd.conf.save /etc/sma/snmp/snmpd.conf#svcadm restart sma

There is another file also named as snmpd.conf stored in /var/sma_snmp directory, and which is called persistent storage file. The persistent storage file, /var/sma_snmp/snmpd.conf, contains USM security information and any MIB components that are set for persistent storage. This file also contains the engineID and the engineID boots. This persistent storage file is automatically updated when the System Management Collector starts. When the System Management Collector stops, the snmpusm and snmpvacm utilities write user security information to this storage file.

Log Using the CollectorX Protocol

The CollectorX protocol is supported in the System Management Collector. By default, the System Management Collector ships with a secure profile, that is, read–only access. CollectorX allows interaction with third party subcollectors, provided that these subcollectors support CollectorX over Unix Domain Sockets. For security reasons, CollectorX is not supported over TCP/UDP. For more information on the CollectorX protocol, see https://www.ietf.org/rfc/rfc2741.txt Edit the main /etc/sma/snmp/snmpd.conf configuration file to configure the System Management Collector to use the CollectorX protocol. By default, the CollectorX protocol is disabled. The following procedure describes how to enable the CollectorX protocol. To enable the CollectorX protocol add the following to /etc/sma/snmp/snmpd.conf file:

master collectorx

restart the sma (system management collector).# svcadm restart svc:/application/management/sma:default

Using The SMA

To view the status of the collector# svcs svc:/application/management/sma:default

To See Which MIBs Are Initialized# /usr/sfw/sbin/snmpd -Dregister_mib -Dmib_init -L

To Check the Disk Space and Network on a Local or Remote Machine# /usr/sfw/bin/snmpwalk -v1 -c public localhost HOST-RESOURCES-MIB::hrStorageIndex

# /usr/sfw/bin/snmpget -v1 -c public localhost HOST-RESOURCES-MIB::hrStorageSize.1

# /usr/sfw/bin/snmpwalk -v1 -c public localhost HOST-RESOURCES-MIB::hrStorageUsed

# /usr/sfw/bin/snmpnetstat -v 2c -c public -a localhost

If all these resources work, the SMA is configured and implemented properly.

FreeBSD requires activating the snmp daemon, and configuring to report more information than it does in the default setup. We also recommend ensuring ntp is enabled and configured.

Enabling SNMP

FreeBSD ships by default with the bsnmpd daemon.  This is not started by default, and is configured by /etc/snmpd.config, with a default community of ‘public’.

To set bsnmpd to start on system boot, add the line to /etc/rc.conf:

bsnmpd_enable="YES"

bsnmp modules

You should have the bsnmp-ucd package installed to allow more complete monitoring. This package can be installed by the following:

freebsd# pkg_add -r bsnmp-ucd
 Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.0/Latest/bsnmp-ucd.tbz
... Done.

edit /etc/snmpd.config to add the line:

begemotSnmpdModulePath."ucd" = "/usr/local/lib/snmp_ucd.so"

and uncomment the line:

begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so"

Restarting bsnmp

With snmp configured, you start or restart it so that the changes take effect:

/etc/rc.d/bsnmpd restart

Overview

LogicMonitor’s Windows Server Failover Cluster (WSFC) monitoring is performed on a virtual device called a virtual network name (VNN). Each VNN is assigned a virtual IP address and, in some cases, multiple virtual IP addresses for specific services. There is no physical device for the cluster; nodes are added as physical devices or virtual machines.

All cluster alerting comes from the VNN. The nodes are monitored the same as any standard device. If a clustered service fails on a node and successfully rolls over to another node, there will be no alerts generated on the cluster unless redundancy is at a critical level.

As of March 2021, LogicMonitor has added support for Storage Spaces Direct (S2D). These modules can be used to track the status and performance of Storage Spaces Direct and alert for failure conditions.

Note: If Microsoft SQL Server is running on a node as a stand-alone server, LogicMonitor will not automatically find it. See Windows Server Failover Cluster (on SQL Server) Monitoring for information on monitoring WSFCs on SQL Server.

Compatibility

As of December 2020, LogicMonitor’s WSFC monitoring package is known to be compatible with Windows Server 2012 through 2019. Clusters have been tested with PowerShell version 5 or greater and may not work with earlier PowerShell versions.

As of March 2021, Storage Spaces Direct modules are known to be compatible with 2016 and 2019 Windows Servers.

As Microsoft releases newer versions of Windows Server, LogicMonitor will test and extend coverage as necessary.

Setup Requirements

Satisfy Dependencies

Add Resources into Monitoring

Add your cluster nodes into monitoring. For more information on adding resources into monitoring, see Adding Devices.

After all nodes are discovered by LogicMonitor, manually add a resource for the cluster. This resource must use the cluster VNN as its hostname (which is entered into the IP Address/DNS name field). Be sure to use the fully qualified domain name (FQDN) as the hostname; do not use the IP address.

Note: Once the nodes are configured and LogicModules imported, the addCategory_WindowsFailoverCluster PropertySource will automatically add the name of the cluster, the IP addresses, and all node names in the cluster as properties on the nodes, as discussed in the following section. These can then be used to manually add the resource used for the cluster VNN.

Assign Properties to Resources

If the Collector is running as a domain account with local admin privileges on the host to be monitored, it is not required that you set the following custom properties. However, if the remote host requires credentials be specified, you’ll need to manually set several credentials as custom properties on the resource. See Credentials for Accessing Remote Windows Computers.

The addCategory_WindowsFailoverCluster PropertySource automatically finds all cluster virtual resources and nodes and sets their system.categories properties to “WSFC_VNN” or “WSFC_Node” respectively.

The PropertySource will also add the following properties to the node and virtual cluster resources.

Property Name Example Value
auto.wsfc.active_node node1.example.com
auto.wsfc.fqdn cluster1.example.com
auto.wsfc.ip 192.168.0.100
auto.wsfc.name cluster1
auto.wsfc.nodes node1,node2,node3

Import LogicModules

From the LogicMonitor public repository, import all Windows Server Failover Cluster LogicModules, which are listed in the LogicModules in Package section of this support article. If these LogicModules are already present, ensure you have the most recent versions.

Once the LogicModules are imported (assuming all previous setup requirements have been met), data collection and property assignment will automatically commence.

Migration from Legacy LogicModules

In December of 2020, LogicMonitor released a new suite of WSFC LogicModules. The DataSources in the new suite run on only the cluster virtual device, whereas the prior suite’s DataSources ran on each node in the cluster. Alerting on only the cluster virtual device reduces the number of duplicate alerts generated.

The release of the new suite serves to deprecate the following legacy DataSources:

If you are currently monitoring WSFC devices using any of these legacy LogicModules, you will not experience any immediate data loss due to the name variation that LogicMonitor expressly adds. However, there will be a diversion in data collection between the deprecated and new LogicModule, and you will potentially collect duplicate data and receive duplicate alerts for as long as both LogicModules are active.

For this reason, we recommend that you disable monitoring of DataSource instances at the resource or resource group level after you have imported the replacement. When DataSource monitoring is disabled in this way, it stops querying the host and generating alerts, but maintains all historical data. At some point in time, you may want to delete the legacy DataSource altogether, but consider this move carefully as all historical data will be lost upon deletion. For more information on disabling DataSource monitoring, see Disabling Monitoring for a DataSource or Instance.

LogicModules in Package

LogicMonitor’s package for WSFC and Storage Spaces Direct monitoring consists of the following LogicModules. For full coverage, please ensure that all of these LogicModules are imported into your LogicMonitor platform.

Display Name Type Description
addCategory_WindowsFailoverCluster PropertySource Sets a category of “WSFC_VNN” for the cluster virtual resource and sets “WSFC_Node” for each node in a cluster in the system.categories property.
Windows Cluster Disks Datasource Monitors disks and volumes which are associated with the cluster, gathering metrics such as the storage details, number of partitions, and the overall utilization.
Windows Cluster MulticastMessages DataSource Monitors the Multicast Request-Response (MRR) messages throughout the cluster network, monitoring the multiple recipients and their responses.
Windows Cluster Network DataSource Monitors the cluster network throughput, message transmission, number of reconnections and message queue depth.
Windows Cluster NetworkInterfaces DataSource Monitors the operating state of the interfaces associated with the cluster.
Windows Cluster Nodes DataSource Monitors the individual nodes that comprise the cluster, monitoring their operating and drain state.
Windows Cluster NodeStatus DataSource Summary status of all nodes in a cluster.
Windows Cluster PrintServer DataSource Monitors the cluster print server spooler metrics such as job rate, total jobs, page rate, total pages, job spooling, job data, page references and errors.
Windows Cluster ResourceControlManager DataSource Monitors the Resource Control Manager(RCM) resource states and resource handling of failures and collections metrics such as number of groups currently online, Resource Host Monitor(RHS) processes and restarts.
Windows Cluster ResourceGroups DataSource Monitors the cluster resource group state. The current owner node is an instance property on the resource.
Windows Cluster Resources DataSource List all of the Cluster Resources and the current state.
Windows Cluster SharedVolumes DataSource Monitors Cluster Shared Volume operating state, backup state, fault state, cache state, storage utilization, storage capacity details, throughput, IOPS, latency, queue depth, flushes, cache IOPS, cache throughput, cache storage details and current LRU cache size.
Windows Cluster S2D StoragePoolStatus DataSource Monitors the status of storage pools in the S2D cluster.
Windows Cluster S2D Statistics DataSource Provides statistics from the S2D Health Report.
Windows Cluster S2D VirtualDisks DataSource Monitors S2D virtual disk names and status.

When setting static datapoint thresholds on the various metrics tracked by this package’s DataSources, LogicMonitor follows the technology owner’s best practice KPI recommendations. If necessary, we encourage you to adjust these predefined thresholds to meet the unique needs of your environment. For more information on tuning datapoint thresholds, see Tuning Static Thresholds for Datapoints.

Configuring Windows Firewall to Allow Remote WMI

When obtaining data from a remote computer, WMI must establish a DCOM connection. If a Windows firewall is running with default settings, it will not allow this connection. To allow remote WMI through the firewall, on the computer to be monitored, perform one of the sets of steps outlined next.

Using the Command-Line Shell

To allow remote WMI through the firewall using the command-line shell:

  1. Enter one of the following commands, depending upon your Windows version:
    • netsh firewall set service RemoteAdmin enable
    • netsh advfirewall firewall set rule group="windows management instrumentation (wmi)" new enable=yes

Using the Group Policy Editor

To allow remote WMI through the firewall using the Group Policy editor, perform the following steps to enable “Allow Remote Administration” on the computer to be monitored:

  1. Under the Local Computer Policy heading, double-click Computer Configuration.
  2. Double-click Administrative Templates, Network, Network Connections, and then Windows Firewall.
  3. If the computer is in the domain, then double-click Domain Profile; otherwise, double-click Standard Profile.
  4. Click Windows Firewall: Allow remote administration exception.
  5. On the Action menu, select Properties.
  6. Click Enable, and then click OK.
  7. See Connecting Through Windows Firewall

Connecting Through External Firewalls

In the monitoring industry, it is typically not recommended to connect to a remote Windows computer through an external firewall via WMI. Rather, if you have different security zones in your network that are separated by firewalls or NAT devices, and no host is excluded from these restrictions, then simply install multiple Collectors—one on each side of the firewall or NAT devices—to monitor hosts in those zones appropriately.

The reason it is not recommended to connect through external firewalls is because it requires that hosts then be configured to restrict to a port range. In addition to creating an administrative burden, this customization can lead to port exhaustion if other applications rely on WMI but available ports are restricted, which can then subsequently prevent those applications or even LogicMonitor from referencing or collecting data. In addition, because customizations are in place, LogicMonitor’s ability to provide troubleshooting support may be limited if issues arise.

With that said, if you wish to try monitoring Windows hosts from a Collector that is firewalled from them, you must ensure that DCOM works, and that no NAT is being performed. While it can be done, you are accepting some risks as this configuration could present many No Data alerts and possibly result in poor monitoring reliability.

Overview

LogicMonitor uses SNMP to monitor host filesystem capacity across a variety of operating systems.

Filesystem Monitoring DataSources

LogicMonitor offers several DataSources for filesystem monitoring via SNMP:

Understanding the SNMP_Filesystem_* DataSources

The SNMP_Filesystem_Usage and SNMP_Filesystem_Status DataSources offer filesystem usage and status monitoring respectively for operating systems such as Linux and Unix.

These two DataSources were released in December 2020 and are intended to eventually replace snmpHRDisk- and snmpHRLargeDisk-. However, because of widespread usage of snmpHRDisk- and snmpHRLargeDisk-, LogicMonitor is providing ample time for adoption of these new DataSources before the now-legacy DataSources are officially deprecated. In that same vein, the new DataSources have been temporarily rolled out without alert thresholds in place to ensure that users of both sets are not bombarded with duplicate alert noise. (Recommended alert thresholds are documented in the technical notes when you are ready to enable alerting on the new set of DataSources as part of your migration process.)

Although the new SNMP_Filesystem_Usage and SNMP_Filesystem_Status DataSources offer many monitoring enhancements, there are three primary differentiators between the newest set and the now-legacy set:

Understanding the FreeBSD_Filesystem_Usage DataSource

The FreeBSD_Filesystem_Usage DataSource monitors filesystem usage for the FreeBSD operating system. It was released in December 2020 and replaces the now-deprecated snmpFreeBSDDisk- Datasource. Enhancements include an updated AppliesTo statement that includes OpenBSD systems; updated filters to allow discovery of files between 0-100 bytes on file systems; new complex datapoints; support for drives over 8 TB and block sizes other than 4 K; and the fixing of a 5% overcorrection in the graph.

Troubleshooting Usage that Exceeds 100%

If you have not yet migrated away from the legacy snmpHRDisk- and snmpHRLargeDisk- DataSources, you may potentially see usage metrics that exceed 100%. This is because LogicMonitor assumes that your file systems have 5% of file system space reserved for root use only (a standard practice that allows some ability to move and copy files if the filesystem becomes full). While this percentage is generally tunable upon filesystem creation, the DataSources assume a default of 5%.

The reason LogicMonitor reports the filesystem capacity from the perspective of a non-root user is to prevent a situation in which LogicMonitor indicates that there is 5% free space when a non-root user would experience a filesystem full error. If you would like to update this default reporting, you can modify the datapoints to reflect absolute usage numbers. The math for the relevant datapoints is (StorageUsed/(StorageSize*0.95)100); simply remove the .95 factor.

Migration from the Legacy FileSystem DataSources

If you are currently monitoring file systems using any of the legacy DataSources named previously, you will not experience data loss upon importing their replacements. This is because DataSource names have been expressly changed to eliminate module overwriting. However, there will be a diversion in data collection between the deprecated and new DataSource, and you will potentially collect duplicate data for as long as both are active.

For this reason, we recommend that you disable monitoring of the DataSource instances at the resource or resource group level after you have imported its replacement. When DataSource monitoring is disabled in this way, it stops querying the host and generating alerts, but maintains all historical data.

At some point in time, you may want to delete the legacy DataSource altogether, but consider this move carefully as all historical data will be lost upon deletion. For more information on disabling DataSource monitoring, see Disabling Monitoring for a DataSource or Instance.

In order to get detailed performance monitoring of physical disk drives, LogicMonitor requires a specific configuration in the net-snmp snmpd agent.

Add this line:

extend diskstats /bin/cat /proc/diskstats

to snmpd.conf, and restart the snmpd daemon.

The DataSource “Linux Disk Performance-” will then discover all physical drives and monitor their performance. (You can manually trigger ActiveDiscovery to speed up that process.)

Note: only physical block devices (sda, sdb, etc) are monitored, not partitions (sda1, sdb3, etc). Some systems have partitions, but not block devices – if you need support for such systems, please contact LogicMonitor support.

To monitor a Linux NFS server, an extension to the snmpd.conf is required

Add this line:

extend lm-nfsd /bin/cat /proc/net/rpc/nfsd

to snmpd.conf, and restart the snmpd daemon.

The Linux NFS Server stats- datasource will then discover and monitor the  performance of the NFS server. (You can manually trigger ActiveDiscovery to speed up that process.)

NFS mounted filesystems

The NET-SNMP binaries do not deal with terabyte file systems well if they are NFS mounted – they will have small hrStorageAllocationUnits, and hrStorageSize and hrStorageUsed will wrap, so you may see that the Used space is greater than the total Size.There is currently no fix for this in the NET-SNMP SNMP collector, so the workaround is to monitor the NFS server, not the system that mounts them.

Due to our collector architecture, our script collector method can only launch scripts from the local collector machine. The collector is not natively able to directly launch files or execute scripts that are present on aremote host.

Generally, it is best practice to avoid remote execution for monitoring purposes, whenever possible. In most cases, it should be possible to serve the information that you would like to monitor via a webpage, API, SNMP, or database connection so that it can be accessed remotely from the collector machine with very little overhead.

But if you are interested in monitoring your files that are remote location, there are extra steps necessary to achieve this. Here is our recommendation:

Preparing File Monitoring Script On Host

On the remote host machine, you will need to prepare a basic script that prints to standard output the values that you are interested in monitoring, and then you will need to extend this command into SNMP so that the collector can remotely query your host for this information. The below example uses the Linux “date” utility to output the age of a remote file:

echo "$((`date +%s ` - `date +%s -r dump.sql` ))"

(This would return the age of a file named “dump.sql”, in seconds.)

Extending your File Monitoring Script into SNMP

Once you have a script that captures the value that you want, you will need to extend this script into SNMP. The process has been expertly detailed in our blog posting How to Teach an Old SNMPD New Tricks.

After this has been done, you will need to create a simple SNMP-collecting datasource in LogicMonitor, which allows your collector to query your newly extended OID.

Alternatives

Depending on what exactly you are hoping to monitor on your remote machine, there may be alternatives to remotely access this information:

  • Via a different protocol (JMX for Java applications, JDBC for databases, etc.)
  • By installing a collector locally on each remote host. Monitor host with itself as a collector.
  • Create a wrapper script on the collector machine that performs a remote connection to the remote and launches a script that is present on the remote host’s filesystem via a script DataSource
    • We offer several options to directly embed a Groovy script to execute local or remote scripts.

Final Considerations

Remote file monitoring is definitely possible to achieve in LogicMonitor, but do keep in mind that this type of data collection is generally the most intensive to implement, both in terms of strain on your network and the collector itself, as well as the complexity in the design that this type of solution demands.

We advise that you reserve script-based data collection as a last-resort method to obtain the metric(s) that you are after. Other considerations:

  • Ideally, design your script data collection so that it works under a single-instance datasource. If it is necessary to have multiple instances enabled, try to use a non-script ActiveDiscovery method, whenever possible.
  • For multi-instance datasources, design your script in a way that it generates as few instances as possible. If large amounts of instances are generated across multiple hosts, this may cause the collector to behave unstably (gaps in graphs, collector restarts, etc.). This may be corrected by allotting more threads to the “collector.script” module in the agent.conf configuration file.
    • See our help page on Script ActiveDiscovery for more information on how to configure instance discovery for script-based datasources.

14-day access to the full LogicMonitor platform