I’m trying to set it up to receive alerts from the hours of 5PM to 8 AM.
I don’t know if this is possible. I tried to create different field called user_time but it just gave me all the users logged in for the day.
My Environment:
CentOS 7 Latest Version
Graylog 3.1.1+b39ee32
Elasticsearch-6.6.1-1.noarch
Mongodb-org-4.2.0
Working on the Pipeline rule and cannot seem to get it to work.
I have stream called “Windows: User Successful Logon to Computer” so all users logging in gets dumped in that stream (24/7)
Then I created a pipeline rule for users logging in between 5 and 12 and “trying” to route it to a stream called “User Has Logon Outside Business Hours”.
I tried two different ways to make this happen. The first attempt I had one stage and one rule
I’m still trying, I think my rule is misconfigure but dont know what could be wrong.
rule “Between 5 and 12”
when
to_long(is_date($message.timestamp).hourOfDay) >= 5 &&
to_long(is_date($message.timestamp).hourOfDay) <= 12
then
set_field(“time_alert”, true);
end
rule “route to stream”
when
has_field(“time_alert”)
then
route_to_stream(id:“5d78402683d72e7e4778f531”);
end
Any help or direction would be apperciated. Thanks