We have updated our Terms of Service, Code of Conduct, and Addendum.

Query about global variable behavior with event values


Hi All Regarding global variables, specifically string/array types, do they need to use/compare against values from an event, or can they maintain a static value from the definition of the global variable itself? Our use case: We have the three Redis hosts in our Sentinel config. We want to implement the Cribl Redis function across multiple sources in the environment, but to manage the host list/credentials in all of those separate Redis functions would be a nightmare. Can we use global variables to store the host list (either multiple string variables or an array that can be accessed based on index value), and then reference it in the Redis function's host fields using something akin to the below? `C.vars.prod_list[0] <-- first host value` `C.vars.prod_list[1] <-- second host value` `C.vars.prod_list[2] <-- third host value` Example in Redis (doesn't work, even with all the types of access I tried, in this example the array global variable type):