Simon icon Simon
Flexible server monitoring

Introducing Simon 5!

Simon version 5 is now available. It is a massive update, introducing a much-requested feature: syncing the Simon data between multiple Macs, plus a Simon Status service, a Link Checker filter, improved Find filter, iMessage and Speak Error notifiers, a new app icon, and much more.

Important: please note that Simon 5 requires a minimum of macOS 10.12 (Sierra), and is a paid upgrade from Simon 4. Purchasers since September 1, 2020 automatically get a version 5 license (that also works in previous versions).

Read the Simon What's New page for details.

Port test issues

Hello, We are evaluating Simon to replace our antiquated Page Sentry setup.

Simon so far shows much promise.

However, I'm running into some issues.

I'm trying to replicate what's in this post

because I've got a lot of things to check in this manner. (Retrospect, server admin ports, etc)

However I can't get it to work.

I've attached screen shots of the windows and the previews of each.

Where am I going astray? I've tried setting the result in the Service to 1, and that works, but everything is successful then.

All we need is a simple 'is the port open, yes or no.' But this seems overly complicated to set this up with a script, telnet, and smart detection. The port check test seems like a likely candidate but it's more like an interactive telnet tester. It takes a long time to timeout when it receives no data back. Is there no way to 'if connected and received nothing, report success, if no connection after X seconds, report failure' in the port test?


Preview of VNC.png19.86 KB
Edit Service VNC.png41.37 KB
Edit Test VNC.png63.29 KB
David Sinclair's picture

Re: Port test issues

Hi Justin; thanks for trying Simon. I'm glad you like it so far.

What you need to do is set the result in the service to 1, as that is what the telnet command outputs. What you want is for that to succeed, then the "real" success is determined via the Smart Change Detection feature. It will result in a failure if the Start text isn't found.

So you're almost there. You just need to change the result table in your Edit Service to use 1 for success, and you'll be done.

You can confirm that this works by changing the script to a port that isn't valid; the test will then fail. The Preview will always succeed, but that's only half of the picture.

(In theory you could probably do it all in the script, e.g. by piping the telnet output to grep or similar, but I'm not familiar enough with unix to get that working. If anyone else knows how to do that, I'd be keen to hear from you.)

We'll I got that working,

We'll I got that working, but it takes 1 minute for the test to fail if the host is down. This is because telnet waits 1 minute before timing out. From what I can tell, Simon only runs one test at a time (without a hidden pref). This has the potential to severely slow testing down. Is there any way to fix this?

David Sinclair's picture

Re: We'll I got that working

That was true in some previous versions, but version 2.3.4 (and later) can (once again) check any number of tests at once.

There is a small cli app in

There is a small cli app in the Network Utility app called stroke. The syntax for using it is 'stroke address startPort endPort'

It might be better to use then telnet.

/Applications/Utilities/Network\ {IP} {Port} {Port}

Smart Detect 'Open TCP Port:'

This fails instantly if the host is up and the port is not open. If the host is down it fails after a minute. This is how the CLI util functions (same as telnet), not a reflection of Simon. However, still not a perfect solution.

This works

Got it working in csh. Haven't tried to get it to actually work as a perl script.

Even better

Thanks to a comment in the above macosxhint article..

Shell script Service test
Variables: IP, Port
Results: 0 Success, 1 Failure

nc -zw 3 {IP} {Port}

This will work...

David Sinclair's picture

Re: Even better

Excellent. Thanks for that. I have added this to the Simon Extras page, giving you credit for it.