8 months ago
I'm trying to understand the Railway API before using it in an OPenSearch pipeline. Here is the request I'm trying to send for my tests :graphql query { projects { edges { node { name } } } }
This request returns only 1 project in my Enterprise workspace but there are 10 inside and 3 in my personnal workspace. I also tried the request in Railway docs (even if the playground is reporting it as deprecated) and it returns only 3 random projects (2 inside my personnal workspace and 1 inside my enterprise workspace). I don't know if I'm doing something wrong or if there is a bug with the Railway API.
If there is an alternative for ingesting logs inside Opensearch that would save me some time it's even better !
Thanks for your help.
27 Replies
8 months ago
N/A
8 months ago
Ok my bad I just found out my Token was bound to "No Workspace" (I still don't understand why the second command show me projects from my enterprise workspace but anyway)
8 months ago
IS it possible to retrieve logs from the API ?
8 months ago
yes
8 months ago
Thank you !
8 months ago
what do you plan to use them for?
8 months ago
I want to ingest them in my OpenSearch using Filebeat
8 months ago
tell me more!
8 months ago
My enterprise is trying to get certified so we need to get compliant. I need to centralize all the logs I can into our OpenSearch instance. On Railway I need Deployments Logs and HTTP Logs (no need for build logs)
8 months ago
I didn't find any Filebeat or Logstash integration with Railway so I'm trying to gather all the logs I can using the API then sending them over HTTP or Syslog
8 months ago
Then Locomotive might be the best fit for your use case. While it doesn't support Filebeat or Logstash directly, it can push logs to any HTTP endpoint. Perhaps you could create a simple Railway function that pushes logs to OpenSearch directly or to Logstash.
8 months ago
it also doesnt support http logs.. yet 😉
8 months ago
Awesome thank you so much !
8 months ago
I'll try that
8 months ago
Is there an easy way to gather the logs of all my Railway services or I need to input all my services ids manually ?
8 months ago
just use reference variables
8 months ago
${{.RAILWAY_SERVICE_ID}}
8 months ago
And is it possible to gather logs from different projects ?
8 months ago
if you deploy locomotive into them
8 months ago
I also get an error while trying to use Locomotive :


8 months ago
click the log for more info
8 months ago
I also tried to use this template (with much more env variables) : https://railway.com/deploy/jP9r-f
8 months ago
yes its best to deploy with the template
8 months ago
please link to your locomotive service
8 months ago
Oh that's my bad I forgot to put to put my ingest url🤦🏻♂️
8 months ago
that would do it
8 months ago
!s
Status changed to Solved brody • 8 months ago