Not sure how to accomplish - Logtail database logging
Hey Railway folks, this is not an urgent support request so just get back to me when you get around to it.
I am trying to setup Logtail for both my NestJS application, and my PostgreSQL databases. My first attempt will be with the PostgreSQL database, as I think NestJS implementation will be easier.
I am following this tutorial: https://betterstack.com/docs/logs/postgresql/?source=247936 . How do I go about step number 2, Installing Vector? Can I SSH into the container that runs the postgres instance to install it? I'm not sure how this works, as I'm coming from a dedicated VPS.
29 Replies
Project ID:
29a5fb27-3661-4597-af03-ec799c4720cd
You might find these helpful:
- Connection issue with postgres on tutorial
- Hosting when using Gitlab?
- Hosting Existing Postgress database
β οΈ experimental feature
29a5fb27-3661-4597-af03-ec799c4720cd
theres no ssh feature, so no way to install vector, and railway doesn't support log drains yet (i want log drains myself too)
for your own apps though, you could work out something with a dockerfile
I was just looking into this myself. Can't quite seem to figure out log egress on Railway.. I'll keep you posted as I dig into this!
no log drains π¦
I figured π¦
so while you could setup logtail with a dockerfile (hacky) you cant do it for a database plugin
yeah I was going for the hacky solution with a dockerfile
it is planned though
https://feedback.railway.app/feature-requests/p/better-logging-support
nice
in the short term, we will be working on guides to enable Log exfil for those who need a solution yesterday.any news on this? Sounds exactly like what I'm about to attempt
you can subscribe to a containers deployment logs real-time with the API
ive done it as a proof of concept
(with my own code not
railway logs
)I think this is different. It's more of a "bake an agent/daemon into container that ships stdout to some external service" thing. It's definitely doable as you suggested, so I was wondering if there were any docs/guides for it (as the latest Canny post suggested)
no guides that i know of
log drains, pls railway
I feel like this should be a useful feature to implement and it would help a lot of us out.
I assume on my nestjs instance, I can just link it up to the logger (I hope).
I ended up building this as a weekend project:
https://github.com/half0wl/railway-chord
GitHub
GitHub - half0wl/railway-chord
Contribute to half0wl/railway-chord development by creating an account on GitHub.
thanks for the API idea Brody! π
that's god damn amazing
@rc Uh dude, Thank you!!! I owe you a beer sir!
this needs to be a template
it's a template π
oh right there is a button, you're good
@rc you should put that into #πο½show-off-your-stuff
@rc looks like it never finishes building on Railway for me. Am I doing something wrong?
no, railway is having some issues recently
Try redeploying? There was a recent incident causing builds to freeze
@rc got it to work now. Thanks for building this. I know this is a small side project. Do you think it would be possible to split the sources up by environment? Or have any suggestions for how I might do this? I guess I can put it in the stdout logging and tag it somehow.
Nice! For deployments, not yet. It should be a quick addition, I'll ping you when I get to it!
@Deani1232 I've added it π
@rc Thanks rockstar!
cheers!