Allow using port names (in addition to port numbers) in protocol tests

Issue #485 new
Ulrich Windl created an issue

Monit currently insists on "port" being followed by a number. I'd like to be able to specify a port by its service name. Maybe a syntax that expects a port name in balanced double-quotes is easy to implement. For performance reasons, monit may cache the resolution until an explicit "reload" or "restart".

So in addition to:

if failed host .. port 515 type TCP then ..

one could write

if failed host .. port "printer" type TCP then ..

I think if host names are allowed to be used in addition to IP addresses, service (port) names should also be allowed. Maybe even this could be allowed:

In addition to

if failed host .. port 515 type TCP then ..

also allow

if failed host .. port 515/tcp then ..

and in addition to the future

if failed host .. port "printer" type TCP then ..

also allow

if failed host .. port "printer/tcp" then ..

Comments (1)

  1. Log in to comment