Using Hobbit to monitor a specific port for availability?
How would I get hobbit to monitor a specific port to ensure it is listening? For instance, I want to monitor a Java program that listens on port 8888, but just want hobbit to check if it can connect, and then disconnect. How could I do this?
Thanks, Tom Callahan
On Wed, Mar 12, 2008 at 1:54 PM, Callahan, Tom <CallahanT at tessco.com> wrote:
How would I get hobbit to monitor a specific port to ensure it is listening? For instance, I want to monitor a Java program that listens on port 8888, but just want hobbit to check if it can connect, and then disconnect. How could I do this?
I've got a couple of systems on my display that are "port pings". There may be a more efficient way to do it, but what I have in bb-hosts is:
a.b.c.d hostname.domain.com # telnet:1494
The Hobbit network tester telnets to port 1494 and either gets a connection or not. If not, that's a red dot. I have no idea what's supposed to be on port 1494, but there's a little bit of text returned that says "ICA" so maybe it's a Citrix server.
On several recent occasions when it failed, the response logged was:
Service telnet on hostname.domain.com is not OK : Service unavailable (Connection reset by peer)
Ralph Mitchell
It's doing the telnet test. Look for an email in th emailing list archives that I started and Henrik responded to.
Josh
On 3/12/08, Ralph Mitchell <ralphmitchell at gmail.com> wrote:
On Wed, Mar 12, 2008 at 1:54 PM, Callahan, Tom <CallahanT at tessco.com> wrote:
How would I get hobbit to monitor a specific port to ensure it is listening? For instance, I want to monitor a Java program that listens on port 8888, but just want hobbit to check if it can connect, and then disconnect. How could I do this?
I've got a couple of systems on my display that are "port pings". There may be a more efficient way to do it, but what I have in bb-hosts is:
a.b.c.d hostname.domain.com # telnet:1494The Hobbit network tester telnets to port 1494 and either gets a connection or not. If not, that's a red dot. I have no idea what's supposed to be on port 1494, but there's a little bit of text returned that says "ICA" so maybe it's a Citrix server.
On several recent occasions when it failed, the response logged was:
Service telnet on hostname.domain.com is not OK : Service unavailable (Connection reset by peer)
Ralph Mitchell
-- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
On Wed, Mar 12, 2008 at 2:19 PM, Josh Luthman <josh at imaginenetworksllc.com> wrote:
It's doing the telnet test. Look for an email in th emailing list archives that I started and Henrik responded to.
I understand that it's doing a telnet test, and it's working just fine. My point was that the target is definitely *not* a telnet daemon and Hobbit seems to be perfectly OK with that. I *think* it's probably a Citrix server, but I don't really care as long as the port accepts a connection.
So, I would expect the same to work for Tom, though there might be a better way of doing it.
Ralph Mitchell
What I am saying is with the argument telnet:1494 it is doing a telnet test to a telnet daemon, on port 23. You're going about trying to test port 1494 all wrong.
Read this: http://www.hswn.dk/hobbiton/2008/02/msg00160.html
On 3/12/08, Ralph Mitchell <ralphmitchell at gmail.com> wrote:
On Wed, Mar 12, 2008 at 2:19 PM, Josh Luthman <josh at imaginenetworksllc.com> wrote:
It's doing the telnet test. Look for an email in th emailing list archives that I started and Henrik responded to.
I understand that it's doing a telnet test, and it's working just fine. My point was that the target is definitely *not* a telnet daemon and Hobbit seems to be perfectly OK with that. I *think* it's probably a Citrix server, but I don't really care as long as the port accepts a connection.
So, I would expect the same to work for Tom, though there might be a better way of doing it.
Ralph Mitchell
-- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
On Wed, Mar 12, 2008 at 3:24 PM, Josh Luthman <josh at imaginenetworksllc.com> wrote:
What I am saying is with the argument telnet:1494 it is doing a telnet test to a telnet daemon, on port 23. You're going about trying to test port 1494 all wrong.
Telnet doesn't *have* to connect to port 23. Try "telnet yourmailserver 25". If you know what to tell it, you can talk your mail daemon into accepting email direct from your keyboard...
Anyway according to the bb-hosts man page, under "Simple Network Tests":
"You can modify the behaviour of these tests on a per-test basis by adding one or more modifiers to the test: *:NUMBER* changes the port number from the default to the one you specify for this test. E.g. to test ssh running on port 8022, specify the test as *ssh:8022*."
Read this: http://www.hswn.dk/hobbiton/2008/02/msg00160.html
In that chain Henrik pointed out a different way to do the check, the "proper way", if you like:
http://www.hswn.dk/hobbiton/2008/02/msg00172.html
which is to add an entry to the bb-services file, with possible send/expect sequences. When I originally set up Hobbit it was taking over from a BB installation, which didn't have the bb-services file. I had the telnet:1494 test working in BB and I wasn't surprised when it continued to work in Hobbit.
Ralph Mitchell
There are 2 ways you can go about this.
- Edit bb-services and create a new test called "javaprog" or whatever you want to call it. Creating a new port test is pretty easy and looking at the examples in bb-services and/or the man page should get you there, heck I will just tell you:
[javaprog] port 8888
After you add that to bb-services, you would add "javaprog" to your bb-hosts file for that host. You would then get a column called "javaprog" that showed it's status.
- You can also define a local port test on the server that is running the java program (assuming its one that you have a hobbit client on). This will basically look at the ouput of netstat and alert if the port is not in a LISTEN state. For this read the "Ports" section of the hobbit-clients.cfg file and man page.
-Charles
Callahan, Tom wrote:
How would I get hobbit to monitor a specific port to ensure it is listening? For instance, I want to monitor a Java program that listens on port 8888, but just want hobbit to check if it can connect, and then disconnect. How could I do this?
Thanks, Tom Callahan
On Wednesday 12 March 2008 20:54:29 Callahan, Tom wrote:
How would I get hobbit to monitor a specific port to ensure it is listening? For instance, I want to monitor a Java program that listens on port 8888, but just want hobbit to check if it can connect, and then disconnect. How could I do this?
Please see 'man bbservices'
Regards, Buchan
participants (5)
-
bgmilne@staff.telkomsa.net
-
CallahanT@tessco.com
-
jonescr@cisco.com
-
josh@imaginenetworksllc.com
-
ralphmitchell@gmail.com