# Can I set log path for connector

**URL:** <https://discuss.elastic.co/t/can-i-set-log-path-for-connector/332311>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [May 2, 2023, 3:10pm UTC](https://discuss.elastic.co/t/can-i-set-log-path-for-connector/332311 "2023-05-02T15:10:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rachelyang](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@rachelyang](https://discuss.elastic.co/u/rachelyang)\
**Post date:** [May 2, 2023, 3:10pm UTC](https://discuss.elastic.co/t/can-i-set-log-path-for-connector/332311/1 "2023-05-02T15:10:51Z")

</div>

I am setting up an alert in Kibana. I choose Server log as connector. It goes to /var/log/kibana.log by default. All the server logs are stored in this log file. I want to push the alert messages to the other path /var/log/kibana-alert.log  
How can I set the log path?  
Thanks

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [May 29, 2023, 11:45am UTC](https://discuss.elastic.co/t/can-i-set-log-path-for-connector/332311/2 "2023-05-29T11:45:02Z")

</div>

Following [the docs](https://www.elastic.co/guide/en/kibana/current/pre-configured-connectors.html), I could send server logs to a custom location with these settings:

```yaml
xpack.actions.preconfigured:
  my-server-log:
    name: preconfigured-server-log-connector-type
    actionTypeId: .server-log

logging.appenders:
    server-log:
      type: rolling-file
      fileName: /usr/share/kibana/logs/kibana-server-log.log
      policy:
        type: size-limit
        size: 50mb
      strategy:
        type: numeric
        pattern: '-%i'
        max: 10
      layout:
        type: pattern
        pattern: "[%date] [%level] [%logger] [%meta] %message"

logging.loggers:
    - name: plugins.actions.server-log
      level: debug
      appenders: [server-log]

```

For more details about Kibana logging please go [here](https://www.elastic.co/guide/en/kibana/master/logging-configuration.html) and [here](https://www.elastic.co/guide/en/kibana/current/logging-settings.html)

Then I had my predefinned connector ready to test

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/f/2f6add05b87d386a167d285d3e4fc0b3cfb2f0ae.png)

And check the entry went to the custom file:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/7/8781886bedf53052c8a31654d43b119d9cd4cf7a.png)

Hope it helps!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 26, 2023, 11:45am UTC](https://discuss.elastic.co/t/can-i-set-log-path-for-connector/332311/3 "2023-06-26T11:45:52Z")

</div>

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