Graylog API for frontend

Before you post: Your responses to these questions will help the community help you. Please complete this template if you’re asking a support question.
Don’t forget to select tags to help index your topic!

1. Describe your incident:
I am able to run graylog server and also able to read logs from other servers from sidecar/filebeat.
I have a frontend application which need to send log to graylog server or elastic search. Any recommended way to handle this. Do we have any REST API which i can call in my frontend application to send log. i am quite new to graylog .

2. Describe your environment:

  • OS Information:

  • Package Version: graylog 4.1

  • Service logs, configurations, and environment variables:

3. What steps have you already taken to try and solve the problem?

4. How can the community help?

Helpful Posting Tips: Tips for Posting Questions that Get Answers [Hold down CTRL and link on link to open tips documents in a separate tab]

Hello && Welcome

I would really like to help but your question is kind of open-ended. With the lack of information about you environment it hard to give a direct answer to your question. For example:

With a better understanding how you set up your graylog server or the way you ingesting logs would help. I could simple say use Graylog Sidecar.

https://docs.graylog.org/docs/sidecar

Perhaps that will help.

Thanks for response . I think i got the solution. Due to my application is frontend one , which did not generate log files. So i can use below GELF approach to send logs directly to graylog as a Service or ajax call .

curl -X POST -H ‘Content-Type: application/json’ -d ‘{ “version”: “1.1”, “host”: “example.org”, “short_message”: “A short message”, “level”: 5, “_some_info”: “foo” }’ ‘http://graylog.example.com:12201/gelf

Oh nice, and thanks for post your resolution. Please mark it a solved so it can help others for future searches.

Good Job :+1:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.