topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday February 21, 2024, 10:23 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: NANY 2023: Pingmon (monitor ping status of an address)  (Read 1395 times)

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
NANY 2023: Pingmon (monitor ping status of an address)
« on: December 29, 2022, 09:21 PM »
NANY 2023 Entry Information

Application Name Pingmon
Version 3.9
Short Description Ping an address and send email or save log when state changes
Supported OSes Any modern Windows
Web Page None, just lives here
Download Link Zip file should be attached here
System Requirements
Version History
  • Hasn't been updated in 5 years, don't expect to in the next 5.


Description
I had a need to monitor a specific server that was having sporadic connection issues, and came up with this to watch what was happening. This version can email one or more users on state change, and save a log in text or CSV format. As stated, it uses blat.exe to provide email function, and date.exe from (unxutils) to provide time tracking. You will need to configure blat for your email server, but note it does not support encryption or Oauth2 so you might need to configure a mail relay - we use hMailserver for this purpose (simple but it's beyond the scope of this article).

Features
Monitors an IP address to find if it starts or stops responding to a ping. When the state changes, the bat file will send an email, save to a text log file, and/or save to a csv log file so you can keep track in realtime or afterward.

Planned Features
No enhancements expected, it does what I occasionally need.

Screenshots
It's a batch file doing pings, boring to look at.  ;D

Usage
Installation
Copy the three zipped files into %windir% (generally c:\windows).
Configure blat.exe (sample config command is "blat -install mailserver.name.or.ip from@address 35" from an elevated prompt).
The two required exes are included in this zip for convenience but are available on the interwebz:
date.exe   - see http://unxutils.sourceforge.net/
blat.exe   - see http://www.blat.net


Using the Application
Just type "pingmon" in a command prompt, the usage prompt tells you how to use it...

pingmon: ping an address every x seconds, log/email on state change (3.9)
usage:   pingmon computer frequency emailaddress logfile csvfile [mailserver]
usage:     computer     = computer name or IP address
usage:     frequency    = seconds between ping attempts
usage:     emailaddress = valid email address, or period for no email
usage:     logfile      = complete log file name, or period for no log file
usage:     csvfile      = complete csv file name, or period for no csv log
usage:     mailserver   = optional mail server to override blat setting
usage:   note, use valid email address and file names, no checking is done


Uninstallation
Just delete the three files to "uninstall".

Tips
Really, just try it and see. Since it's a dumb batch file, make your life easier and do not use any spaces in filenames. Filenames should use the complete path and name unless you want the log files in your current directory. Use a valid email address as a recipient, and following blat syntax you can have multiple recipient addresses separated by commas (no spaces). Note that since it is just a batch file, you'll of course need to leave the window running (minimized is fine). And it does no error checking, so use reasonable and valid values.

Known Issues
The whole script is based on looking for the "bytes=" response for a successful ping, so if a non-English installation uses a different word then it won't work right (but you should be able to edit the batch file for that easily).
vi vi vi - editor of the beast
« Last Edit: December 29, 2022, 09:29 PM by x16wda »

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: NANY 2023: Pingmon (monitor ping status of an address)
« Reply #1 on: December 29, 2022, 09:23 PM »
OK, zip file attached here.
vi vi vi - editor of the beast