This is an idea that I’ve had brewing in my head for awhile, and I finally took some time this afternoon to start on it. I envision a SOAP-based *nix monitoring server and client suite on several different platforms (hence web services). I decided to try out the SOAP::Lite implementation to create a quick test/proof of concept service using that implementation. I fired up CPAN, installed the module, and began. I was slightly frustrated at how seemingly vague the examples were, and that the same example was used on so many sites on the net. Here’s all that the service does at the moment:
[Curveball perl]$ perl status_client.pl
Calling uptime SOAP service
4:47pm up 6 days, 17:41, 2 users, load average: 0.08, 0.06, 0.15
SOAP call finished
Right now this web service is extremely simplistic, but over time I envision it evolving into a fairly sophisticated service that would be able to echo back to the client a lot of information, for example, returning a struct that contains values such as uptime.days, uptime.hours, uptime.minutes, load.average, users.numusers, and so forth.
Perl is the ideal language for this, because it is trivial to execute a command line program like uptime, strip it down to what you need, and return away. I’ll have to eventually put a proper page together, but for now you can snag the source in tgz or zip form. There’s a README and an INSTALL included in there which should be sufficient for most people with limited linux/*nix experience to test it out.
I’ll try to put together a coherent example using this at some point, and I’ll post any development news in here as well. I also plan to incorporate WSDL, just as soon as I read up on that part of SOAP::Lite.
Now I’m off to look at cars with my girlfriend. 🙂