Skip to content

Commit

Permalink
implemented a new input - <exec command="ps"...> which runs new proce…
Browse files Browse the repository at this point in the history
…sses

and interprets their output as metrics. Removed eclipse files and added them to the ignores.
  • Loading branch information
dimovelev committed Apr 19, 2013
1 parent 15d9977 commit 2fc23e0
Show file tree
Hide file tree
Showing 68 changed files with 566 additions and 723 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
target/
bin/
.project
.settings/
.classpath

17 changes: 0 additions & 17 deletions .project

This file was deleted.

4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: java
jdk:
- oraclejdk7
install: mvn clean package -pl .,metrics-sampler-core,metrics-sampler-extension-apache-status,metrics-sampler-extension-base,metrics-sampler-extension-graphite,metrics-sampler-extension-jdbc,metrics-sampler-extension-jmx,metrics-sampler-extension-redis,metrics-sampler-extension-webmethods -Dmaven.test.skip=true
script: mvn test -pl .,metrics-sampler-core,metrics-sampler-extension-apache-status,metrics-sampler-extension-base,metrics-sampler-extension-graphite,metrics-sampler-extension-jdbc,metrics-sampler-extension-jmx,metrics-sampler-extension-redis,metrics-sampler-extension-webmethods -Dmaven.test.skip=true
install: mvn clean package -pl .,metrics-sampler-core,metrics-sampler-extension-apache-status,metrics-sampler-extension-base,metrics-sampler-extension-graphite,metrics-sampler-extension-jdbc,metrics-sampler-extension-jmx,metrics-sampler-extension-redis,metrics-sampler-extension-webmethods,metrics-sampler-extension-exec -Dmaven.test.skip=true
script: mvn test -pl .,metrics-sampler-core,metrics-sampler-extension-apache-status,metrics-sampler-extension-base,metrics-sampler-extension-graphite,metrics-sampler-extension-jdbc,metrics-sampler-extension-jmx,metrics-sampler-extension-redis,metrics-sampler-extension-webmethods,metrics-sampler-extension-exec -Dmaven.test.skip=true

20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ Check out the following configuration as a quick-start:

<!-- Provide self-monitoring metrics of the application - statistics about every sampler, thread-pool and jdbc connection pool utilizations, etc. -->
<self name="self" />
<!-- Execute 'cmd /C "echo %METRIC%=28"' in the current working directory, passing it METRIC=a.b.c as environment (additionally to the current processes' environment) and
parsing the output as metrics. In this case always the metric "a.b.c" with value "28". You could also provide a working directory with attribute named directory -->
<exec name="exec1" command="cmd">
<arguments>
<argument>/C</argument>
<argument>echo %METRIC%=28</argument>
</arguments>
<environment>
<entry key="METRIC" value="a.b.c" />
</environment>
</exec>
</inputs>
<outputs>
<!-- Write to the standard output -->
Expand Down Expand Up @@ -205,6 +217,11 @@ Check out the following configuration as a quick-start:
<regexp from-name="ServerStats\.Memory\.(.+)" to-name="${input.name}.memory.${name[1]}" />
</selectors>
</sampler>
<sampler input="exec1" interval="10">
<selectors>
<regexp from-name="(.*)" to-name="${name[1]}" />
</selectors>
</sampler>
</samplers>
</configuration>

Expand All @@ -222,6 +239,7 @@ Supported Inputs
* redis - executes the info command using jedis and exposes the parsed values as metrics. Keeps the connection until a failure is detected.
* self - expose metrics on the samplers and the input readers
* webmethods - fetch diagnostics data over HTTP from a running webmethods instances, parse the runtime files in it and expose the data as metrics
* exec - execute process and parse its standard output / error looking for metrics in the form [<timestamp>:]<name>=<value>

Supported Selectors
-------------------
Expand Down Expand Up @@ -279,7 +297,7 @@ Publishing new versions to maven central
========================================
* Release the project using mvn release:prepare, mvn release:perform
* Switch to the released tag using git checkout v<VERSION>
* Build and deploy the artifacts to sonatype mvn clean deploy -Dgpg.passphrase="YOUR GPG PASS" -Dmaven.test.skip=tru -P publish
* Build and deploy the artifacts to sonatype mvn clean deploy -Dgpg.passphrase="YOUR GPG PASS" -Dmaven.test.skip=true -P publish
* Switch back to master using git checkout master
* Close and release the repository at oss.sonatype.org
* Push the changes to github. Also push the tags.
Expand Down
36 changes: 0 additions & 36 deletions metrics-sampler-core/.classpath

This file was deleted.

23 changes: 0 additions & 23 deletions metrics-sampler-core/.project

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions metrics-sampler-core/.settings/org.eclipse.jdt.core.prefs

This file was deleted.

4 changes: 0 additions & 4 deletions metrics-sampler-core/.settings/org.eclipse.m2e.core.prefs

This file was deleted.

17 changes: 0 additions & 17 deletions metrics-sampler-distribution/.project

This file was deleted.

This file was deleted.

This file was deleted.

31 changes: 0 additions & 31 deletions metrics-sampler-extension-apache-status/.classpath

This file was deleted.

23 changes: 0 additions & 23 deletions metrics-sampler-extension-apache-status/.project

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

31 changes: 0 additions & 31 deletions metrics-sampler-extension-base/.classpath

This file was deleted.

23 changes: 0 additions & 23 deletions metrics-sampler-extension-base/.project

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

35 changes: 35 additions & 0 deletions metrics-sampler-extension-exec/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.github.dimovelev</groupId>
<artifactId>metrics-sampler</artifactId>
<version>0.5.8-SNAPSHOT</version>
</parent>
<artifactId>metrics-sampler-extension-exec</artifactId>
<dependencies>
<dependency>
<groupId>com.github.dimovelev</groupId>
<artifactId>metrics-sampler-core</artifactId>
<version>0.5.8-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit 2fc23e0

Please sign in to comment.