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
It’s helpful sometimes to know the database names and the sizes of each and available space, status, and user count. This uses JDBC database connection to get a list of databases as ‘instances’ then it gets detailed info on each of these databases. It’s setup to filter out the system default databases of master, model, msdb, and tempdb.
- Download and import this datasource (XML file) into your account (Settings > Add > From XML file ). It’s set to apply to all Windows servers but it will only show where there are instances (where the database query succeeds).
- If desired, you can create threshold(s) to alert you.