Re: Question on pgwatch

From: Bikram Majumdar <bikramma(at)gmail(dot)com>
To: "Georg H(dot)" <georg-h(at)silentrunner(dot)de>
Cc: Bikram MAJUMDAR <bikram(dot)majumdar(at)aqsacom(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question on pgwatch
Date: 2019-08-27 18:39:12
Message-ID: CAKjPsz3bkKsx2d_kUc8sLqbMWz5ykfor6KJto7cbXjC0Ym5XxQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Hi George,

Thanks for your all your quick help - I was able to login to the
configuration database (docker exec -it <container ID> /bin/bash).

I have some questions if you can help me in my understanding how one should
configure a database for monitoring.

*I was with the idea that, to configure our database for monitoring, we
just need to add it in the admin interface. And, the admin interface will
run the required psql scripts in our database to create the required
objects to collect the metrices.*
As I indicated in an earlier email, I was able to add our database
(database name - cemtore) in the admin interface by adding the IP
172.17.0.2 in the pg_hba.conf of our postgres' database. Our database
name is cemtore and we selected full monitoring for it in the admin
interface (see below under *admin_interface*)

=====*admin_interface*==========
[image: image.png]
I can see my database cemtore both in the pgwatch2 dashboard, and in the
configuration database of the pgwatch2 container (see below - 2nd screen
shot - *query output *from the configuration database of the container),
but, I am getting some errors in the *pgwatch2 log *of the admin interface
( see under *pgwatch2 log*). And the dashboard also does not show system
stats - system load,CPU utilization etc for the database cemtore (see
under *cemtore
dashboard*)

* What else do we have to do extra to monitor our database after adding it
in the * *pgwatch2 admin interface.*
* Any help will be greatly appreciated.*

[image: image.png]

==== *query output *==========
[image: image.png]

===*pgwatch2 log*=====
http://192.168.40.143:8080/logs/pgwatch2/200

2019/08/27 11:15:46 ERRO MetricGathererLoop: Failed to fetch metric
data for [cemtore:stat_ssl]: pq: function get_stat_activity() does not
exist
2019/08/27 11:15:46 ERRO MetricGathererLoop: Total failed fetches for
[cemtore:stat_ssl]: 2794
2019/08/27 11:15:46 ERRO MetricGathererLoop: Failed to fetch metric
data for [cemtore:cpu_load]: pq: function get_load_average() does not
exist
2019/08/27 11:15:46 ERRO MetricGathererLoop: Total failed fetches for
[cemtore:cpu_load]: 5587
2019/08/27 11:17:46 ERRO MetricGathererLoop: Failed to fetch metric
data for [cemtore:psutil_disk_io_total]: pq: function
get_psutil_disk_io_total() does not exist
2019/08/27 11:17:46 ERRO MetricGathererLoop: Total failed fetches for
[cemtore:psutil_disk_io_total]: 2795
2019/08/27 11:17:46 ERRO MetricGathererLoop: Failed to fetch metric
data for [cemtore:psutil_disk]: pq: function get_psutil_disk() does
not exist
2019/08/27 11:17:46 ERRO MetricGathererLoop: Total failed fetches for
[cemtore:psutil_disk]: 2795
2019/08/27 11:17:46 ERRO MetricGathererLoop: Failed to fetch metric
data for [cemtore:psutil_cpu]: pq: function get_psutil_cpu() does not
exist
2019/08/27 11:17:46 ERRO MetricGathererLoop: Total failed fetches for
[cemtore:psutil_cpu]: 2795
2019/08/27 11:17:46 ERRO MetricGathererLoop: Failed to fetch metric
data for [cemtore:psutil_mem]: pq: function get_psutil_mem() does not
exist
2019/08/27 11:17:46 ERRO MetricGathererLoop: Total failed fetches for
[cemtore:psutil_mem]: 2795
2019/08/27 11:18:46 ERRO MetricGathererLoop: Failed to fetch metric
data for [cemtore:backends]: pq: function get_stat_activity() does not
exist
2019/08/27 11:18:46 ERRO MetricGathererLoop: Total failed fetches for
[cemtore:backends]: 5590
2019/08/27 11:19:46 ERRO MetricGathererLoop: Failed to fetch metric
data for [cemtore:kpi]: pq: function get_stat_activity() does not
exist
2019/08/27 11:19:46 ERRO MetricGathererLoop: Total failed fetches for
[cemtore:kpi]: 2796
2019/08/27 11:19:46 ERRO MetricGathererLoop: Failed to fetch metric
data for [cemtore:wal_size]: pq: function get_wal_size() does not
exist
2019/08/27 11:19:46 ERRO MetricGathererLoop: Total failed fetches for
[cemtore:wal_size]: 2796
2019/08/27 11:20:46 ERRO MetricGathererLoop: Failed to fetch metric
data for [cemtore:stat_statements_calls]: pq: relation
"pg_stat_statements" does not exist

2019/08/27 11:20:46 ERRO MetricGathererLoop: Total failed fetches for
[cemtore:stat_statements_calls]: 5592

=============*cemtore dashboard* ==============
[image: image.png]

Thanks and regards,
Bikram
ReplyForward

On Fri, Aug 23, 2019 at 4:00 PM Georg H. <georg-h(at)silentrunner(dot)de> wrote:

> Hi Bikram,
> Am 23.08.2019 um 22:10 schrieb Bikram Majumdar:
>
> Hi George,
>
> So nice for your response.
>
> Thanks. But, my question is how does it get the IP address 172.17.0.2 ?
>
> And, how does one run psql command to connect/login to the test database (
> pgwatch configuration database) to add any database ?
>
> Thanks and regards,
> Bikram
>
>
> the pgwatch2 configuration database resides within the docker container
> when using the docker variant.
>
> Whether you've exposed this port on container creation/start or you have
> to go into the docker image (docker exec -it IMAGENAME /bin/bash) and
> connect there with psql (pg_hba.conf should be in
> /etc/postgresql/[version]/main or similiar).
>
> regards
>
> Georg
>
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Flavio Henrique Araque Gurgel 2019-08-27 19:48:24 Re: need PostgreSQL 10.6 linux package installer
Previous Message Sakthivel, Naveen 2019-08-27 17:09:51 need PostgreSQL 10.6 linux package installer

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2019-08-27 18:51:39 Re: No warning/error trying to vacuum other session's temp table
Previous Message Bruce Momjian 2019-08-27 18:35:19 Re: Matching pgp_sym_encrypt() and gpg2 output