Follow Mike's blog
Archives for the month of: April, 2017

What does the ‘phone’ alert sound like from LogicMonitor?  Listen to a phone alert I got. I responded by scheduling downtime for 5 hours for that alert. I can also acknowledge or escalate immediately.

 

DESCRIPTION:

A customer wanted to use a freeware tool called SmartCtl.exe to check the health of physical drives in Windows. I wrote a PowerShell script to do this. It runs the command on the remote/target computers. It checks for ‘PASSED’ in the result and alerts if it didn’t pass. It does this for each physical drive that it finds.

Screenshot below is the output from regular command. I convert it to <attribute name>   = <value> so it can be ‘interpreted’ more easily by RegEx in LogicMonitor

INSTRUCTIONS:

  1. Download this DataSource file (link) and install it in your account ( Settings > DataSources > Add > From file)
    Here’s the DataSource file ( link ) for the DataSource that retrieves the ‘attributes and their values’. My example only captures ‘Reallocated_Sector_Ct’ and ‘CRC_Error_Count’. Don’t forget to set your desired thresholds (if any).
  2. Set the ‘applies to’ in DataSource so it applies to the target computers you want to monitor.
  3. Install SmartCtl.exe on each of your target computers (download link)
  4. Enable PowerShell remoting feature if it isn’t already. (Microsoft link)
  5. Test by looking at ‘Raw Data’ tab.

DESCRIPTION:

Sometimes you only need simple up/down monitoring. You can ‘hang’ this test on an existing device (no extra $ charge). I usually hang it on the collector since that’s where the pinging happens from anyway but technically you can hang it off any existing device.  There’s a similar datasource called ‘port multi’ that can do a port check if your device or service listens on a specific port.

Below is my video because I think it’s easier to show you.

For people who prefer text instructions:

  1. Select the device (I recommend the collector)
  2. Pull down the blue arrow button that’s to the right of ‘Manage gear’ button then choose ‘add monitored instance’
  3. Type in ‘multi’ to find and select the datasource
  4. Type in the IP address or DNS name of what you want to ping in the ‘wildvalue’ field
  5. You should now see it under the datasource ‘branch’ on your device called ‘Ping (Multi)’
  6. To add more, you click the datasource and then click ‘Instances’ tab on right pane.  You can then add more ‘instances’.

DESCRIPTION:

It’s nice to know if the connection and login to a secure FTP site is working. This datasource uses a groovy script to connect then login and list the files. It even counts the number of files and folders in the root folder. If needed, you can add logic to alert you if a specified file exists.

INSTRUCTIONS:

  1. Download this DataSource file and import it into your account (Settings > DataSources > Add > from file )
  2. Set these properties so it can apply and work:
    sftp.site   =  wowie.us
    sftp.user = mike
    sftp.pass = *****   (it auto hides)
    sftp.port = 22    (usually)
  3. Test by looking at the “Raw Data” tab. If it’s successful, the result is 0. Failure shows as 1.

DISCLAIMER:  official tech support for this is not available from LogicMonitor. Contact me and I will try to help you.

DESCRIPTION:

This Chrome Extension allows people to use, create, modify, and run JavaScript scripts and it has a GUI and place to enter API credentials.
So far, it has a few example scripts in it.
My goal was to allow people to…
  • Run scripts – especially API calls without having to redo the credential overhead
  • Use a  GUI to see a description and ‘run’ a script
  • Run on most any operating system (Windows, Mac, Linux, Chromebook) without needing to install a scripting language.
You can see and edit the scripts by clicking the “edit mode” tab to switch back and forth between edit and run modes.
You can also use Chrome menu > Developer Tools  (F12 key on Windows) then click the “Console” tab to see it running and error messages.

Click HERE to get it from the Chrome Web Store.

DISCLAIMER:

LogicMonitor Tech support is not provided. If you have feedback or questions, I will try to help.