PDA

View Full Version : Robots for applications?


EricWebb
14-02-2006, 07:58
Is anyone using any sort of robot that runs a command-line program or opens a telnet session, simulates user input, and reads screen responses to determine if an application is running? I've seen (and understand) techniques using wget for web-driven apps, but this one is a command-line app that users telnet into.

Markus
14-02-2006, 09:07
You could run a script* that telnets into a site every few minutes and stores the outcome (success/failure) somewhere. Another Zabbix controlled script could then pick up this data asynchronously.

In fact I am currently working (draft stage) on such a mechanism for various protocols.

Markus

* in Expect or Python/telnetlib or maybe Perl

elkor
14-02-2006, 14:40
yeah I was going to suggest trying Expect.

it's relatively quick and simple to deal with, especially if you don't have a particuarly complicated application. And, it can be nested in shell scripts pretty easily.

stritec
22-02-2006, 23:47
I would use expect.

We have a DSL Connection to the outside world, and we have zabbix monitor that we can get to www.yahoo.com. If the ping cannot get out, then we assume there's a problem with our DSL Connection.

I have a very simple Expect script which logs into the router via telnet, then issues the system command, and selects restart, and the router restarts.

Very simple, and easy because of expect.

desertrate77
26-03-2006, 08:54
Still sounds like a very useful idea. Has anyone tried it so far? One idea might be to combine the python idea and the Expect idea, with something like Pexpect (http://pexpect.sourceforge.net/). Power of python, flexibility of Expect.