Adding psql data source to fresh Grafana installIs it possible to duplicate a dashboard in grafana?Grafana with elasticsearch data sourceInstalling Grafana Panel PluginHow to install grafana-cli and grafana pluginGrafana with MongoDB as data sourceGrafana custom data sourceIssue with sending mails from grafanaRemove and fresh install of grafana packageGrafana simple json data source example

May a man marry the women with whom he committed adultery?

How to store my pliers and wire cutters on my desk?

How to apply the changes to my `.zshrc` file after edit?

Is a topological space considered to be a class in set theory?

How do I stop my characters falling in love?

Trapped in an ocean Temple in Minecraft?

How could Nomadic scholars effectively memorize libraries worth of information

Isolated audio without a transformer

Are there any examples of technologies have been lost over time?

Polyhedra, Polyhedron, Polytopes and Polygon

Where to find an interactive PDF or HTML version of the tex.web documentation?

Is it legal for private citizens to "impound" e-scooters?

Is my employer paying me fairly? Going from 1099 to W2

Japanese reading of an integer

What does "see" in "the Holy See" mean?

How to handle academic references for US PhD program, when I have been out of academia for a (very) long time?

The Sword in the Stone

Vertical tennis ball into fancy new enumerate

Why isn't there a ";" after "do" in sh loops?

Suggestions for protecting jeans from saddle clamp bolt

Leaf-Spine network without routing

How can I say in Russian "they cannot make the tournament attractive by itself"?

Are USB protocol and connector free or are they patented?

Converting 8V AC to 8V DC - bridge rectifier gets very hot while idling



Adding psql data source to fresh Grafana install


Is it possible to duplicate a dashboard in grafana?Grafana with elasticsearch data sourceInstalling Grafana Panel PluginHow to install grafana-cli and grafana pluginGrafana with MongoDB as data sourceGrafana custom data sourceIssue with sending mails from grafanaRemove and fresh install of grafana packageGrafana simple json data source example






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am doing a fresh grafana install. I am trying to add PSQL data source to it, and going through Data Sources / PostgreSQL. I have provided host (localhost), database, user and password, and I know that database is up and running because I can connect with psql command.



However, when I click Save & Test, I am presented with a big red banner which reads Metric request error.



Grafana log tells me that




EROR[03-26|14:49:31] Metric request error

logger=context userId=1 orgId=1 uname=admin error="dbname is empty"



EROR[03-26|14:49:31] Request Completed

logger=context userId=1 orgId=1 uname=admin method=POST
path=/api/tsdb/query status=500 remote_addr=[::1] time_ms=12 size=34
referer=http://localhost:3000/datasources/edit/1/




Which is not very helpful. I can post a screenshot if one thinks it can be useful. How do I troubleshoot it? Which direction should I look?



Here is a screenshot of UI:



Grafana screenshot










share|improve this question
























  • For the record, I was able to add the source successfully using yaml-based provisioning. Still curious why UI method failed.

    – SergeyA
    Mar 26 at 19:25

















0















I am doing a fresh grafana install. I am trying to add PSQL data source to it, and going through Data Sources / PostgreSQL. I have provided host (localhost), database, user and password, and I know that database is up and running because I can connect with psql command.



However, when I click Save & Test, I am presented with a big red banner which reads Metric request error.



Grafana log tells me that




EROR[03-26|14:49:31] Metric request error

logger=context userId=1 orgId=1 uname=admin error="dbname is empty"



EROR[03-26|14:49:31] Request Completed

logger=context userId=1 orgId=1 uname=admin method=POST
path=/api/tsdb/query status=500 remote_addr=[::1] time_ms=12 size=34
referer=http://localhost:3000/datasources/edit/1/




Which is not very helpful. I can post a screenshot if one thinks it can be useful. How do I troubleshoot it? Which direction should I look?



Here is a screenshot of UI:



Grafana screenshot










share|improve this question
























  • For the record, I was able to add the source successfully using yaml-based provisioning. Still curious why UI method failed.

    – SergeyA
    Mar 26 at 19:25













0












0








0








I am doing a fresh grafana install. I am trying to add PSQL data source to it, and going through Data Sources / PostgreSQL. I have provided host (localhost), database, user and password, and I know that database is up and running because I can connect with psql command.



However, when I click Save & Test, I am presented with a big red banner which reads Metric request error.



Grafana log tells me that




EROR[03-26|14:49:31] Metric request error

logger=context userId=1 orgId=1 uname=admin error="dbname is empty"



EROR[03-26|14:49:31] Request Completed

logger=context userId=1 orgId=1 uname=admin method=POST
path=/api/tsdb/query status=500 remote_addr=[::1] time_ms=12 size=34
referer=http://localhost:3000/datasources/edit/1/




Which is not very helpful. I can post a screenshot if one thinks it can be useful. How do I troubleshoot it? Which direction should I look?



Here is a screenshot of UI:



Grafana screenshot










share|improve this question
















I am doing a fresh grafana install. I am trying to add PSQL data source to it, and going through Data Sources / PostgreSQL. I have provided host (localhost), database, user and password, and I know that database is up and running because I can connect with psql command.



However, when I click Save & Test, I am presented with a big red banner which reads Metric request error.



Grafana log tells me that




EROR[03-26|14:49:31] Metric request error

logger=context userId=1 orgId=1 uname=admin error="dbname is empty"



EROR[03-26|14:49:31] Request Completed

logger=context userId=1 orgId=1 uname=admin method=POST
path=/api/tsdb/query status=500 remote_addr=[::1] time_ms=12 size=34
referer=http://localhost:3000/datasources/edit/1/




Which is not very helpful. I can post a screenshot if one thinks it can be useful. How do I troubleshoot it? Which direction should I look?



Here is a screenshot of UI:



Grafana screenshot







grafana






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 26 at 20:33







SergeyA

















asked Mar 26 at 18:50









SergeyASergeyA

47.8k5 gold badges45 silver badges96 bronze badges




47.8k5 gold badges45 silver badges96 bronze badges












  • For the record, I was able to add the source successfully using yaml-based provisioning. Still curious why UI method failed.

    – SergeyA
    Mar 26 at 19:25

















  • For the record, I was able to add the source successfully using yaml-based provisioning. Still curious why UI method failed.

    – SergeyA
    Mar 26 at 19:25
















For the record, I was able to add the source successfully using yaml-based provisioning. Still curious why UI method failed.

– SergeyA
Mar 26 at 19:25





For the record, I was able to add the source successfully using yaml-based provisioning. Still curious why UI method failed.

– SergeyA
Mar 26 at 19:25












2 Answers
2






active

oldest

votes


















3














You must explicitly set the Host url, the faded text value of "localhost:5432" is not actually being used by Grafana.. This is unintuitive since the other four faded values are fine to leave as they are!






share|improve this answer






























    -1















    error="dbname is empty"




    Probably you didn't specify DB name datasource configuration in the UI properly. Screenshot of datasource configuration will be useful here.






    share|improve this answer























    • Screenshot added, looks like database is still there?

      – SergeyA
      Mar 26 at 20:34











    • @SergeyA Are you able to run SELECT 1 (SQL for datasource testing) with used credentials? Used test SQL query can be a problem for your DB.

      – Jan Garaj
      Mar 27 at 4:41











    • Yes, when I used PSQL outside of Grafana with given creds it all worked well.

      – SergeyA
      Mar 27 at 13:47













    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55364356%2fadding-psql-data-source-to-fresh-grafana-install%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    You must explicitly set the Host url, the faded text value of "localhost:5432" is not actually being used by Grafana.. This is unintuitive since the other four faded values are fine to leave as they are!






    share|improve this answer



























      3














      You must explicitly set the Host url, the faded text value of "localhost:5432" is not actually being used by Grafana.. This is unintuitive since the other four faded values are fine to leave as they are!






      share|improve this answer

























        3












        3








        3







        You must explicitly set the Host url, the faded text value of "localhost:5432" is not actually being used by Grafana.. This is unintuitive since the other four faded values are fine to leave as they are!






        share|improve this answer













        You must explicitly set the Host url, the faded text value of "localhost:5432" is not actually being used by Grafana.. This is unintuitive since the other four faded values are fine to leave as they are!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 23 at 12:31









        jphjph

        465 bronze badges




        465 bronze badges























            -1















            error="dbname is empty"




            Probably you didn't specify DB name datasource configuration in the UI properly. Screenshot of datasource configuration will be useful here.






            share|improve this answer























            • Screenshot added, looks like database is still there?

              – SergeyA
              Mar 26 at 20:34











            • @SergeyA Are you able to run SELECT 1 (SQL for datasource testing) with used credentials? Used test SQL query can be a problem for your DB.

              – Jan Garaj
              Mar 27 at 4:41











            • Yes, when I used PSQL outside of Grafana with given creds it all worked well.

              – SergeyA
              Mar 27 at 13:47















            -1















            error="dbname is empty"




            Probably you didn't specify DB name datasource configuration in the UI properly. Screenshot of datasource configuration will be useful here.






            share|improve this answer























            • Screenshot added, looks like database is still there?

              – SergeyA
              Mar 26 at 20:34











            • @SergeyA Are you able to run SELECT 1 (SQL for datasource testing) with used credentials? Used test SQL query can be a problem for your DB.

              – Jan Garaj
              Mar 27 at 4:41











            • Yes, when I used PSQL outside of Grafana with given creds it all worked well.

              – SergeyA
              Mar 27 at 13:47













            -1












            -1








            -1








            error="dbname is empty"




            Probably you didn't specify DB name datasource configuration in the UI properly. Screenshot of datasource configuration will be useful here.






            share|improve this answer














            error="dbname is empty"




            Probably you didn't specify DB name datasource configuration in the UI properly. Screenshot of datasource configuration will be useful here.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 26 at 19:30









            Jan GarajJan Garaj

            5,7378 silver badges27 bronze badges




            5,7378 silver badges27 bronze badges












            • Screenshot added, looks like database is still there?

              – SergeyA
              Mar 26 at 20:34











            • @SergeyA Are you able to run SELECT 1 (SQL for datasource testing) with used credentials? Used test SQL query can be a problem for your DB.

              – Jan Garaj
              Mar 27 at 4:41











            • Yes, when I used PSQL outside of Grafana with given creds it all worked well.

              – SergeyA
              Mar 27 at 13:47

















            • Screenshot added, looks like database is still there?

              – SergeyA
              Mar 26 at 20:34











            • @SergeyA Are you able to run SELECT 1 (SQL for datasource testing) with used credentials? Used test SQL query can be a problem for your DB.

              – Jan Garaj
              Mar 27 at 4:41











            • Yes, when I used PSQL outside of Grafana with given creds it all worked well.

              – SergeyA
              Mar 27 at 13:47
















            Screenshot added, looks like database is still there?

            – SergeyA
            Mar 26 at 20:34





            Screenshot added, looks like database is still there?

            – SergeyA
            Mar 26 at 20:34













            @SergeyA Are you able to run SELECT 1 (SQL for datasource testing) with used credentials? Used test SQL query can be a problem for your DB.

            – Jan Garaj
            Mar 27 at 4:41





            @SergeyA Are you able to run SELECT 1 (SQL for datasource testing) with used credentials? Used test SQL query can be a problem for your DB.

            – Jan Garaj
            Mar 27 at 4:41













            Yes, when I used PSQL outside of Grafana with given creds it all worked well.

            – SergeyA
            Mar 27 at 13:47





            Yes, when I used PSQL outside of Grafana with given creds it all worked well.

            – SergeyA
            Mar 27 at 13:47

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55364356%2fadding-psql-data-source-to-fresh-grafana-install%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해