# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
