SlideShare a Scribd company logo
1 of 19
Download to read offline
Monitoring PostgreSQL database
with Verax NMS
Table of contents
Abstract ......................................................................................................................................... 3
1.     Adding PostgreSQL database to device inventory ............................................................ 4
2.     Adding sensors for PostgreSQL database .......................................................................... 7
3.     Adding performance counters for PostgreSQL database ................................................. 9
4.     Creating custom event processing rules for PostgreSQL database ............................... 11
5.     PostgreSQL RDBMS plugin overview ................................................................................ 12
Summary ..................................................................................................................................... 19
Monitoring PostgreSQL database with Verax NMS

Abstract
This publication provides an overview on how to monitor and manage PostgreSQL database using Verax
NMS (including the free Express edition available at http://www.veraxsystems.com/en/downloads - please
read terms & conditions for limitations of the Express version).


Tools used:
   • PostgreSQL Database: http://www.postgresql.org
   • Monitoring tool: www.veraxsystems.com/en/products/nms


Agenda:
   1. Adding PostgreSQL database to the list of monitored applications within Verax NMS.
   2. Configuring availability sensors and performance counters for the database.
   3. PostgreSQL database plugin features overview.
   4. Setting up alarms and notification policies.




                                         Copyright © Verax Systems. All rights reserved.
                               All trademarks in this document are legal property of their owners.   Page 3 of 19
                                                     www.veraxsystems.com
                                                                                                                DL723
Monitoring PostgreSQL database with Verax NMS

1. Adding PostgreSQL database to device inventory
In order to include PostgreSQL database instance to be monitored by Verax NMS, add an application
instance to the device actually running this instance.

Note: Verax NMS allows for creating multiple instances for applications of the same type on a single device.

In order to add PostgreSQL database server to the device running its instance, perform the following steps:
   1. Log in into the Verax NMS and select Home from the main menu.
   2. Select a device running PostgreSQL database instance from the left-side aspects view.




                                           Figure 1: Aspect hierarchy tree

   3. In Summary tab select Manage applications from the actions section.




                                  Figure 2: Adding a new managed application

   4. A pop-up dialog is displayed.




                                          Figure 3: Applications list dialog



                                          Copyright © Verax Systems. All rights reserved.
                                All trademarks in this document are legal property of their owners.   Page 4 of 19
                                                      www.veraxsystems.com
                                                                                                                 DL723
Monitoring PostgreSQL database with Verax NMS
   5. Select Add application option from the context menu and click Go. A dialog window is displayed.




                           Figure 4: Adding PostgreSQL database – parameters dialog

Verax NMS will ask to enter the following application-specific parameters:
   •   Instance name - Name of the application instance. You can enter any name describing the
       monitored application instance.
   •   Host - Address of the host running the application instance. In most cases, the host address is an IP
       address of the device the application instance is assigned to.
   •   Port - Port of application server.
   •   User - Username used to connect to the database.
   •   Password - Password used to connect to the database.
   •   Database – name of the database.

Note: application-specific parameters depend on the selected application type.

   6. Provide the necessary information and click Save changes.

   7. The system will ask if you want to add a default set of sensors and counters for PostgreSQL database.
      Since, in this example sensors and performance will be added manually – click No.


The initial set of PostgreSQL database monitors includes:
   •   Configuration: software version, host platform, status and system variables
   •   Database instance inventory
   •   Predefined sensor and counter templates to monitor most important SQL performance
       characteristics.




                                          Copyright © Verax Systems. All rights reserved.
                                All trademarks in this document are legal property of their owners.   Page 5 of 19
                                                      www.veraxsystems.com
                                                                                                                 DL723
Monitoring PostgreSQL database with Verax NMS

   8. The newly added database is now visible in the aspect tree within the host’s node in Managed
      Applications category.




                                               Figure 5: Aspects tree




                             Figure 6: PostgreSQL database properties window




                                        Copyright © Verax Systems. All rights reserved.
                              All trademarks in this document are legal property of their owners.   Page 6 of 19
                                                    www.veraxsystems.com
                                                                                                               DL723
Monitoring PostgreSQL database with Verax NMS

2. Adding sensors for PostgreSQL database
PostgreSQL database instance can be monitored by:
   •   Obtaining database information and statistics on demand using the Show advanced view action
       available on Summary tab, which shows several views with major information about the database
       server as well as performance characteristics.
   •   Checking application or service availability by configuring SQL-based Postgre sensors (or JDBC
       sensors alternatively).
   •   Collecting performance data by configuring performance counters using either SQL-based Postgre
       counters (or JDBC counters alternatively) or SQL-based Postgre counter templates.
Sensors are active monitors periodically querying the device services for which they are configured and
waiting for their responses. If a query is returned with an expected response, the queried service is
considered "available." If a response is not received (timed out), or if the response is not as expected, the
queried service is considered "unavailable".

The system includes a number of pre-configured sensors. The following types of sensors for PostgreSQL
database application type are available by default:
    • PostgreSQL Sensor - checks if given SQL query run on specified database returns expected result.
    • JDBC - checks if a given SQL query run on a specified database returns the expected result.

In order to add a sensor, perform the following steps:
    1. Select device from the aspect tree in Home view (PostgreSQL database in this case).
    2. Select Monitors tab and switch to sensor list by clicking Sensor list link in the upper-right corner of
       the tab field. The sensor list is displayed.



    3. Select Add from the global action menu and click Go. The wizard dialog is displayed.




                                               Figure 7: Adding a sensor

                                          Copyright © Verax Systems. All rights reserved.
                                All trademarks in this document are legal property of their owners.   Page 7 of 19
                                                      www.veraxsystems.com
                                                                                                                 DL723
Monitoring PostgreSQL database with Verax NMS

   4. Select the sensor you want to add and click Next.




                                     Figure 8: Specifying sensor parameters

   5. A dialog shows up with all sensor parameters to be provided. Specify the sensor parameters and
      click Finish.
   6. Once the sensors have been added, they are visible on the sensor list (Monitors tab).




                                         Copyright © Verax Systems. All rights reserved.
                               All trademarks in this document are legal property of their owners.   Page 8 of 19
                                                     www.veraxsystems.com
                                                                                                                DL723
Monitoring PostgreSQL database with Verax NMS

3. Adding performance counters for PostgreSQL database
Performance counters measure system activity and performance (metrics). The application retrieves their
current values in predefined intervals. The aim of probing and collecting data is to analyze and convert the
data into a performance graph/chart. The user can define a counter manually or load it from a template.
Performance counter templates are templates with defined probing parameters for specified devices in
order to improve and speed up counter creation.
Each Verax NMS counter template is characterized by the following information:
   •    Name and description - unique identifier and optional description,
   •    Device type - type of a device,
   •    Protocol type - protocol used,
   •    Probing interval - pauses between probing.
Counter templates are needed when the counter creation method is set to "from template". Counter
templates provide defined probing parameters for specified devices in order to improve and quicken
counter creation.


In order to add PostgreSQL database performance counters, perform the following steps:
   1. Select device from aspect tree in Home view.
   2.   Select Monitors tab and switch to the counter list by clicking Counter list link in the upper-right
        corner of the tab field. A counter list is displayed.



   3. Select Add from the global action menu and click Go. Select the counter you want to create and click
      Next.




                                Figure 9: Adding counter for PostgreSQL database


                                          Copyright © Verax Systems. All rights reserved.
                                All trademarks in this document are legal property of their owners.   Page 9 of 19
                                                      www.veraxsystems.com
                                                                                                                 DL723
Monitoring PostgreSQL database with Verax NMS

   4. Once the data has been loaded, the edit window shows up with all counter attributes to be
      provided.




                                      Figure 10: Selecting measure metrics

   5. Specify the rest of the counter parameters (alarms, thresholds etc.) and click Finish.
   6. The new counter has been created and is now visible on the counter list.




                                         Copyright © Verax Systems. All rights reserved.
                               All trademarks in this document are legal property of their owners.   Page 10 of 19
                                                     www.veraxsystems.com
                                                                                                                 DL723
Monitoring PostgreSQL database with Verax NMS

4. Creating custom event processing rules for PostgreSQL database
Events are processed by Event Processing Rules running under control of the Event Processing Engine. The
Event Processing Engine within the system is able to process events fast without materializing them in
database. Verax NMS comes with a set of embedded, flexibly customized processing rules such as: De-
duplication, Pairwise matching, Event forwarding, Intermittent failure, Scheduled Maintenance, etc. It also
provides users with the ability to implement their own processing rules using JRuby scripting language.

Verax NMS provides complex fault management, such as alarm collection, filtering, blocking, thresholds and
correlation (scripted, user-defined rules defining business logic for alarm correlation, cleaning, root-cause,
etc.) as well as alarm management actions, e.g. assignment, change of status, clearing, annotation and
others. It also enables users to create alarms based on network data etc.

In this example it is shown how to assign basic event processing rules such as:
   •    Alarm generating
   •    Event dropping
   •    Event forwarding
   •    Severity assigning

To assign an event processing rule, perform the following steps:
    1. After selecting the desired host go to Events tab.
    2. Select events, choose Assign processing rules and click Go.
    3. A dialog window is displayed (see figure below).
    4. Select rule category and click Add new rule. A dialog window is displayed (see figure below).




                                    Figure 11: Creating custom processing rule

    The newly created event processing rule is now visible and active (there’s no need to logout).


                                          Copyright © Verax Systems. All rights reserved.
                                All trademarks in this document are legal property of their owners.   Page 11 of 19
                                                      www.veraxsystems.com
                                                                                                                  DL723
Monitoring PostgreSQL database with Verax NMS

5. PostgreSQL RDBMS plugin overview
Verax NMS PostgreSQL plugin supports multiple instances of PostgreSQL 8.1 and higher running in 32 and
64 bit environments. The communication between Verax NMS and PostgreSQL server(s) takes place via SQL
queries (no management agent is required on PostgreSQL server).

General information view
The view presents general server and database information such as:
   • Server information: version, compiler and operating system
   • General configuration:
           o Configuration file path
           o TCP listen port for incoming connections
           o Archive mode status
           o Autovacuum mode status
   • Memory and disk usage statistics:
           o Total database size on disk
           o Block size
           o Working memory
           o Cache size
           o Shared and temporary buffers
           o Maintenance operations memory




                             Figure 12: PostgreSQL RDBMS plugin – general view




                                         Copyright © Verax Systems. All rights reserved.
                               All trademarks in this document are legal property of their owners.   Page 12 of 19
                                                     www.veraxsystems.com
                                                                                                                 DL723
Monitoring PostgreSQL database with Verax NMS
Database settings view
The view displays a list of all current server and database configuration parameters.




                               Figure 13: PostgreSQL RDBMS plugin – settings view

Tablespace view
The view displays a list of all database tables including name, size, average row length and expected vs. real
pages used. It also provides a graphical presentation of the most fragmented tables which require
optimization.




                                Figure 14: PostgreSQL RDBMS plugin – tables view


                                          Copyright © Verax Systems. All rights reserved.
                                All trademarks in this document are legal property of their owners.   Page 13 of 19
                                                      www.veraxsystems.com
                                                                                                                  DL723
Monitoring PostgreSQL database with Verax NMS
Process view
The view displays a list of processes currently accessing the database providing the following information:

   •   Process id (PID)
   •   Connecting user name, port, IP address and application name
   •   Last transaction start time
   •   Last SQL query start time
   •   Current SQL query text




                              Figure 15: PostgreSQL RDBMS plugin – processes view

Vacuum view
PostgreSQL Vacuum is a background daemon for reclaiming unused storage (occupied by deleted records).
The Vacuum view provides the following information, essential for optimizing database performance:

   •   Auto-vacuum enable status and threshold
   •   Delay time
   •   Number of processes
   •   Cost limit (on I/O operations used for vacuum in a single run), cost delay (number of seconds to
       suspend vacuum for, when cost limit is reached) and memory used by the vacuum daemon




                                          Copyright © Verax Systems. All rights reserved.
                                All trademarks in this document are legal property of their owners.   Page 14 of 19
                                                      www.veraxsystems.com
                                                                                                                  DL723
Monitoring PostgreSQL database with Verax NMS

Memory view
The view provides comprehensive statistics on database memory including:
   • Disk block size
   • Effective cache size
   • Shared buffer size
   • Temporary buffers size
   • Working memory size
   • Maintenance operations memory size
   • Number of checkpoint segments
   • WAL (Write-Ahead Logging) update method
   • WAL buffers size
   • Stack depth per process
   • A list of preloaded shared libraries
   • Maximum number of connections allowed
   • Maximum number of files that can be opened per connecting process




                            Figure 16: PostgreSQL RDBMS plugin – memory view




                                       Copyright © Verax Systems. All rights reserved.
                             All trademarks in this document are legal property of their owners.   Page 15 of 19
                                                   www.veraxsystems.com
                                                                                                               DL723
Monitoring PostgreSQL database with Verax NMS
Performance view
Provides statistics for identifying database performance bottlenecks including:
   • Top processes by run time
   • Top objects by size
   • Top objects by rows read
   • Top objects by physical reads
   • Top objects by number of buffer gets




                            Figure 17: PostgreSQL RDBMS plugin – performance view




                                          Copyright © Verax Systems. All rights reserved.
                                All trademarks in this document are legal property of their owners.   Page 16 of 19
                                                      www.veraxsystems.com
                                                                                                                  DL723
Monitoring PostgreSQL database with Verax NMS
Transaction summary
Provides a comprehensive summary of top transactions for each database on the server including:
   • Buffer hit rate
   • Number of committed transactions
   • Number of transactions rolled-backs
   • Total number of rows inserted since database creation
   • Total number of rows updated since database creation
   • Total number of rows deleted since database creation




                           Figure 18: PostgreSQL RDBMS plugin – transactions view




                                         Copyright © Verax Systems. All rights reserved.
                               All trademarks in this document are legal property of their owners.   Page 17 of 19
                                                     www.veraxsystems.com
                                                                                                                 DL723
Monitoring PostgreSQL database with Verax NMS
Diagnostics
The diagnostics report allows troubleshooting database performance. The report presents the following
information:
    • Tables that are missing primary keys
    • Unanalyzed tables
    • Vacuumed tables (i.e. ones that are being cleaned up at the moment)
    • Tables with large number of sequence scans without indexes, along with problem severity
       classification (from minor to extreme)




                           Figure 19: PostgreSQL RDBMS plugin – diagnostics view




                                        Copyright © Verax Systems. All rights reserved.
                              All trademarks in this document are legal property of their owners.   Page 18 of 19
                                                    www.veraxsystems.com
                                                                                                                DL723
Monitoring PostgreSQL database with Verax NMS

Summary
If you performed all actions described in chapters 1-5 you are now able to monitor PostgreSQL database.




                                         Copyright © Verax Systems. All rights reserved.
                               All trademarks in this document are legal property of their owners.   Page 19 of 19
                                                     www.veraxsystems.com
                                                                                                                 DL723

More Related Content

Viewers also liked

Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014EDB
 
Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Alexey Lesovsky
 
Linux tuning for PostgreSQL at Secon 2015
Linux tuning for PostgreSQL at Secon 2015Linux tuning for PostgreSQL at Secon 2015
Linux tuning for PostgreSQL at Secon 2015Alexey Lesovsky
 
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 ViennaAutovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 ViennaPostgreSQL-Consulting
 
PostgreSQL 9.6 Performance-Scalability Improvements
PostgreSQL 9.6 Performance-Scalability ImprovementsPostgreSQL 9.6 Performance-Scalability Improvements
PostgreSQL 9.6 Performance-Scalability ImprovementsPGConf APAC
 
Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practiceAlexey Lesovsky
 
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015PostgreSQL-Consulting
 
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesPostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesSperasoft
 
Security Best Practices for your Postgres Deployment
Security Best Practices for your Postgres DeploymentSecurity Best Practices for your Postgres Deployment
Security Best Practices for your Postgres DeploymentPGConf APAC
 
Troubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationTroubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationAlexey Lesovsky
 
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsJignesh Shah
 
Artigo benchmark moodle apresentação
Artigo benchmark moodle   apresentaçãoArtigo benchmark moodle   apresentação
Artigo benchmark moodle apresentaçãoMilton Azara
 
PostgreSQL Rocks Indonesia
PostgreSQL Rocks IndonesiaPostgreSQL Rocks Indonesia
PostgreSQL Rocks IndonesiaPGConf APAC
 
There is Javascript in my SQL
There is Javascript in my SQLThere is Javascript in my SQL
There is Javascript in my SQLPGConf APAC
 
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Colin Charles
 
Go Faster With Native Compilation
Go Faster With Native CompilationGo Faster With Native Compilation
Go Faster With Native CompilationPGConf APAC
 
(Ab)using 4d Indexing
(Ab)using 4d Indexing(Ab)using 4d Indexing
(Ab)using 4d IndexingPGConf APAC
 
PostgreSQL performance improvements in 9.5 and 9.6
PostgreSQL performance improvements in 9.5 and 9.6PostgreSQL performance improvements in 9.5 and 9.6
PostgreSQL performance improvements in 9.5 and 9.6Tomas Vondra
 
Big Data and PostgreSQL
Big Data and PostgreSQLBig Data and PostgreSQL
Big Data and PostgreSQLPGConf APAC
 

Viewers also liked (19)

Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014
 
Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.
 
Linux tuning for PostgreSQL at Secon 2015
Linux tuning for PostgreSQL at Secon 2015Linux tuning for PostgreSQL at Secon 2015
Linux tuning for PostgreSQL at Secon 2015
 
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 ViennaAutovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
 
PostgreSQL 9.6 Performance-Scalability Improvements
PostgreSQL 9.6 Performance-Scalability ImprovementsPostgreSQL 9.6 Performance-Scalability Improvements
PostgreSQL 9.6 Performance-Scalability Improvements
 
Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practice
 
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
 
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesPostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
 
Security Best Practices for your Postgres Deployment
Security Best Practices for your Postgres DeploymentSecurity Best Practices for your Postgres Deployment
Security Best Practices for your Postgres Deployment
 
Troubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationTroubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming Replication
 
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
 
Artigo benchmark moodle apresentação
Artigo benchmark moodle   apresentaçãoArtigo benchmark moodle   apresentação
Artigo benchmark moodle apresentação
 
PostgreSQL Rocks Indonesia
PostgreSQL Rocks IndonesiaPostgreSQL Rocks Indonesia
PostgreSQL Rocks Indonesia
 
There is Javascript in my SQL
There is Javascript in my SQLThere is Javascript in my SQL
There is Javascript in my SQL
 
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016
 
Go Faster With Native Compilation
Go Faster With Native CompilationGo Faster With Native Compilation
Go Faster With Native Compilation
 
(Ab)using 4d Indexing
(Ab)using 4d Indexing(Ab)using 4d Indexing
(Ab)using 4d Indexing
 
PostgreSQL performance improvements in 9.5 and 9.6
PostgreSQL performance improvements in 9.5 and 9.6PostgreSQL performance improvements in 9.5 and 9.6
PostgreSQL performance improvements in 9.5 and 9.6
 
Big Data and PostgreSQL
Big Data and PostgreSQLBig Data and PostgreSQL
Big Data and PostgreSQL
 

Recently uploaded

南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证kbdhl05e
 
西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做j5bzwet6
 
Call Girls In Dwarka Sub City ☎️7838079806 ✅ 💯Call Girls In Delhi
Call Girls In Dwarka Sub City  ☎️7838079806 ✅ 💯Call Girls In DelhiCall Girls In Dwarka Sub City  ☎️7838079806 ✅ 💯Call Girls In Delhi
Call Girls In Dwarka Sub City ☎️7838079806 ✅ 💯Call Girls In DelhiSoniyaSingh
 
办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭o8wvnojp
 
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 AvilableCall Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilabledollysharma2066
 
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
(南达科他州立大学毕业证学位证成绩单-永久存档)
(南达科他州立大学毕业证学位证成绩单-永久存档)(南达科他州立大学毕业证学位证成绩单-永久存档)
(南达科他州立大学毕业证学位证成绩单-永久存档)oannq
 
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan
 
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ EscortsDelhi Escorts Service
 
E J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxE J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxJackieSparrow3
 
Inspiring Through Words Power of Inspiration.pptx
Inspiring Through Words Power of Inspiration.pptxInspiring Through Words Power of Inspiration.pptx
Inspiring Through Words Power of Inspiration.pptxShubham Rawat
 

Recently uploaded (12)

南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证
 
西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做
 
Call Girls In Dwarka Sub City ☎️7838079806 ✅ 💯Call Girls In Delhi
Call Girls In Dwarka Sub City  ☎️7838079806 ✅ 💯Call Girls In DelhiCall Girls In Dwarka Sub City  ☎️7838079806 ✅ 💯Call Girls In Delhi
Call Girls In Dwarka Sub City ☎️7838079806 ✅ 💯Call Girls In Delhi
 
办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭
 
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 AvilableCall Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
 
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
 
(南达科他州立大学毕业证学位证成绩单-永久存档)
(南达科他州立大学毕业证学位证成绩单-永久存档)(南达科他州立大学毕业证学位证成绩单-永久存档)
(南达科他州立大学毕业证学位证成绩单-永久存档)
 
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
 
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
 
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
 
E J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxE J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptx
 
Inspiring Through Words Power of Inspiration.pptx
Inspiring Through Words Power of Inspiration.pptxInspiring Through Words Power of Inspiration.pptx
Inspiring Through Words Power of Inspiration.pptx
 

How to monitor Postgresql database

  • 2. Table of contents Abstract ......................................................................................................................................... 3 1. Adding PostgreSQL database to device inventory ............................................................ 4 2. Adding sensors for PostgreSQL database .......................................................................... 7 3. Adding performance counters for PostgreSQL database ................................................. 9 4. Creating custom event processing rules for PostgreSQL database ............................... 11 5. PostgreSQL RDBMS plugin overview ................................................................................ 12 Summary ..................................................................................................................................... 19
  • 3. Monitoring PostgreSQL database with Verax NMS Abstract This publication provides an overview on how to monitor and manage PostgreSQL database using Verax NMS (including the free Express edition available at http://www.veraxsystems.com/en/downloads - please read terms & conditions for limitations of the Express version). Tools used: • PostgreSQL Database: http://www.postgresql.org • Monitoring tool: www.veraxsystems.com/en/products/nms Agenda: 1. Adding PostgreSQL database to the list of monitored applications within Verax NMS. 2. Configuring availability sensors and performance counters for the database. 3. PostgreSQL database plugin features overview. 4. Setting up alarms and notification policies. Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 3 of 19 www.veraxsystems.com DL723
  • 4. Monitoring PostgreSQL database with Verax NMS 1. Adding PostgreSQL database to device inventory In order to include PostgreSQL database instance to be monitored by Verax NMS, add an application instance to the device actually running this instance. Note: Verax NMS allows for creating multiple instances for applications of the same type on a single device. In order to add PostgreSQL database server to the device running its instance, perform the following steps: 1. Log in into the Verax NMS and select Home from the main menu. 2. Select a device running PostgreSQL database instance from the left-side aspects view. Figure 1: Aspect hierarchy tree 3. In Summary tab select Manage applications from the actions section. Figure 2: Adding a new managed application 4. A pop-up dialog is displayed. Figure 3: Applications list dialog Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 4 of 19 www.veraxsystems.com DL723
  • 5. Monitoring PostgreSQL database with Verax NMS 5. Select Add application option from the context menu and click Go. A dialog window is displayed. Figure 4: Adding PostgreSQL database – parameters dialog Verax NMS will ask to enter the following application-specific parameters: • Instance name - Name of the application instance. You can enter any name describing the monitored application instance. • Host - Address of the host running the application instance. In most cases, the host address is an IP address of the device the application instance is assigned to. • Port - Port of application server. • User - Username used to connect to the database. • Password - Password used to connect to the database. • Database – name of the database. Note: application-specific parameters depend on the selected application type. 6. Provide the necessary information and click Save changes. 7. The system will ask if you want to add a default set of sensors and counters for PostgreSQL database. Since, in this example sensors and performance will be added manually – click No. The initial set of PostgreSQL database monitors includes: • Configuration: software version, host platform, status and system variables • Database instance inventory • Predefined sensor and counter templates to monitor most important SQL performance characteristics. Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 5 of 19 www.veraxsystems.com DL723
  • 6. Monitoring PostgreSQL database with Verax NMS 8. The newly added database is now visible in the aspect tree within the host’s node in Managed Applications category. Figure 5: Aspects tree Figure 6: PostgreSQL database properties window Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 6 of 19 www.veraxsystems.com DL723
  • 7. Monitoring PostgreSQL database with Verax NMS 2. Adding sensors for PostgreSQL database PostgreSQL database instance can be monitored by: • Obtaining database information and statistics on demand using the Show advanced view action available on Summary tab, which shows several views with major information about the database server as well as performance characteristics. • Checking application or service availability by configuring SQL-based Postgre sensors (or JDBC sensors alternatively). • Collecting performance data by configuring performance counters using either SQL-based Postgre counters (or JDBC counters alternatively) or SQL-based Postgre counter templates. Sensors are active monitors periodically querying the device services for which they are configured and waiting for their responses. If a query is returned with an expected response, the queried service is considered "available." If a response is not received (timed out), or if the response is not as expected, the queried service is considered "unavailable". The system includes a number of pre-configured sensors. The following types of sensors for PostgreSQL database application type are available by default: • PostgreSQL Sensor - checks if given SQL query run on specified database returns expected result. • JDBC - checks if a given SQL query run on a specified database returns the expected result. In order to add a sensor, perform the following steps: 1. Select device from the aspect tree in Home view (PostgreSQL database in this case). 2. Select Monitors tab and switch to sensor list by clicking Sensor list link in the upper-right corner of the tab field. The sensor list is displayed. 3. Select Add from the global action menu and click Go. The wizard dialog is displayed. Figure 7: Adding a sensor Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 7 of 19 www.veraxsystems.com DL723
  • 8. Monitoring PostgreSQL database with Verax NMS 4. Select the sensor you want to add and click Next. Figure 8: Specifying sensor parameters 5. A dialog shows up with all sensor parameters to be provided. Specify the sensor parameters and click Finish. 6. Once the sensors have been added, they are visible on the sensor list (Monitors tab). Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 8 of 19 www.veraxsystems.com DL723
  • 9. Monitoring PostgreSQL database with Verax NMS 3. Adding performance counters for PostgreSQL database Performance counters measure system activity and performance (metrics). The application retrieves their current values in predefined intervals. The aim of probing and collecting data is to analyze and convert the data into a performance graph/chart. The user can define a counter manually or load it from a template. Performance counter templates are templates with defined probing parameters for specified devices in order to improve and speed up counter creation. Each Verax NMS counter template is characterized by the following information: • Name and description - unique identifier and optional description, • Device type - type of a device, • Protocol type - protocol used, • Probing interval - pauses between probing. Counter templates are needed when the counter creation method is set to "from template". Counter templates provide defined probing parameters for specified devices in order to improve and quicken counter creation. In order to add PostgreSQL database performance counters, perform the following steps: 1. Select device from aspect tree in Home view. 2. Select Monitors tab and switch to the counter list by clicking Counter list link in the upper-right corner of the tab field. A counter list is displayed. 3. Select Add from the global action menu and click Go. Select the counter you want to create and click Next. Figure 9: Adding counter for PostgreSQL database Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 9 of 19 www.veraxsystems.com DL723
  • 10. Monitoring PostgreSQL database with Verax NMS 4. Once the data has been loaded, the edit window shows up with all counter attributes to be provided. Figure 10: Selecting measure metrics 5. Specify the rest of the counter parameters (alarms, thresholds etc.) and click Finish. 6. The new counter has been created and is now visible on the counter list. Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 10 of 19 www.veraxsystems.com DL723
  • 11. Monitoring PostgreSQL database with Verax NMS 4. Creating custom event processing rules for PostgreSQL database Events are processed by Event Processing Rules running under control of the Event Processing Engine. The Event Processing Engine within the system is able to process events fast without materializing them in database. Verax NMS comes with a set of embedded, flexibly customized processing rules such as: De- duplication, Pairwise matching, Event forwarding, Intermittent failure, Scheduled Maintenance, etc. It also provides users with the ability to implement their own processing rules using JRuby scripting language. Verax NMS provides complex fault management, such as alarm collection, filtering, blocking, thresholds and correlation (scripted, user-defined rules defining business logic for alarm correlation, cleaning, root-cause, etc.) as well as alarm management actions, e.g. assignment, change of status, clearing, annotation and others. It also enables users to create alarms based on network data etc. In this example it is shown how to assign basic event processing rules such as: • Alarm generating • Event dropping • Event forwarding • Severity assigning To assign an event processing rule, perform the following steps: 1. After selecting the desired host go to Events tab. 2. Select events, choose Assign processing rules and click Go. 3. A dialog window is displayed (see figure below). 4. Select rule category and click Add new rule. A dialog window is displayed (see figure below). Figure 11: Creating custom processing rule The newly created event processing rule is now visible and active (there’s no need to logout). Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 11 of 19 www.veraxsystems.com DL723
  • 12. Monitoring PostgreSQL database with Verax NMS 5. PostgreSQL RDBMS plugin overview Verax NMS PostgreSQL plugin supports multiple instances of PostgreSQL 8.1 and higher running in 32 and 64 bit environments. The communication between Verax NMS and PostgreSQL server(s) takes place via SQL queries (no management agent is required on PostgreSQL server). General information view The view presents general server and database information such as: • Server information: version, compiler and operating system • General configuration: o Configuration file path o TCP listen port for incoming connections o Archive mode status o Autovacuum mode status • Memory and disk usage statistics: o Total database size on disk o Block size o Working memory o Cache size o Shared and temporary buffers o Maintenance operations memory Figure 12: PostgreSQL RDBMS plugin – general view Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 12 of 19 www.veraxsystems.com DL723
  • 13. Monitoring PostgreSQL database with Verax NMS Database settings view The view displays a list of all current server and database configuration parameters. Figure 13: PostgreSQL RDBMS plugin – settings view Tablespace view The view displays a list of all database tables including name, size, average row length and expected vs. real pages used. It also provides a graphical presentation of the most fragmented tables which require optimization. Figure 14: PostgreSQL RDBMS plugin – tables view Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 13 of 19 www.veraxsystems.com DL723
  • 14. Monitoring PostgreSQL database with Verax NMS Process view The view displays a list of processes currently accessing the database providing the following information: • Process id (PID) • Connecting user name, port, IP address and application name • Last transaction start time • Last SQL query start time • Current SQL query text Figure 15: PostgreSQL RDBMS plugin – processes view Vacuum view PostgreSQL Vacuum is a background daemon for reclaiming unused storage (occupied by deleted records). The Vacuum view provides the following information, essential for optimizing database performance: • Auto-vacuum enable status and threshold • Delay time • Number of processes • Cost limit (on I/O operations used for vacuum in a single run), cost delay (number of seconds to suspend vacuum for, when cost limit is reached) and memory used by the vacuum daemon Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 14 of 19 www.veraxsystems.com DL723
  • 15. Monitoring PostgreSQL database with Verax NMS Memory view The view provides comprehensive statistics on database memory including: • Disk block size • Effective cache size • Shared buffer size • Temporary buffers size • Working memory size • Maintenance operations memory size • Number of checkpoint segments • WAL (Write-Ahead Logging) update method • WAL buffers size • Stack depth per process • A list of preloaded shared libraries • Maximum number of connections allowed • Maximum number of files that can be opened per connecting process Figure 16: PostgreSQL RDBMS plugin – memory view Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 15 of 19 www.veraxsystems.com DL723
  • 16. Monitoring PostgreSQL database with Verax NMS Performance view Provides statistics for identifying database performance bottlenecks including: • Top processes by run time • Top objects by size • Top objects by rows read • Top objects by physical reads • Top objects by number of buffer gets Figure 17: PostgreSQL RDBMS plugin – performance view Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 16 of 19 www.veraxsystems.com DL723
  • 17. Monitoring PostgreSQL database with Verax NMS Transaction summary Provides a comprehensive summary of top transactions for each database on the server including: • Buffer hit rate • Number of committed transactions • Number of transactions rolled-backs • Total number of rows inserted since database creation • Total number of rows updated since database creation • Total number of rows deleted since database creation Figure 18: PostgreSQL RDBMS plugin – transactions view Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 17 of 19 www.veraxsystems.com DL723
  • 18. Monitoring PostgreSQL database with Verax NMS Diagnostics The diagnostics report allows troubleshooting database performance. The report presents the following information: • Tables that are missing primary keys • Unanalyzed tables • Vacuumed tables (i.e. ones that are being cleaned up at the moment) • Tables with large number of sequence scans without indexes, along with problem severity classification (from minor to extreme) Figure 19: PostgreSQL RDBMS plugin – diagnostics view Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 18 of 19 www.veraxsystems.com DL723
  • 19. Monitoring PostgreSQL database with Verax NMS Summary If you performed all actions described in chapters 1-5 you are now able to monitor PostgreSQL database. Copyright © Verax Systems. All rights reserved. All trademarks in this document are legal property of their owners. Page 19 of 19 www.veraxsystems.com DL723