> For the complete documentation index, see [llms.txt](https://docs.cloudfabrix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudfabrix.io/cfxloganalytics/log-forwarding/sending-logs-to-logstash-forwarder.md).

# Sending Logs to Logstash Forwarder

The following example tails the `/var/log/test.log` file and forwards every line to a Logstash[ beats input](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-beats.html). To start pushing logs, you need to replace the config file named `filebeat.yml` with the one below and restart Filebeat.

```
filebeat:
  prospectors:
    -
      paths:
        - /var/log/logstash/test.log
        # - c:\logs\test.log
output:
  logstash:
    hosts: ["LOGSTASH_HOST:11111"]
For this to work, Logstash also needs to be configured to accept logs from Filebeat:
input {
  beats {
    port => 11111
  }
}

output {
  elasticsearch {
    # use port 80 for plain HTTP, instead of HTTPS
    hosts => "logsene-receiver.cfxDLA.com"
    # set to false if you don't want to use SSL/HTTPS
    ssl => "true"
    index => "db0461c5-7106-4b3e-b2af-42f20fd95b0f"
    manage_template => false
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cloudfabrix.io/cfxloganalytics/log-forwarding/sending-logs-to-logstash-forwarder.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
