Hello guys,
I'm having a problem where I have been stuck for the past 3 days if you would be able to help me I would appreciate very much
I'm trying to filter logs coming from openstack more precisely from the nova service, but I want to ignore logs that came with the word DEBUG or INFO, so, up untill now this is my configuration:
/etc/logstash/conf.d/01-logstash-beats-input.conf:
input {
beats {
port => 5044
ssl => true
ssl_certificate => "/etc/pki/tls/certs/logstash.crt"
ssl_key => "/etc/pki/tls/private/logstash.key"
}
}
/etc/logstash/conf.d/15-openstack-filter.conf
filter {
grok {
match => [ "message", "%{DATE:date} %{TIME:time} %{POSINT:openstack_pid} %{LOGLEVEL:loglevel}" ]
patterns_dir => ["/etc/logstash/conf.d/patterns"]
}
}
/etc/logstash/conf.d/30-elasticsearch-output.conf
output {
elasticsearch {
hosts => "localhost:9200"
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
}
}
The grok file:
/etc/logstash/conf.d/patterns/grok
OPENSTACK_PID ( %{POSINT:pid:int})?
LOGLEVEL ([A-a]lert|ALERT|[A-a]udit|AUDIT|[T|t]race|TRACE|[D|d]ebug|DEBUG|[N|n]otice|NOTICE|[W|w]arn?(?:ing)?|WARN?(?:ING)?|[E|e]rr?(?:or)?|ERR?(?:OR)?|[C|c]rit?(?:ical)?|CRIT?(?:ICAL)?|[F|f]atal|FATAL|[S|s]evere|SEVERE|EMERG(?:ENCY)?|[Ee]merg(?:ency)?)
Example of logs:
2019-05-23 11:23:08.623 19643 INFO nova.api.openstack.placement.requestlog [req-70f52a92-06a1-44b5-8a3a-268d0d8fac3b 8f5dcc068c684184b31f45ea62e09d74 cd495fc09f024f38aba7565fe1041b50 - default default] 192.0.2.1 "GET /placement/resource_providers/a9714c16-c34b-46a8-95dd-8dd28ec1ba33/inventories" status: 200 len: 514 microversion: 1.0
2019-05-23 11:23:35.008 5478 ERROR oslo_db.sqlalchemy.engines File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 856, in query
2019-05-23 11:23:35.008 5478 ERROR oslo_db.sqlalchemy.engines self._affected_rows = self._read_query_result(unbuffered=unbuffered)
Up untill now Kibana is showing me everything, ERROR INFO, everything when I'm trying to ignore at least the logs with INFO LOGLEVEL
Can anyone please help me?
Thank you
Best regards