Skip to content
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

--dry-run-logs doesn't print anything #39

Open
pgiraud opened this issue Mar 31, 2020 · 2 comments
Open

--dry-run-logs doesn't print anything #39

pgiraud opened this issue Mar 31, 2020 · 2 comments
Labels

Comments

@pgiraud
Copy link

pgiraud commented Mar 31, 2020

When running pganalyze-collector --dry-run-logs I don't see any JSON data printed.
I only get the following messages:

2020/03/31 14:25:28 I [server1] Testing log collection (local)...
2020/03/31 14:25:34 I [server1]   Local log test successful

The --dry-run option does only print the stats and activity snapshots data. Nothing for logs.

Here's however what the --debug-logs option returns:

2020/03/31 14:23:35 I [server1] Would have sent log state:
log lines: 9, query samples: 0
6 x STATEMENT_LOG
1 x PGA_COLLECTOR_IDENTIFY
2020/03/31 14:24:08 I [server1] Would have sent log state:
log lines: 1, query samples: 0
1 x STATEMENT_LOG
2020/03/31 14:24:11 I [server1] Would have sent log state:
log lines: 1, query samples: 0
1 x STATEMENT_LOG

Am I missing something?

@lfittl
Copy link
Member

lfittl commented Mar 31, 2020

Hi @pgiraud!

It depends a bit what your test scenario is - AFAIK --dry-run-logs only works for cases where the collector downloads the log files (e.g. from an API of a cloud provider), not for local files.

You might want to look at the --analyze-logfile option for local testing.

Also, assuming that you are looking at this in the context of PEV2, happy to chat more by email (see my GitHub profile)

@pgiraud
Copy link
Author

pgiraud commented Apr 1, 2020

So the help message is wrong:

Print JSON data for log snapshot (without actually sending)

I was interested to know what the JSON logs snapshot looks like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants