Refine your search:

I am using the Manager to set-up a saved search/alert. Splunk runs a script every so often with an output like this:

Active channel: primary channel

If "primary" ever changes to "backup", it alerts us via e-mail. "primary" is in a field called "ent_status".

In the manager, I created a search like this:

sourcetype="echk" ent_channel=backup 

Using the menus-for-dummies, I told it "if number of events is greater than 0", send us an e-mail. Works great.

But now I may be using a third party app to throttle the alerts (see my other question from earlier this morning). I need to re-format my alert to put into the "if custom condition is met" field.

I'm having trouble doing this because "ent_channel" isn't an integer; I don't know how to do a compare. How do I translate "if number of events is greater than zero" into a search/alert command?

I have the feeling I'm making this harder than it really is.

Thank you very much.

asked 13 Sep '10, 13:43

Branden's gravatar image

Branden
4951114
accept rate: 19%


One Answer:
| stats count | where count>0
link

answered 13 Sep '10, 13:58

ziegfried's gravatar image

ziegfried ♦
7.2k1315
accept rate: 53%

Now that was easy, heh. Thanks!

(13 Sep '10, 14:21) Branden
Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×200
×173

Asked: 13 Sep '10, 13:43

Seen: 777 times

Last updated: 13 Sep '10, 13:58

Copyright © 2005-2012 Splunk, Inc. All rights reserved.