Activity Feed
- Posted Re: Alert triggered script produces different results from a CLI triggered script on Alerting. 08-05-2016 07:56 AM
- Posted Alert triggered script produces different results from a CLI triggered script on Alerting. 08-04-2016 07:56 AM
- Tagged Alert triggered script produces different results from a CLI triggered script on Alerting. 08-04-2016 07:56 AM
- Tagged Alert triggered script produces different results from a CLI triggered script on Alerting. 08-04-2016 07:56 AM
- Tagged Alert triggered script produces different results from a CLI triggered script on Alerting. 08-04-2016 07:56 AM
- Posted Re: How to use erex in a CLI search on Splunk Search. 08-03-2016 11:04 AM
- Posted How to use erex in a CLI search on Splunk Search. 05-22-2016 03:11 PM
- Tagged How to use erex in a CLI search on Splunk Search. 05-22-2016 03:11 PM
- Tagged How to use erex in a CLI search on Splunk Search. 05-22-2016 03:11 PM
- Tagged How to use erex in a CLI search on Splunk Search. 05-22-2016 03:11 PM
- Tagged How to use erex in a CLI search on Splunk Search. 05-22-2016 03:11 PM
Topics I've Started
Subject | Karma | Author | Latest Post |
---|---|---|---|
0 | |||
0 |
08-05-2016
07:56 AM
I figured it out. Running from the CLI with the splunk user, the CLI search picks up the auth token in .splunk for that user. When the script is triggered by an alert, the auth token isn't checked.
I created a limited user with access to run the search I needed and added an -auth 'user:pass' to the script. That seems to solve the problem.
... View more
08-04-2016
07:56 AM
I have several scheduled alerts set to trigger a script on every run. The scripts run CLI searches, and dump the output into our ticketing system.
The scripts are triggering as expected, but the results from the alert triggered scripts are coming back with no data. However, when I trigger the same script manually for the same time frame, I get the results I expect.
In the most recent test, I set the alert to trigger within a less than a minute of me running the script from the CLI. The window was set to 24 hours, and the alert triggered version produced a 0 byte file, and the CLI triggered version produced a 40kb file.
Does anyone know why these differences might be showing up?
The permissions are the same, I'm running the script from the CLI as the splunk user, and I'm using the same script in both the alert and the CLI.
... View more
08-03-2016
11:04 AM
Thanks jkat54! That worked perfectly. Sorry for the delayed reply, work got in the way of work.
... View more
05-22-2016
03:11 PM
I'm running into an issue with the syntax for a CLI search using erex.
The problem seems to be with the double quotes. I've tried single quoting the erex examples and counter examples, but none of it seems effective.
This search works in the GUI:
index=name searchterm NOT otherterm |erex message examples="/foo/bar,/foobar" counterexamples="barfoo, foobar" |table item1,item2,item3,item4,item5 |uniq |sort item3
In the CLI, I've tried it a couple of different ways, and the closest I've gotten to a working search is:
index=name searchterm NOT otherterm |erex message examples='/foo/bar,/foobar' counterexamples='barfoo, foobar' |table item1,item2,item3,item4,item5 |uniq |sort item3
the CLI search results in "INFO: No matching fields exist"
Do any of you know what I'm doing wrong here?
Thanks!
... View more