# Logstash and Postgres Error

**URL:** <https://discuss.elastic.co/t/logstash-and-postgres-error/201074>\
**Category:** Logstash\
**Created:** [September 25, 2019, 2:54pm UTC](https://discuss.elastic.co/t/logstash-and-postgres-error/201074 "2019-09-25T14:54:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![emy.comin](https://avatars.discourse-cdn.com/v4/letter/e/e9c0ed/32.png) [@emy.comin](https://discuss.elastic.co/u/emy.comin)\
**Post date:** [September 25, 2019, 2:54pm UTC](https://discuss.elastic.co/t/logstash-and-postgres-error/201074/1 "2019-09-25T14:54:09Z")

</div>

Hey everyone, I had several problems with the configuration of logstash, jumping from post to post, but the error I had now I do not have much information and now began to move cok ELK, I have little knowledge ... Could someone help me?

/log/logstash/

> Error: Java::OrgPostgresqlUtil::PSQLException: FATAL: role "logstash" does not exist.

my .conf

```shell
input {
  jdbc {
    jdbc_driver_library => ""
                jdbc_driver_class => "org.postgresql.Driver"
                jdbc_connection_string => "jdbc:postgresql://localhost:5432/master"
                jdbc_user => "postgres"
                schedule => "* * * * *"
                jdbc_validate_connection => true
                statement => "SELECT * FROM check_agent"
                type => "check-agent"
  }
}

output {
  elasticsearch {

        index => "managed_system_name"
        document_id => "%{type}"
        hosts => ["http://localhost:9200"]

```

---

<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:** [October 23, 2019, 3:01pm UTC](https://discuss.elastic.co/t/logstash-and-postgres-error/201074/2 "2019-10-23T15:01:16Z")

</div>

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