Last active
April 26, 2020 16:53
-
-
Save iamhowardtheduck/c07bcf2aa93a74f4498d75a8799a23c3 to your computer and use it in GitHub Desktop.
Logstash Math Filter Plugin Install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/robin13/logstash-filter-math.git && cd logstash-filter-math/ && yum install gem* -y && gem build logstash-filter-math.gemspec && /usr/share/logstash/bin/logstash-plugin install --no-verify && /usr/share/logstash/bin/logstash-plugin install logstash-filter-math && service logstash restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example of the filter in action: (note the field listed in Discover is "Countries.TotalConfirmed")
math { calculate => [
[ "sub", "[Countries][TotalConfirmed]", "[Countries][NewConfirmed]", "[Countries][PriorConfirmed]" ],
[ "div", "[Countries][PriorConfirmed]", "[Countries][NewConfirmed]", "[Countries][PercentChanged]" ]]
}