Skip to content

Commit

Permalink
- remove 'type' references and fix up style
Browse files Browse the repository at this point in the history
- use new time object comparison
  • Loading branch information
jordansissel committed Jun 19, 2013
1 parent c55b493 commit 684c070
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions spec/examples/graphite-input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,25 @@
grok {
pattern => "%{DATA:name} %{NUMBER:value:float} %{POSINT:ts}"
singles => true
type => "graphite"
}
date {
type => "graphite"
match => ["ts", UNIX]
}
mutate {
type => "graphite"
remove => ts
}
}
CONFIG

type "graphite"

sample 'foo.bar.baz 4025.34 1364606522' do
sample "foo.bar.baz 4025.34 1364606522" do
insist { subject }.include?("name")
insist { subject }.include?("value")

insist { subject["name"] } == "foo.bar.baz"
insist { subject["value"] } == 4025.34
insist { subject["@timestamp"] } == "2013-03-30T01:22:02.000Z"
insist { subject["@timestamp"] } == Time.iso8601("2013-03-30T01:22:02.000Z")

end
end

0 comments on commit 684c070

Please sign in to comment.