Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    White space only in custom send/expect load-balance monitor?

    Scheduled Pinned Locked Moved General pfSense Questions
    1 Posts 1 Posters 360 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      minektur
      last edited by

      I have a custom TCP-based service that I'm trying to do simple load balancing on.  I see that I can define my own monitors and send text and match recieved text.

      I go to services->load balancer->monitors and click + and chose a type of "Send/Expect" and then I face a problem…  I need to just send a newline  e.g. \n  and watch for some text back. It isn't clear how to send just a newline.

      I'm hoping not to have to read the php source code of the page to figure this out - is there a cannonical way to escape non-printing characters?

      It appears that if I put "foo" in the send box (without the quotes) these bytes are sent to the service:

      foo\n

      where \n is the newline character.  My question is, am I understanding this right?  Should I just leave the send box empty to get just a newline?  It APPEARS to work, but I hate relying on an interface accident.  Is this the intended behavior?

      edit:  Also, I can see the monitor hit my service, send a newline, and the service returns the expected response, but the host is always shown as 'down' - like the expected value isn't being parsed correctly.  Can you put regexes in the expect field?  What SHOULD I put there?

      A simple example mimicking the built-in HTTP monitor would be very instructive and helpful.  I just dont find much documentation on this at all in the guide, or elsewhere online.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.