Lookup Tables problem

1. Describe your incident:
Could someone help me? I can’t find the solution to my problem. I just want to write an integer into my dynamic lookup table, but I still only get 0 entries in my database. I would appreciate it, if someone could help me please.

This is how my Lookup Tables, Caches, Adapter, Rules and so on look like






2. Describe your environment:

  • OS Information:
    Windows
  • Package Version:
    6.0.3

Hello @roaringkitty,

Are you able to manually add keys and values to this LUT and can you see anything in the logs related to the rule you created?

If you mean it that way, I didn’t get any entries. I also looked into the server log files, but I didn’t find any of that or any errors either.


@roaringkitty I ran a quick test using the the rule simulator

When checking the data adapter for the key name I tested with I can see the results have been written to Mongo.

What if you create variables that contain “hello” and “byebye” and use those variables within the value part of your lookup_set_string_list functions.

Hey Wine could you show me please your caches and lookup Table too ? how did.

Because i wrote the exact same rule like you but i did not get an entrie. i would appreciate it ! Thanks for helping me

Below is a copy paste of the test rule just in case and after that are my cache and LUT config, I kept everything as default.

rule "lookup mongo test"

when
true
then

let test = to_string($message.message);

lookup_add_string_list(
    lookup_table: "test2",
    key: "test2",
    value: [test]
    );
end


First, thanks. Now I get some entries into my database, but only when I run a simulation. For example, I run a simulation and receive the entries, but when I generate downtime and get the log file into my Graylog and use that rule, I want to save the value of start_epoch, but it’s not being added to my database entry. I don’t know why.

Rule

New Log File


Data Adapter

Could you show the pipeline configuration this rule is associated with and confirm that pipeline is attached to the stream the message is routed to.

Also please confirm your process order is as below.

I hope these screenshots provide you with enough information. Thanks in advance

I’m not seeing anything that outwardly is incorrect, could you try with the rule in stage 0 just to make sure messages are making it to stage one.

Also for the purpose of that test make the when clause just ‘true’.

"Stage 2 must occur before Stage 3 (which involves writing the start and end epochs into the lookup table). This is because Stage 2 parses the date into an epoch, which is why it needs to be completed before Stage 3. I’ve already tried using set_field("true", true); to see if it passes the when statement and proceeds to the lookup_add_string_list.

Tricky one, I would introduce the debug function just to see if the fields you are attempting to add to the LUT contain data.

Also upon having a second look at the screenshots you sent it does appear that the downtime rule is having errors processing, what would those be?

Yes, I’m going to have a look at it! I appreciate your help, buddy

1 Like

I don’t know exactly how I did it, but now I have some entries in my database! Thanks a lot again for your help.

:handshake:

Great work all around!

1 Like

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