LogicMonitor can easily alert you when a service fails, but it sure would be nice to TRY to restart it automatically (and alert you if it cannot). This datasource does just that.
If it’s running, it will show as a value of “1”.
If it’s stopped, it will try to restart and a value of “2” will show.
If it’s still stopped, it will try a second time. If it succeeds, a value of 3 shows.
If it fails to start after two tries – a value of “4” will show.
I chose this simple numbering because I set it to trigger a warning if it’s 2 or greater; error if 3 or greater and critical alert if 4 or greater.
- Download this datasource (XML file) then import it into your account. Settings > Datasources > Add > import from XML file
- While you have your desired computer selected in Device tree, add a monitored instance (blue down arrow > Add monitored instance. Type in the service name (e.g. Spooler) in the “wildcard” field. Give this instance a name and description. You can add additional instances on the “Instances” tab of right pane.
- Test by looking in the “Raw Data” tab and “Graph”. A value of 1 should show normally. Manually stop the service and you should see a 2 on the next ‘cycle’ which is at 1 minute interval.
LIMITATIONS/DISCLAIMER: Official LogicMonitor tech support is not available. Use at your own risk.
This currently requires the typical setup whereby your collector is running as a domain account and computer you are monitoring is also on that domain. i.e. I haven’t enhanced it to allow it to use wmi.user and wmi.pass properties specified on the device.
Actually you can set any property in LogicMonitor by modifying the script. Some people already have their device location set in SNMP and they want this to be in LogicMonitor so they can show it on a google map widget and show location in an inventory report. I wrote this datasource last month but but this one uses the newer REST API instead of the RPC API that will eventually be deprecated. I set the datasource to run only every 60 minutes (the maximum interval). I also tried to make the script as efficient as possible by aborting early (avoids API calls) if the property already matches SNMP.
- Download this datasource (XML file) then import it into your account. Settings > Datasources > add > import XML file.
- If you haven’t already, get your API token (access id and key) for your user or a separate user.
- Set these properties on the device or group or at base of your account (they inherit from above).
- account (for example ‘acme’ if your account URL is acme.logicmonitor.com)
- In the datasource, set the ‘Applied’ to that device or if you want it for all your SNMP devices; you can do that by applying to hasCategory(“SNMP”).
- Test. I suggest looking at the “Raw data” tab on the device. 1 indicates that no change was needed and 2 will show when/if it was set or changed. If you see “no data” or it simply doesn’t set the ‘location’ property, I suggest you run the script in the debug window (video showing how)
Citrix stores it’s license counts in WMI. Some people buy several licenses and you want them to add up. This datasource is capable of adding up all the licenses for the same product. e.g. if you have 3 licenses (200 users + 100 users + 50 users = 350 users). The instance names are the license names for example MPS_ENT_CCU. I set it to trigger alerts when your licenses run low (90%=warning, 95%=error, 98%=critical)
- Download and import this datasource (XML file). Click Settings > Datasources > Add > From XML file
- Apply it to your Citrix License server(s).
- Test by looking at your graphs and ‘Raw data’ tab
Some diligent people type in the locations of their gear into their SNMP ‘location’ field so it makes sense to retrieve that and use it within LogicMonitor. I make it show as a property on the “info” tab. This allows it to also be used as a ‘token’ to show in alerts or reports, etc. (see screenshot below).
I made the groovy script as efficient as I could by detecting if the value needs changing. If it doesn’t need changing, it aborts the script without using API calls.
- Download this datasource file (XML file) and import it into your account by clicking Settings > Datasources > Add from XML file
- Create a user and role for API access. I recommend you create a role that just has ‘manage’ access to all devices (no need to give access to settings, reports, services, etc.) Also, assign a user like “api_user” to this role and set the user so they don’t “see” any of the 6 tabs (Dash, Devices, etc).
- Set a property called “api.pass” to safely store the password. I recommend you set that on the group or root of your account so it ‘trickles down’ to all child groups.
- Change the “company=” in the script to specify YOUR company name (the part before logicmonitor.com on your URL).
- Test by clicking on the datasource under the device and click the “Raw data” tab to make sure it has 0 or 1 (not ‘No data’)
It helps to make sure your Database Availability Group(s) are healthy and replicated so they are ready to failover in the event of a problem. Copies are often in different sites to be “site resiliency”
- Download the datasource and import it into LogicMonitor (Settings > Datasources > Add > from XML file)
- Set these properties on each Exchange server so it applies and can authtenticate
- ex.fqdn (the name of the Exchange server)
- ex.user (a username that has Exchange permissions)
- ex.pass (the password for this user)
Sometimes it’s important to monitor the speed of a file copy. I wrote this datasource because a customer wanted to monitor the time to copy a file from their London office to their Baltimore office. I chose to script it in PowerShell. To detect problems, I set it to alert if the file doesn’t exist and I set it to alert if the target file is not the same size as the source file. For his 10MB test file, I set the time thresholds to
>3 seconds = warning
>5 seconds = error
>7 seconds = critical
but you can easily adjust as needed.
- Download this datasource (XML file). Add it to your LogicMonitor account (Settings > Datasources > add from XML file)
- On the device add a property called “copy_file” to specify the file you want to copy (e.g. \\server2\share1\test-file.zip )
- Adjust the alert threshold if necessary.
- As usual, don’t forget to test. I suggest you look at the “Raw data” tab to make sure the numbers look correct.
Below is an example link that takes you directly to a dashboard without requiring login. As you can see by the 2nd one shows the username & password in plain text. Of course you can lower the risk by making sure this user is only READ-ONLY.
To get and build this URL, navigate to your dashboard and add the portion c=your_account&u=some_user&p=your_password in the middle