Statsfeeder is a tool that enables performance metrics to be retrieved from vCenter and sent to multiple destinations, including 3rd party systems.
The goal of StatsFeeder is to make it easier to collect statistics in a scalable manner. The user specifies the statistics to be collected in an XML file, and StatsFeeder will collect and persist these stats. The default persistence mechanism is comma-separated values, but the user can extend it to persist the data in a variety of formats, including a standard relational database or Key-value store. StatsFeeder is written leveraging significant experience with the performance APIs, allow the metrics to be retrieved in the most efficient manner possible.
For more information on Statsfeeder it’s purpose and operation, please see the “VMware Technical Journal: Vol. 1″ where it is extensively described.
JRE 1.6 or higher
StatsFeeder provides a set of Java classes for retrieving stats in a scalable manner for a given vSphere installation.
The statistics to be collected are specified in an .xml configuration file, along with the source vSphere entities and the destination. Instructions on how to edit the sample configuration file are provided within the file itself. To get you started we have included a sample configuration file called sampleConfig.xml, which has the following properties:
- Output all statistics to a CSV file called output.csv
- Provide statistics output every 10 minutes, and roll the output files every hour
- Metrics are retrieve for real-time data over the vCenter inventory for both hosts and VMs. A basic set of metrics are specified
The package includes the .jar file, a sample .xml configuration file, a shell script for running StatsFeeder on Linux, and a .bat file for running StatsFeeder on Windows..
The .jar file includes classes for retrieving data and storing them to a .csv file.
To use StatsFeeder, you can simply use the shell script or .bat file directly (directions below in "How to run").
How to Run:
- Unzip the attached .zip file.
- Linux (or Cygwin on Windows): Execute command "StatsFeeder.sh -h [vcenterserver] -u [username] -p [password] -c [configfile]"
- Windows: Execute command "StatsFeeder.bat -h [vcenterserver] -u [username] -p [password] -c [configfile]"
- StatsFeeder.sh -h 10.28.140.70 -u Administrator -p password -c sfconfig.xml
- StatsFeeder.bat -h my-vcenter-ip.vmware.com -u root -p "" -c pconfig.xml
- StatsFeeder.sh -h 10.28.140.47 -u guest -p guest -c /home/user/workspace/sfconfig.xml
- StatsFeeder.sh -h 10.28.140.147 -u Administrator -p password - csampleConfig.xml