Show HN: I built this Postgres logger
94 points| kvaranasi_ | 2 years ago |rocketgraph.io
Some of you were really interested in Postgres logging with pgAudit in my previous post here: https://news.ycombinator.com/item?id=37082827
So I built this logger: https://rocketgraph.io/logger-demo
using pgAudit to show you what can be done with Postgres auditing. It offers some powerful features like "get me all the CREATE queries that ran in the past hour". These are generated by AWS RDS Instance running on my Rocketgraph account. Then they are forwarded to Cloudwatch for complex querying. In the future we can connect these logs to slack so you can get slack alerts when a developer accidentally DROPs a table.
If you like my work, please check it out here: https://github.com/RocketsGraphQL/rgraph
And if you want this logging on your own Postgres instance. Use https://rocketgraph.io/ And setup a project. pgAudit is automatically installed.
[+] [-] vermon|2 years ago|reply
[+] [-] kvaranasi_|2 years ago|reply
[+] [-] danpalmer|2 years ago|reply
Perhaps being able to exclude those as a separate category would be good?
[+] [-] e12e|2 years ago|reply
> Use https://rocketgraph.io/ And setup a project.
What will the price and terms be?
[+] [-] kvaranasi_|2 years ago|reply
But hey, you can sign up and create a project without your credit card. Once free trail ends, you can pay with stripe. Let me know how you like it.
[+] [-] unknown|2 years ago|reply
[deleted]
[+] [-] bdcravens|2 years ago|reply
[+] [-] kvaranasi_|2 years ago|reply
I wrote about it here: https://blog.rocketgraph.io/posts/install-pgaudit
That's why I automated the process. Now every project comes with Postgres and pgAudit configured, Authentication, GraphQL and front-end SDKs right out of the box so it will be easier to develop web applications.
[+] [-] rsyring|2 years ago|reply
What can you do about getting me a slack notice BEFORE a developer accidentally drops a table? ;)
[+] [-] nswanberg|2 years ago|reply
The Monarch: "Don't worry! If he hangs you I'll have him beheaded fifteen minutes later."
Triboulet: "Well, would it be possible to behead him 15 minutes before?
[+] [-] palijer|2 years ago|reply
All our db operations like this go through our regular code review process for the db maintainers team, and instead of dropping tables, we just rename them with a prefix "to_be_dropped" as a scream test, then actually drop them a month later or so.
Recovery is much simpler for renaming than dropping.
[+] [-] koliber|2 years ago|reply
[+] [-] codegeek|2 years ago|reply
Ideally, you don't want developer(s) to have access to destruct data especially things like DROP. Now, a lot of small businesses may not have the resource to have separate DBAs etc but the rule still applies.
This is more a control problem than a code problem. Having said that, you could write triggers to stop DELETE or DROPs from happening if you cannot control the access.
[+] [-] kvaranasi_|2 years ago|reply
[+] [-] palijer|2 years ago|reply
[+] [-] _flux|2 years ago|reply
Maybe it could send a Slack message which you (some someone else) would need to react with (I think this site malforms that white checkmark unicode character though..) before it continues, or times out after a while with an error!
[+] [-] lazyant|2 years ago|reply
[+] [-] alFReD-NSH|2 years ago|reply
[+] [-] unknown|2 years ago|reply
[deleted]
[+] [-] dom_hutton|2 years ago|reply
[+] [-] kvaranasi_|2 years ago|reply
[+] [-] unknown|2 years ago|reply
[deleted]