a year 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 :
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
a year ago
N/A
a year 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)
a year ago
IS it possible to retrieve logs from the API ?
a year ago
yes
a year ago
Thank you !
a year ago
what do you plan to use them for?
a year ago
I want to ingest them in my OpenSearch using Filebeat
a year ago
tell me more!
a year 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)
a year 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
a year 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.
a year ago
it also doesnt support http logs.. yet 😉
a year ago
Awesome thank you so much !
a year ago
I'll try that
a year 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 ?
a year ago
just use reference variables
a year ago
${{.RAILWAY_SERVICE_ID}}
a year ago
And is it possible to gather logs from different projects ?
a year ago
if you deploy locomotive into them
a year ago
I also get an error while trying to use Locomotive :


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