views:

156

answers:

2

Are there any libraries (perl, python, ruby, etc) or other means of formatting the output of shell commands to a structured data format like JSON or XML to be processed by another application?

Use case: Bunch of CentOS servers on a network. I'd like to programatically login to them via SSH, run commands to obtain system stats and eventually run basic maintenance commands. Instead of parsing all the text output myself I'm wondering if there is anything out there will help me return the data in a structured format? Even if only some shell commands were supported that would be a head start.

A: 

Sounds like the task for SNMP.

ADEpt
A: 

Check out Nagios (http://www.nagios.org/) for remote system monitoring. What you are looking for may already exist out there.

lothar
nagios would answer the monitoring part but what if I wanted to install software using Yum or Apt-Get? Really just looking for an automated shell scripting system or lightweight config management without having to go all the way down the puppet route...