Skip to content

Commit

Permalink
Public release + InfluxDB support
Browse files Browse the repository at this point in the history
  • Loading branch information
syepes committed Jun 5, 2015
1 parent 83beb60 commit 21dabd1
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 9 deletions.
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 1.5.0 (2015-06-06)
- Add InfluxDB support and upgrade MetricClient
- First public release

# 1.4.1 (2015-06-06)
- Fix build order

# 1.4.1 (2015-06-04)
- Metrics retrieval TimeOut
- logback config fixes

# 1.4.0 (2014-04-22)
- Collect ESXi Events and upgrade MetricClient

# 1.3.0 (2014-04-07)
- Use MetricClient and support pickle format

# 1.2.0 (2014-04-05)
- Minor fixes and Groovy/vijava upgrade

# 1.1.1 (2013-03-04)
- Catch empty Hosts/VMs

# 1.1.0 (2013-02-19)
- CliBuilder parameters

# 1.0.4 (2013-01-30)
- Take into account the execution time (lastExecTime)

# 1.0.3 (2012-07-02)
- Collect Host metrics

# 1.0.2 (2012-06-28)
- Daemonize, created config file and other fixes

# 1.0.1 (2012-06-21)
- Added parallel vCenter collecting

# 1.0.0 (2012-06-06)
- Initial version

4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apply plugin:'groovy'
apply plugin:'distribution'

def projectName = 'vSphere2Graphite'
def projectName = 'VSphere2Metrics'
description = "$projectName - ESXi Performance Metric Integration with Graphite & InfluxDB"

group = 'com.allthingsmonitoring.vmware.vSphere2Graphite'
group = 'com.allthingsmonitoring.vmware.VSphere2Metrics'
archivesBaseName = projectName
distsDirName = 'dist'
version = '1.5'
Expand Down
4 changes: 2 additions & 2 deletions src/dist/vSphere2Graphite → src/dist/VSphere2Metrics
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cd /opt/vSphere2Graphite
cd /opt/VSphere2Metrics
export JAVA_HOME=/usr/java/latest
export PATH=$JAVA_HOME/bin:$PATH:.

Expand All @@ -10,4 +10,4 @@ export PATH=$JAVA_HOME/bin:$PATH:.
# Java 8
export JAVA_OPTS="-d64 -server -Xms1g -Xmx5g -verbose:gc -XX:+UseG1GC -XX:+UseStringDeduplication -XX:StringDeduplicationAgeThreshold=4 -XX:ConcGCThreads=8 -XX:ParallelGCThreads=8 -XX:SurvivorRatio=8 -XX:G1ReservePercent=15 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:InitiatingHeapOccupancyPercent=25 -XX:MaxGCPauseMillis=500 -XX:G1HeapRegionSize=32 -XX:+UseFastAccessorMethods -XX:+UseCompressedOops -XX:+AggressiveOpts -XX:+ExplicitGCInvokesConcurrent -XX:+ScavengeBeforeFullGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -XX:+PrintStringDeduplicationStatistics -Xloggc:$PWD/logs/gc_`date +%Y%m%d-%H%M%S`.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$PWD/logs/dump_`date +%Y%m%d-%H%M%S`.hprof"

java $JAVA_OPTS -Dpid=$$ -Dapp.env=PROD -jar $PWD/vSphere2Graphite-1.4.jar $* 2>&1 |tee -a logs/vSphere2Graphite_console.log
java $JAVA_OPTS -Dpid=$$ -Dapp.env=PROD -jar $PWD/VSphere2Metrics-1.5.jar $* 2>&1 |tee -a logs/VSphere2Metrics_console.log
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import com.allthingsmonitoring.utils.MetricClient


@Slf4j
class vSphere2Graphite {
class VSphere2Metrics {
TimeDuration lastExecTime = new TimeDuration(0, 0, 0, 0)
TimeDuration startFromExecTime = new TimeDuration(0, 0, 0, 0)

Expand All @@ -54,7 +54,7 @@ class vSphere2Graphite {
/**
* Constructor
*/
vSphere2Graphite(String cfgFile='config.groovy') {
VSphere2Metrics(String cfgFile='config.groovy') {
cfg = readConfigFile(cfgFile)
Attributes manifest = getManifestInfo()
log.info "Initialization: Class: ${this.class.name?.split('\\.')?.getAt(-1)} / Collecting samples: ${cfg?.vcs?.perf_max_samples} = ${cfg?.vcs?.perf_max_samples * 20}sec / Version: ${manifest?.getValue('Specification-Version')} / Built-Date: ${manifest?.getValue('Built-Date')}"
Expand Down Expand Up @@ -803,6 +803,7 @@ class vSphere2Graphite {
}
break
case ~/^(sys)\..*/:
// TODO: Implement
return
break
default:
Expand Down Expand Up @@ -1149,7 +1150,7 @@ class vSphere2Graphite {
if (!opt) { return } else if (opt.h | opt.arguments().size() != 0) { cli.usage(); return }

try {
def main = new vSphere2Graphite()
VSphere2Metrics main = new VSphere2Metrics()

// Parse 'Start from' parameter
if (opt.sf) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/logback.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import ch.qos.logback.classic.LoggerContext
import java.lang.management.ManagementFactory


String baseName = 'vSphere2Graphite'
ArrayList classNames = ['com.allthingsmonitoring.vmware.vSphere2Graphite','com.allthingsmonitoring.utils.MetricClient']
String baseName = 'VSphere2Metrics'
ArrayList classNames = ['com.allthingsmonitoring.vmware.VSphere2Metrics','com.allthingsmonitoring.utils.MetricClient']
Map defaultLevels = setLoggerLevels()

if (System.properties['app.env']?.toUpperCase() == 'DEBUG'){ statusListener(OnConsoleStatusListener) }
Expand Down

0 comments on commit 21dabd1

Please sign in to comment.