Skip to content

Instantly share code, notes, and snippets.

@vector4wang
Last active June 24, 2019 06:24
Show Gist options
  • Save vector4wang/9f5056c9c9b38610b1d7c6656c0836f0 to your computer and use it in GitHub Desktop.
Save vector4wang/9f5056c9c9b38610b1d7c6656c0836f0 to your computer and use it in GitHub Desktop.
[logstash check empty] #Logstash
if [serviceContexts] and [serviceContexts][0] {
# array has at least one element
} else {
# array has no elements
}
if ![http_body][json] or !([http_body][json] =~ ".+")
if ("" in [foo])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment