Name: logstash-input-perfmon
Owner: Logstash Plugins
Description: null
Created: 2015-06-08 14:53:03.0
Updated: 2018-04-06 22:32:47.0
Pushed: 2018-04-06 22:32:46.0
Homepage: null
Size: 29
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a plugin for Logstash.
It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
On Windows, performance metrics can be collected using Windows Performance Monitor. This plugin collects the same sort of counters by using the command-line tool Typeperf.
To run the tests (be sure that JRuby is installed prior):
clone https://github.com/logstash-plugins/logstash-input-perfmon.git
ogstash-input-perfmon
y -S gem install bundler
y -S bundle install
y -S bundle exec rake
To build the gem:
build logstash-input-perfmon.gemspec
To install the gem to logstash:
ath\to\logstash\bin
in install path\to\gem
If you aren't building the gem yourself, you can install it directly from rubygems.org:
ath\to\logstash
gstash 2.3 and higher
logstash-plugin install --no-verify logstash-input-perfmon
ior to Logstash 2.3
plugin install --no-verify logstash-input-perfmon
Create a configuration file. The following collects three metrics every ten seconds:
t {
rfmon {
interval => 10
counters => [
"\Processor(_Total)\% Privileged Time",
"\Processor(_Total)\% Processor Time",
"\Processor(_Total)\% User Time"]
er {
ok {
match => {
"message" => "%{DATESTAMP:Occurred},%{NUMBER:PrivilegedTime:float},%{NUMBER:ProcessorTime:float},%{NUMBER:UserTime:float}"
}
ut {
le {
path => "C:\perfmon_output.txt"
Run logstash:
tash -f C:\path\to\conf
This configuration will produce output like:
essage":"06/05/2015 15:40:46.999,0.781236,7.032877,6.249891",
version":"1",
timestamp":"2015-06-05T19:40:48.468Z",
ost":"Webserver1",
ccurred":"06/05/2015 15:40:46.999",
rivilegedTime":0.781236,
rocessorTime":7.032877,
serTime":6.249891
If you get bundler errors having to do with not being able to install a gem, such as:
have requested:
gstash-devutil >= 0
bundle currently has logstash-devutil locked at 0.0.13.
running 'bundle update logstash-devutils'
The JRuby -S parameter looks at your PATH and it may be defaulting to another version of Ruby. You can temporarily add the JRuby bin folder to the beginning of your PATH to fix this.