Help - Search - Members - Calendar
Full Version: SSH Class
Intellipool Network Monitor - Forum > Intellipool Network Monitor > Lua scripts
pdoyley
I would much rather use Lua to parse results rather than writting unique scripts on the 11 diffrent platfoms I maintain.
RA
I agree, will try to implement that a.s.a.p
pdoyley
That is great news. I have several items that require custom monitoring. These include raid controllers, voice cards, network interfaces, sms applications, IVR applications etc.

Thanks.

-Paul
RA
Here it is, if you download the development enviroment you can start to test your scripts. You need to wait for INM 3.0.5 to deploy them.

CODE

----------------------------------------------------------------------------------------------------------
-- Name: SSHTest.lua
-- Author: Intellipool AB
-- Description: Simple example of the SSH 2.0 client
----------------------------------------------------------------------------------------------------------
SSHClient = TLuaSSH2Client:new();
SSHClient:Open(22,"testuser","testpassword");

if SSHClient:ExecuteCommand("ls -l") == true then
    print(SSHClient:GetStdOut());
    SetExitStatus("Exec ok",true);    
else
    print(SSHClient:GetStdErr());
    print(SSHClient:GetErrorDescription());
    SetExitStatus("Exec failed",false);    
end
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.