-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug][filebeat] system.auth
module grok fails for pam_unix
#34247
Comments
Another full example: {
"_index": ".ds-filebeat-8.5.3-2023.01.03-000001",
"_id": "REDACTED",
"_version": 1,
"_score": 0,
"_source": {
"input": {
"type": "log"
},
"agent": {
"name": "ip-REDACTED.REDACTED.compute.internal",
"id": "af433b61-1a37-4916-94f7-0e7d36f84d97",
"type": "filebeat",
"ephemeral_id": "c514d01a-c282-4c2b-a91c-09c05af19b35",
"version": "8.5.3"
},
"@timestamp": "2023-01-12T18:17:05.111Z",
"ecs": {
"version": "8.0.0"
},
"log": {
"file": {
"path": "/var/log/secure"
},
"offset": 25919
},
"service": {
"type": "system"
},
"@version": "1",
"host": {
"name": "ip-REDACTED.REDACTED.compute.internal"
},
"event": {
"ingested": "2023-01-12T18:17:06.882875402Z",
"original": "{\"@timestamp\":\"2023-01-12T18:17:05.111Z\",\"@metadata\":{\"beat\":\"filebeat\",\"type\":\"_doc\",\"version\":\"8.5.3\",\"pipeline\":\"filebeat-8.5.3-system-auth-pipeline\"},\"input\":{\"type\":\"log\"},\"fileset\":{\"name\":\"auth\"},\"agent\":{\"name\":\"ip-REDACTED.REDACTED.compute.internal\",\"type\":\"filebeat\",\"version\":\"8.5.3\",\"ephemeral_id\":\"c514d01a-c282-4c2b-a91c-09c05af19b35\",\"id\":\"af433b61-1a37-4916-94f7-0e7d36f84d97\"},\"ecs\":{\"version\":\"8.0.0\"},\"host\":{\"name\":\"ip-REDACTED.REDACTED.compute.internal\"},\"log\":{\"offset\":25919,\"file\":{\"path\":\"/var/log/secure\"}},\"message\":\"Jan 12 12:06:33 ip-REDACTED su: pam_unix(su-l:session): session closed for user root\",\"event\":{\"dataset\":\"system.auth\",\"module\":\"system\",\"timezone\":\"+00:00\"},\"service\":{\"type\":\"system\"}}",
"timezone": "+00:00",
"module": "system",
"dataset": "system.auth"
},
"fileset": {
"name": "auth"
},
"message": "Jan 12 12:06:33 ip-REDACTED su: pam_unix(su-l:session): session closed for user root",
"error": {
"message": "Provided Grok expressions do not match field value: [{\"@timestamp\":\"2023-01-12T18:17:05.111Z\",\"@metadata\":{\"beat\":\"filebeat\",\"type\":\"_doc\",\"version\":\"8.5.3\",\"pipeline\":\"filebeat-8.5.3-system-auth-pipeline\"},\"input\":{\"type\":\"log\"},\"fileset\":{\"name\":\"auth\"},\"agent\":{\"name\":\"ip-REDACTED.REDACTED.compute.internal\",\"type\":\"filebeat\",\"version\":\"8.5.3\",\"ephemeral_id\":\"c514d01a-c282-4c2b-a91c-09c05af19b35\",\"id\":\"af433b61-1a37-4916-94f7-0e7d36f84d97\"},\"ecs\":{\"version\":\"8.0.0\"},\"host\":{\"name\":\"ip-REDACTED.REDACTED.compute.internal\"},\"log\":{\"offset\":25919,\"file\":{\"path\":\"/var/log/secure\"}},\"message\":\"Jan 12 12:06:33 ip-REDACTED su: pam_unix(su-l:session): session closed for user root\",\"event\":{\"dataset\":\"system.auth\",\"module\":\"system\",\"timezone\":\"+00:00\"},\"service\":{\"type\":\"system\"}}]"
}
},
"fields": {
"event.original": [
"{\"@timestamp\":\"2023-01-12T18:17:05.111Z\",\"@metadata\":{\"beat\":\"filebeat\",\"type\":\"_doc\",\"version\":\"8.5.3\",\"pipeline\":\"filebeat-8.5.3-system-auth-pipeline\"},\"input\":{\"type\":\"log\"},\"fileset\":{\"name\":\"auth\"},\"agent\":{\"name\":\"ip-REDACTED.REDACTED.compute.internal\",\"type\":\"filebeat\",\"version\":\"8.5.3\",\"ephemeral_id\":\"c514d01a-c282-4c2b-a91c-09c05af19b35\",\"id\":\"af433b61-1a37-4916-94f7-0e7d36f84d97\"},\"ecs\":{\"version\":\"8.0.0\"},\"host\":{\"name\":\"ip-REDACTED.REDACTED.compute.internal\"},\"log\":{\"offset\":25919,\"file\":{\"path\":\"/var/log/secure\"}},\"message\":\"Jan 12 12:06:33 ip-REDACTED su: pam_unix(su-l:session): session closed for user root\",\"event\":{\"dataset\":\"system.auth\",\"module\":\"system\",\"timezone\":\"+00:00\"},\"service\":{\"type\":\"system\"}}"
],
"fileset.name": [
"auth"
],
"input.type": [
"log"
],
"log.offset": [
25919
],
"message": [
"Jan 12 12:06:33 ip-REDACTED su: pam_unix(su-l:session): session closed for user root"
],
"agent.hostname": [
"ip-REDACTED.REDACTED.compute.internal"
],
"service.type": [
"system"
],
"agent.type": [
"filebeat"
],
"event.ingested": [
"2023-01-12T18:17:06.882Z"
],
"@timestamp": [
"2023-01-12T18:17:05.111Z"
],
"event.module": [
"system"
],
"agent.id": [
"af433b61-1a37-4916-94f7-0e7d36f84d97"
],
"ecs.version": [
"8.0.0"
],
"error.message": [
"Provided Grok expressions do not match field value: [{\"@timestamp\":\"2023-01-12T18:17:05.111Z\",\"@metadata\":{\"beat\":\"filebeat\",\"type\":\"_doc\",\"version\":\"8.5.3\",\"pipeline\":\"filebeat-8.5.3-system-auth-pipeline\"},\"input\":{\"type\":\"log\"},\"fileset\":{\"name\":\"auth\"},\"agent\":{\"name\":\"ip-REDACTED.REDACTED.compute.internal\",\"type\":\"filebeat\",\"version\":\"8.5.3\",\"ephemeral_id\":\"c514d01a-c282-4c2b-a91c-09c05af19b35\",\"id\":\"af433b61-1a37-4916-94f7-0e7d36f84d97\"},\"ecs\":{\"version\":\"8.0.0\"},\"host\":{\"name\":\"ip-REDACTED.REDACTED.compute.internal\"},\"log\":{\"offset\":25919,\"file\":{\"path\":\"/var/log/secure\"}},\"message\":\"Jan 12 12:06:33 ip-REDACTED su: pam_unix(su-l:session): session closed for user root\",\"event\":{\"dataset\":\"system.auth\",\"module\":\"system\",\"timezone\":\"+00:00\"},\"service\":{\"type\":\"system\"}}]"
],
"log.file.path": [
"/var/log/secure"
],
"@version": [
"1"
],
"agent.ephemeral_id": [
"c514d01a-c282-4c2b-a91c-09c05af19b35"
],
"agent.name": [
"ip-REDACTED.REDACTED.compute.internal"
],
"agent.version": [
"8.5.3"
],
"host.name": [
"ip-REDACTED.REDACTED.compute.internal"
],
"event.dataset": [
"system.auth"
],
"event.timezone": [
"+00:00"
]
}
} |
system.auth
module grok fails for pam_unix
system.auth
module grok fails for pam_unix
I have a suspicion of what's going on here and it seems more related to Beats. First I set Logstash config to:
and then The output of an event is as follows:
now check out the
However, it should be grok'ing the In other words, it would appear Elasticsearch ingest pipeline This will occur only if using Filebeat -> Logstash -> Elasticsearch. |
The issue also occurs because of this conditional rename:
|
Related: elastic/integrations#3451 |
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
We are getting support requests from people running into this issue. It looks like it was caused by a known PR that already has a suggested fix: #32360, we should possibly bump the priority of addressing it. |
@andrewkroh's PR appears to have broken this originally, so I'm assigning this issue to him to sort out :) |
Filebeat
system
pipeline fails to grokpam_unix(sudo:session)
messages in/var/log/secure
.beats/filebeat/module/system/auth/ingest/pipeline.yml
Line 40 in bb64650
Enable
system
module withfilebeat modules enable
, and enable theauth
fileset.Then become root from ec2-user with
sudo -i
.Redacted output:
The text was updated successfully, but these errors were encountered: