Posts

Showing posts from June, 2023
 jq -r --arg start "<start_timestamp>" --arg end "<end_timestamp>" 'select(.msg | contains("query") and .durationMillis >= 100 and .timestamp >= $start and .timestamp <= $end) | .msg' mongodb.log
 jq 'select(.timestamp >= "2023-06-01T00:00:00Z" and .timestamp <= "2023-06-15T23:59:59Z" and .executionTime > 1000)' <mongodb_logs.json                                                                            jq 'select(.executionTime > 1000)' <mongodb_logs.json. jq 'select((strptime("%Y-%m-%dT%H:%M:%SZ") | mktime) >= strptime("2023-06-01T00:00:00Z") and (strptime("%Y-%m-%dT%H:%M:%SZ") | mktime) <= strptime("2023-06-15T23:59:59Z") and .executionTime > 1000)' mongodb_logs.json         
 Good day