|
| 1 | +[SERVICE] |
| 2 | + Flush 10 |
| 3 | + Grace 10 |
| 4 | + Parsers_File /fluent-bit/etc/parsers.conf |
| 5 | + |
| 6 | + Log_Level {{ .Fluentbit.LogLevel }} |
| 7 | + Log_File /var/log/fluent-bit/fluent-bit.log |
| 8 | + |
| 9 | + # HTTP server for prometheus metrics |
| 10 | + HTTP_Server On |
| 11 | + HTTP_Listen 0.0.0.0 |
| 12 | + HTTP_PORT 2020 |
| 13 | + |
| 14 | +[INPUT] |
| 15 | + Name tail |
| 16 | + Path /fluent-bit/log/server-access.log |
| 17 | + Tag access_logging |
| 18 | + Read_from_Head true |
| 19 | + |
| 20 | + # Sync with cloudserver checkFileRotationIntervalMS (10000ms) |
| 21 | + # rotate_wait should be >= checkFileRotationIntervalMS to avoid losing logs |
| 22 | + rotate_wait 30 |
| 23 | + refresh_interval 5 |
| 24 | + |
| 25 | + # Database for tracking file offsets across restarts |
| 26 | + DB /fluent-bit/data/tail.db |
| 27 | + DB.locking true |
| 28 | + DB.sync normal |
| 29 | + DB.journal_mode wal |
| 30 | + |
| 31 | +[FILTER] |
| 32 | + Name parser |
| 33 | + Key_Name log |
| 34 | + Match access_logging |
| 35 | + Parser json_parser |
| 36 | + |
| 37 | +[FILTER] |
| 38 | + Name record_modifier |
| 39 | + Match access_logging |
| 40 | + |
| 41 | + # Common |
| 42 | + Allowlist_key hostname |
| 43 | + |
| 44 | + # Analytics |
| 45 | + Allowlist_key action |
| 46 | + Allowlist_key accountName |
| 47 | + Allowlist_key httpMethod |
| 48 | + Allowlist_key userName |
| 49 | + Allowlist_key bytesDeleted |
| 50 | + Allowlist_key bytesReceived |
| 51 | + Allowlist_key bodyLength |
| 52 | + Allowlist_key contentLength |
| 53 | + Allowlist_key elapsed_ms |
| 54 | + |
| 55 | + # AWS |
| 56 | + Allowlist_key startTime |
| 57 | + Allowlist_key requester |
| 58 | + Allowlist_key operation |
| 59 | + Allowlist_key requestURI |
| 60 | + Allowlist_key errorCode |
| 61 | + Allowlist_key objectSize |
| 62 | + Allowlist_key totalTime |
| 63 | + Allowlist_key turnAroundTime |
| 64 | + Allowlist_key referer |
| 65 | + Allowlist_key userAgent |
| 66 | + Allowlist_key versionId |
| 67 | + Allowlist_key signatureVersion |
| 68 | + Allowlist_key cipherSuite |
| 69 | + Allowlist_key authenticationType |
| 70 | + Allowlist_key hostHeader |
| 71 | + Allowlist_key tlsVersion |
| 72 | + Allowlist_key aclRequired |
| 73 | + |
| 74 | + # Shared AWS and Analytics |
| 75 | + Allowlist_key bucketOwner |
| 76 | + Allowlist_key bucketName |
| 77 | + Allowlist_key req_id |
| 78 | + Allowlist_key bytesSent |
| 79 | + Allowlist_key clientIP |
| 80 | + Allowlist_key httpCode |
| 81 | + Allowlist_key objectKey |
| 82 | + |
| 83 | + # Scality server access logs extra fields |
| 84 | + Allowlist_key logFormatVersion |
| 85 | + Allowlist_key loggingEnabled |
| 86 | + Allowlist_key loggingTargetBucket |
| 87 | + Allowlist_key loggingTargetPrefix |
| 88 | + Allowlist_key awsAccessKeyID |
| 89 | + Allowlist_key raftSessionID |
| 90 | + |
| 91 | +[OUTPUT] |
| 92 | + Name http |
| 93 | + Match access_logging |
| 94 | + Host 127.0.0.1 |
| 95 | + Port 8123 |
| 96 | + URI /?query=INSERT+INTO+logs.access_logs_ingest+FORMAT+JSONEachRow |
| 97 | + format json_stream |
| 98 | + json_date_key timestamp |
| 99 | + json_date_format epoch |
| 100 | + Retry_Limit 5 |
0 commit comments