Hi @spinscale again!
So, I ran the query below outside the watcher and I get an error (of course).
{
"query": {
"wildcard": {
"command": [
"*systeminfo*",
"*ipconfig*",
"*tasklist*"
]
}
}
}
The aim of the query is to bring back any message that have any of the following strings: systeminfo, ipconfig, tasklist.
The reason I need the wildcard is because there may be something additonal such as "systeminfo | findstr /B /C:”OS Name” /C:”OS Version”"
And just searching for "systeminfo" as a term wouldn't bring this back.
If any of these events inside the command field match the query I want it to execute.
This is the error I get:
{
"error": {
"root_cause": [
{
"type": "illegal_state_exception",
"reason": "Can't get text on a START_ARRAY at 4:32"
}
],
"type": "illegal_state_exception",
"reason": "Can't get text on a START_ARRAY at 4:32"
},
"status": 500
}
I'm not sure if the wildcard is the right way to go around this.
I could use "should", but that would mean that it would execute regardless of if it matches.. Confused
This works and brings back the correct results, but it is only for one. I need a list of possible commands and Im not sure how to achieve it.
{
"query": {
"wildcard": {
"command": "*systeminfo*"
}
}
}
Also please note that this works...
{
"query": {
"terms": {
"command": [
"systeminfo",
"ipconfig",
"tasklist"
]
}
}
}