{"action":"opened","issue":{"url":"https://api.github.com/repos/dalibo/pgbadger/issues/313","repository_url":"https://api.github.com/repos/dalibo/pgbadger","labels_url":"https://api.github.com/repos/dalibo/pgbadger/issues/313/labels{/name}","comments_url":"https://api.github.com/repos/dalibo/pgbadger/issues/313/comments","events_url":"https://api.github.com/repos/dalibo/pgbadger/issues/313/events","html_url":"https://github.com/dalibo/pgbadger/issues/313","id":187157039,"number":313,"title":"Problem using remote-host option","user":{"login":"zargex","id":9205985,"avatar_url":"https://avatars.githubusercontent.com/u/9205985?v=3","gravatar_id":"","url":"https://api.github.com/users/zargex","html_url":"https://github.com/zargex","followers_url":"https://api.github.com/users/zargex/followers","following_url":"https://api.github.com/users/zargex/following{/other_user}","gists_url":"https://api.github.com/users/zargex/gists{/gist_id}","starred_url":"https://api.github.com/users/zargex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zargex/subscriptions","organizations_url":"https://api.github.com/users/zargex/orgs","repos_url":"https://api.github.com/users/zargex/repos","events_url":"https://api.github.com/users/zargex/events{/privacy}","received_events_url":"https://api.github.com/users/zargex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-03T18:46:24Z","updated_at":"2016-11-03T18:46:24Z","closed_at":null,"body":"Hello, I'm having problems using the `-r` option of pgbadger. \r\nFor  example is a run `pgbadger -r 172.31.38.89 -f syslog /logs/postgresql.log`, I will get \r\n```\r\n[========================>] Parsed 56675039 bytes of 56669296 (100.01%), queries: 0, events: 0\r\nLOG: Ok, generating html report...\r\n```\r\nUsing `-v` I saw a lot of lines like these:\r\n```\r\nDEBUG: Unknown syslog line format: Nov  3 18:34:40 ip-172-31-38-89 postgresql[10615]: [18-10] #011      AND n.nspname !~ '^pg_toast'\r\nDEBUG: Unknown syslog line format: Nov  3 18:34:40 ip-172-31-38-89 postgresql[10615]: [18-11] #011  AND pg_catalog.pg_table_is_visible(c.oid)\r\n``` \r\n\r\nBut if I run `ssh 172.31.38.89 \"cat /logs/postgresql.log\" | pgbadger -v -o index.html - `\r\n```\r\nDEBUG: Autodetected log format 'syslog' from -\r\nDEBUG: Output 'html' reports will be written to index.html\r\nDEBUG: waiting for log entries from stdin.\r\nDEBUG: Autodetected log format 'syslog' from -\r\nDEBUG: Starting to parse log file: -\r\nDEBUG: Starting reading file -...\r\nDEBUG: Start parsing at offset 0 of file - to 0\r\n..........................DEBUG: the log statistics gathering took:34 wallclock secs (32.69 usr +  0.17 sys = 32.86 CPU)\r\nLOG: Ok, generating html report...\r\nDEBUG: building reports took:  1 wallclock secs ( 1.55 usr +  0.01 sys =  1.56 CPU)\r\nDEBUG: the total execution time took: 35 wallclock secs (34.24 usr +  0.18 sys = 34.42 CPU)\r\n``` \r\nIf I got the file with scp and use pgbadger locally, I got : \r\n`pgbadger -v -f syslog postgresql.log `\r\n``` \r\nDEBUG: Autodetected log format 'syslog' from postgresql.log\r\nDEBUG: Output 'html' reports will be written to out.html\r\nDEBUG: Autodetected log format 'syslog' from postgresql.log\r\nDEBUG: Autodetected log format 'syslog' from postgresql.log\r\nDEBUG: Starting to parse log file: postgresql.log\r\nDEBUG: Starting reading file postgresql.log...\r\nDEBUG: Start parsing at offset 0 of file postgresql.log to 57017141\r\nDEBUG: Unrecognized line: LOG: ending log output to stderr at line 1\r\nDEBUG: Unrecognized line: LOG: MultiXact member wraparound protections are now enabled at line 4\r\n[========================>] Parsed 57017141 bytes of 57017141 (100.00%), queries: 116725, events: 9\r\nDEBUG: the log statistics gathering took:33 wallclock secs (32.26 usr +  0.02 sys = 32.28 CPU)\r\nLOG: Ok, generating html report...\r\nDEBUG: building reports took:  1 wallclock secs ( 1.52 usr +  0.00 sys =  1.52 CPU)\r\nDEBUG: the total execution time took: 34 wallclock secs (33.78 usr +  0.02 sys = 33.80 CPU)\r\n``` \r\nWhat I see is the problem isn't the file and pgbadger can parse it locally without problem. \r\n\r\nThis is my logging config:\r\n```\r\nlog_destination = 'syslog'\r\nsyslog_facility = 'LOCAL0'\r\nsyslog_ident = 'postgresql'\r\nlog_min_duration_statement = 0\r\nlog_checkpoints = on\r\nlog_connections = on\r\nlog_disconnections = on\r\nlog_error_verbosity = default    \r\nlog_line_prefix = 'user=%u,db=%d,app=%a,client=%h '\r\n``` \r\npgbadger version :  9.0-1.pgdg80+1\r\nOS: Debian 8\r\n\r\n"}}
{"actor":{"display_login":"zargex"}}