powered by Jive Software

Seeking Simple Smack command line utility

I want to using Jive plus the Broadcast plugin to forward messages from our server monitoring software to our helpdesk.

Just a command line thingy that would run on the monitoring server, and send the event (“ping failed to to server xxx”) to all@broadcast.myserver.

I know this is simple, but I’'m not a great programmer and have to figure someone has done this before.

Anybody want to share code?

Thanks!

Leon

ladato@telsource.com

For anyone else who is interested, I was able to get a friend to write up the java code for this application. The code is primitive, and assumes you are going to hard-code the server name and group name into the actual file. I’'m sure smarter minds out there can modify it to take the server, group, etc as input. For now, anything with double-brackets (<< and >>) needs to be replaced with your information.

public static void main(String[] args)

{

if (args.length < 1)

{

System.out.println(“Please enter a message to send”);

System.exit(1);

}

String msg = args[0];

System.out.println(“Sending :” + msg + “:”);

try

{

XMPPConnection connection = new XMPPConnection("<>");

connection.login("<>", “<>”);

connection.createChat("<>@broadcast.<>").sendMessage(msg);

connection.close();

}

catch (Exception e)

{

e.printStackTrace();

System.exit(1);

}

}