2016-04-14 10 views
0

Ich benutze pgbadger wie folgt analysiert:PgBadger Bericht von AWS RDS Protokoll nicht vollständig

pgbadger -p %t:%r:%[email protected]%d:[%p]: postgresql.log 

log_line_prefix für RDS eingestellt und kann nicht geändert werden. Es ist dasselbe, dass ich an pgbadger überlasse (% t:% r:% u @% d: [% p]:)

Wenn ich pgbadger starte, bekomme ich folgende stdout Ausgabe.

[=======================> ] Parsed 52063631 bytes of 52063634 (100.00%), queries: 66116, events: 0 
LOG: Ok, generating html report... 

So analysierte Abfragen, und es gibt die meisten Statistiken sehen. Aber im oberen Abschnitt sehe ich falsche Informationen. Zeitaufwendige Abfragen und langsamste individuelle Abfragen sagen "kein Dataset". Und in Häufigste Abfragen (N) haben alle Abfragen alle Dauern als 0. Siehe Screenshot hier: http://clip2net.com/s/3wUxfXg. Beispiele für Abfragen zeigen keine Beispiele. Ich habe postgresql Protokoll überprüft und die Dauer ist da. Zum Beispiel:

2016-04-13 22:00:02 UTC:blabla.com(43372):[email protected]:[20584]:LOG: statement: SELECT DISTINCT "reports2_report"."id", "reports2_report"."created", "reports2_report"."modified", "reports2_report"."data", "reports2_report"."person_info", "reports2_report"."status", "reports2_report"."source_profile_id", "reports2_report"."application_id", "reports2_report"."error_detail" FROM "reports2_report" INNER JOIN "reports2_reportsourceprofile" ON ("reports2_report"."source_profile_id" = "reports2_reportsourceprofile"."id") INNER JOIN "reports2_reportsource" ON ("reports2_reportsourceprofile"."report_source_id" = "reports2_reportsource"."id") INNER JOIN "applications_applicationdocument" ON ("reports2_report"."application_id" = "applications_applicationdocument"."slug") WHERE ("reports2_reportsource"."identifier" = 'redridge_credit' AND "reports2_report"."application_id" = 'jqLoMe' AND ("reports2_report"."application_id" IN (SELECT DISTINCT V0."slug" FROM "applications_applicationdocument" V0 LEFT OUTER JOIN "auth_user" V1 ON (V0."seller_id" = V1."id") LEFT OUTER JOIN "accounts_companymembership" V2 ON (V1."id" = V2."user_id") LEFT OUTER JOIN "applications_applicationbundle" V5 ON (V0."bundle_id" = V5."id") LEFT OUTER JOIN "applications_applicationbundle_sharees" V6 ON (V5."id" = V6."applicationbundle_id") WHERE (V2."company_id" IN (SELECT U0."id" FROM "accounts_company" U0 WHERE (U0."lft" > 2 AND U0."tree_id" = 6 AND U0."rght" < 3)) OR V0."applicant_id" = 111827 OR V0."seller_id" = 111827 OR V6."user_id" = 111827)) OR "applications_applicationdocument"."seller_id" = 111827 OR "applications_applicationdocument"."applicant_id" = 111827 OR "reports2_reportsourceprofile"."user_id" = 111827)) ORDER BY "reports2_report"."created" DESC LIMIT 20 
2016-04-13 22:00:02 UTC:blabla.com(43372):[email protected]:[20584]:LOG: duration: 517.047 ms 

Wie bekomme ich PgBadger, um vollständige ordnungsgemäße Bericht zu generieren?

Antwort

0

Es war wegen log_statement = alle statt log_statement = keine. log_min_duration_statement funktioniert nur, wenn log_statement = none