Hi @fbaligand
I tried the folliwing but it creates no luck. what is that I am doing wrong here ?
grok{
match => { "message" => "%{DATA:logDate} %{NUMBER:logLineId} %{TIME:myTime} %{NOTSPACE:device}\(%{NUMBER:unUsed2}\) %{WORD:level}: %{GREEDYDATA:data}"}
}
date {
match => [logDate,"yyyy-MM-dd HH:mm:ss"]
target => "@timestamp"
}
if [device] == "timeman" and [level] == "Note" {
grok {
match => {"data" => "NtpdateWrapper:: StartNtpdateProcess:ntpdate try ntp server: asia.pool.ntp.org"}
add_tag => ["throttled"]
}
if "throttled" in [tags]{
throttle {
before_count => 7
after_count => 10
period => 600
max_age => 1200
key => {"data" => "NtpdateWrapper:: StartNtpdateProcess:ntpdate try ntp server: asia.pool.ntp.org"}
add_tag => "throttled22"
}
}
}
When I pass in the log as follows with stdin it all falls within the tag .
Sat Feb 04 17:20:01 UTC 2017 -
2017-02-04 17:20:01 20710 20:19:58.583 superman(173) Debug: TInputService.cpp:OnApplicationStateChanged application:id=2:pid=-1 stopped
2017-02-04 17:20:01 20711 20:19:58.584 sysman(157) Note: Applications have shut down - now unloading platform
2017-02-04 17:20:01 20712 20:19:58.584 sysman(157) Note: Stopping platform
Sat Feb 04 17:25:21 UTC 2017 -
2017-02-04 17:25:21 20713 20:25:21.251 timeman(170) Note: NtpdateWrapper:: StartNtpdateProcess:ntpdate try ntp server: asia.pool.ntp.org
2017-02-04 17:25:21 20714 20:25:21.251 timeman(170) Note: NtpdateWrapper:: StartNtpdateProcess:Calling /usr/sbin/ntpdate -q -p 1 asia.pool.ntp.org
Sat Feb 04 17:39:46 UTC 2017 -
2017-02-04 17:39:46 20715 20:39:44.213 timeman(170) Note: NtpdateWrapper:: StartNtpdateProcess:ntpdate try ntp server: asia.pool.ntp.org
2017-02-04 17:39:46 20716 20:39:44.213 timeman(170) Note: NtpdateWrapper:: StartNtpdateProcess:Calling /usr/sbin/ntpdate -q -p 1 asia.pool.ntp.org
Sat Feb 04 17:43:46 UTC 2017 -
2017-02-04 17:43:46 20717 20:43:44.224 timeman(170) Note: NtpdateWrapper:: StartNtpdateProcess:ntpdate try ntp server: asia.pool.ntp.org
2017-02-04 17:43:46 20718 20:43:44.224 timeman(170) Note: NtpdateWrapper:: StartNtpdateProcess:Calling /usr/sbin/ntpdate -q -p 1 asia.pool.ntp.org
Sat Feb 04 17:53:46 UTC 2017 -
2017-02-04 17:53:46 20717 20:43:44.224 timeman(170) Note: NtpdateWrapper:: StartNtpdateProcess:ntpdate try ntp server: asia.pool.ntp.org
2017-02-04 17:53:46 20718 20:43:44.224 timeman(170) Note: NtpdateWrapper:: StartNtpdateProcess:Calling /usr/sbin/ntpdate -q -p 1 asia.pool.ntp.org
Sat Feb 04 18:18:46 UTC 2017 -
2017-02-04 18:18:46 20717 20:43:44.224 timeman(170) Note: NtpdateWrapper:: StartNtpdateProcess:ntpdate try ntp server: asia.pool.ntp.org
2017-02-04 18:88:46 20718 20:43:44.224 timeman(170) Note: NtpdateWrapper:: StartNtpdateProcess:Calling /usr/sbin/ntpdate -q -p 1 asia.pool.ntp.org
Sat Feb 04 18:23:46 UTC 2017 -
2017-02-04 18:23:46 20717 20:43:44.224 timeman(170) Note: NtpdateWrapper:: StartNtpdateProcess:ntpdate try ntp server: asia.pool.ntp.org
2017-02-04 18:23:46 20718 20:43:44.224 timeman(170) Note: NtpdateWrapper:: StartNtpdateProcess:Calling /usr/sbin/ntpdate -q -p 1 asia.pool.ntp.org
Sat Feb 04 18:31:46 UTC 2017 -
2017-02-04 18:31:46 20717 20:43:44.224 timeman(170) Note: NtpdateWrapper:: StartNtpdateProcess:ntpdate try ntp server: asia.pool.ntp.org
2017-02-04 18:31:46 20718 20:43:44.224 timeman(170) Note: NtpdateWrapper:: StartNtpdateProcess:Calling /usr/sbin/ntpdate -q -p 1 asia.pool.ntp.org
Ideally what I looking for is if the log line with ntpdatewrapper occurs for more than 8 times / 10 times it should be identified by logstash shouldbe ingested to ELK from where I will create an alert for the incident.
Can you tell me what am I doing wrong here ?