Pipeline Not Working

I am having some issues getting a pipeline to work properly that I have had work on other builds and I cannot figure out why or what I’m missing. The pipeline is to parse the Hex code of a failed login to the reason it fails. My lookup table is working properly and I have the pipeline tied to the stream I am trying to run this against.

Server version is 3.3.17

rule "Windows: Event 4625 Cleanup"

when
    has_field("event_data_SubStatus") AND contains(to_string($message.event_id), "4625")
then
//Change Logon Code
  let update_source = lookup_value("winlogon_status_lookup", $message.event_data_Status);
  set_field("event_data_Status", update_source);
  let update_source = lookup_value("winlogon_status_lookup", $message.event_data_SubStatus);
  set_field("event_data_SubStatus", update_source);

end

image

Any thoughts or additional info you need to help troubleshoot? Any assistance is GREATLY appreciated.

When you say the tables are working properly, you mean you did a test lookup on the tables and received the results you wanted? Anything show up in the Graylog Server logs?

Quick thought - if Elasticsearch is storing the event_data_Status and event_data_SubStatus fields as a numeric and not Keyword, it may be rejecting the text you are trying to put in. An easy way to test that is to create new fields in your set_field() function.

  let update_source = lookup_value("winlogon_status_lookup", $message.event_data_Status);
  set_field("event_data_Status_txt", update_source);
  let update_source = lookup_value("winlogon_status_lookup", $message.event_data_SubStatus);
  set_field("event_data_SubStatus_txt", update_source);

Assuming I am guessing correctly and you wanted to look in depth into ElasticSearch, you could query the field type with something like:

curl -XGET http://<graylog_server>:9200/<index_name>/_mapping/field/event_data_Status?pretty
curl -XGET http://<graylog_server>:9200/<index_name>/_mapping/field/event_data_SubStatus?pretty
1 Like

Yes, I can do a test on the lookup table and it responds with what I’m expecting:

image

It’s almost like it’s not catching my when statement, though I don’t know why it would not be. I tried creating a new field as you suggested and that does nothing as well. this is the result I get from the Curl of event_data_Status:

The only thing I’m seeing in the server.log file is what appears to be a communications issue with one of my SideCars:

Argh. Check capitalization in the names? I usually say you can use the debug() function in the rule …

I can’t quite spot the issue yet…

What do you mean by use the debug() function?

Before you do the below… are you seeing any errors in your Graylog logs? The debug() messages will tell you what the values are. That might give you a window into what is going on.

Can you post the data in your table? Obfuscated if need be…

rule "Windows: Event 4625 Cleanup"

when
    has_field("event_data_SubStatus") AND contains(to_string($message.event_id), "4625")
then
//Change Logon Code
// use $ tail -f /var/log/graylog-server/server.log to watch for the results of the below debug messages

  debug("=======================================================================================================================");
  debug(concat("*_*_*_*-Before-$message.event_data_Status: ", to_string($message.event_data_Status)));
  
  let update_source = lookup_value("winlogon_status_lookup", $message.event_data_Status);
  set_field("event_data_Status", update_source);

  debug(concat("*_*_*_*resulting table: [update_source]: ", to_string(update_source))); 
  debug(concat("*_*_*_* -AFTER- $message.event_data_Status: ", to_string($message.event_data_Status)));

  debug("=======================================================================================================================");

  debug(concat("*_*_*_*-Before-$message.event_data_SubStatus: ", to_string($message.event_data_SubStatus)));

  let update_source = lookup_value("winlogon_status_lookup", $message.event_data_SubStatus);
  set_field("event_data_SubStatus", update_source);
  
  debug(concat("*_*_*_*resulting table: [update_source]: ", to_string(update_source))); 
  debug(concat("*_*_*_* -AFTER- $message.event_data_SubStatus: ", to_string($message.event_data_SubStatus)));
  debug("=======================================================================================================================");


end

I’m going to have to admit to being a complete newb. When you say data in my table, are you just looking for the contents of the csv file?

The only errors i seen in the graylog log is what looks like a communication issue with one of the sidecars, no other errors I can find.

I REALLY appreciate your help on this so far.

By data in the table I mean the table you are referencing in the pipeline code. You showed a screenshot of a test lookup of the table. :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.