R
Railwayβ€’2y ago
Deani1232

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
Percy
Percyβ€’2y ago
Project ID: 29a5fb27-3661-4597-af03-ec799c4720cd
Percy
Percyβ€’2y ago
⚠️ experimental feature
Deani1232
Deani1232OPβ€’2y ago
29a5fb27-3661-4597-af03-ec799c4720cd
Brody
Brodyβ€’2y ago
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
Ray
Rayβ€’2y ago
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!
Brody
Brodyβ€’2y ago
no log drains 😦
Ray
Rayβ€’2y ago
I figured 😦
Brody
Brodyβ€’2y ago
so while you could setup logtail with a dockerfile (hacky) you cant do it for a database plugin
Ray
Rayβ€’2y ago
yeah I was going for the hacky solution with a dockerfile
Ray
Rayβ€’2y ago
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
Brody
Brodyβ€’2y ago
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)
Ray
Rayβ€’2y ago
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)
Brody
Brodyβ€’2y ago
no guides that i know of log drains, pls railway
Deani1232
Deani1232OPβ€’2y ago
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).
Ray
Rayβ€’2y ago
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.
Ray
Rayβ€’2y ago
thanks for the API idea Brody! πŸ˜„
Brody
Brodyβ€’2y ago
that's god damn amazing
Deani1232
Deani1232OPβ€’2y ago
@rc Uh dude, Thank you!!! I owe you a beer sir!
Brody
Brodyβ€’2y ago
this needs to be a template
Ray
Rayβ€’2y ago
it's a template πŸ˜›
Brody
Brodyβ€’2y ago
oh right there is a button, you're good @rc you should put that into #🎭|show-off-your-stuff
Deani1232
Deani1232OPβ€’2y ago
@rc looks like it never finishes building on Railway for me. Am I doing something wrong?
Brody
Brodyβ€’2y ago
no, railway is having some issues recently
Ray
Rayβ€’2y ago
Try redeploying? There was a recent incident causing builds to freeze
Deani1232
Deani1232OPβ€’2y ago
@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.
Ray
Rayβ€’2y ago
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 πŸ™‚
Deani1232
Deani1232OPβ€’2y ago
@rc Thanks rockstar!
Ray
Rayβ€’2y ago
cheers!
Want results from more Discord servers?
Add your server