SlideShare a Scribd company logo
1 of 12
Download to read offline
Pandora FMS
Administrator Manual
Monitoring postgresql Server on Unix
Manual Monitoring postgresql Server Administration
© Artica Soluciones Tecnológicas 2005­2012
Index
1.Changelog.....................................................................................3
2.Introduction...................................................................................4
3.Requirements................................................................................5
3.1.Documentation that must deliver the required monitoring area...............................5
4.Compatibility Matrix ....................................................................6
5.Installation.....................................................................................7
6.Monitorización .............................................................................8
7.Configuration file..........................................................................9
1 CHANGELOG
Date Author Change Version
19/04/12 David First Version v1r1
Page 3
2 INTRODUCTION
The following diagram gives an idea of the interaction of pandora plugin.
This paper aims at describing the monitoring of PostgreSQL databases on Unix.
To extract the information is used:
• An external configuration file which defines all the parameters of the plugin.
•  It uses the software already installed  on the system for monitoring by the plugin 
without having to install third party libraries or utilities.
• They perform a number of basic checks "default", but you can remove or customize.
•  It has an interface "open"  to specify SQL queries free model allowing SQL queries 
always return a data only.
From a general point of view Pandora fms launches plugin, loading the configuration parameters
from file configuracion.ini and performs a series of queries to postgres server and returns an xml
monitoring, which is collected by pandora.
We can also launch this plugin from the command line:
./pandora_postgres_plugin.pl -f file-config
This implementation is using a configuration file (or boot) called configuración.ini, if we throw
without use file would be:
./pandora_postgres_plugin.pl -u user -c password [-n basename] [-d dir_ip_server] [-p port] [-h]
For more info ./pandora_postgres_plugin.pl -h
Page 4
3 REQUIREMENTS
The requirements to work properly this monitoring are:
• Install the Pandora FMS agent.
• To have perl installed.
•  Having a postgresql database installed on the machine where it will be monitored, with 
connectivity to the database.
• Specify the name, user, password and host of the postgresql database.
3.1.  Documentation that must deliver the required monitoring area
For proper monitoring postgresql is necessary for the technical area send some information 
that will be included in the configuration files. This information is:
• Username, password, host with access to the postgresql database.
• IMPORTANT: SQL MODULES MAY MONITOR ONLY A PARAMETER THAT IS THE ONLY 
QUESTIONS MAY RETURN A DATA (A ROW AND COLUMN)
Page 5
4 COMPATIBILITY MATRIX
The Agent compatibility matrix is as follows
Systems which have been tested • Ubuntu 12.10 con postgresql 9
• OpenSuse 11.2 con postgresql 9
Systems where
should work
• Other Unix systems with postgresql 9 or 
higher.
Page 6
5 INSTALLATION
To install this plugin must follow the following steps: 
1st. Copy and plugin configuration file in / etc / pandora / plugins / (if you have the plugin oars in 
another folder see step 2). 
2nd. Access the folder where the configuration file pandora_agent.conf (in ubuntu / etc / pandora. 
In this file we add a line 
module_plugin perl pandora_postgres_plugin.pl -f filename_config 2>
/etc/pandora/plugins/error.log
In case you want to install the plugin into a separate folder will be the following line: 
module_plugin perl path/pandora_postgres_plugin.pl -f filename_config 2>
/etc/pandora/plugins/erro.log
To perform this action you can use the following command: 
sudo echo "module_plugin path/pandora_postgres_plugin.pl -f filename_config 2>
/etc/pandora/plugins/error.log" >> /etc/pandora/ pandora_agent.conf
Also you can install without having a configuration file, then the command is: 
module_plugin ./pandora_postgres_plugin.pl -u user -c password [-n basename] [-d
dir_ip_server] [-p port] 2> error.log
3 º. Reboot the agent. 
sudo /etc/init.d/pandora_agent_daemon
We can also install the plugin if you use the configuration file, but lose some features (like creating 
your own queries).
Page 7
6 MONITORING
The plugin monitors "default" the following:
• Connection Status   If possible the connection to the specified IP and ports.→
•  Server status
• Server port →  Only if the server is listening.
• Percentage of cpu usage 
• Percentage of memory usage 
Included in the file config.ini:
• Number of roles from the DB.
• Number of users postgres server.
• Number of active locks postgres server. 
• Space server bytes.
• Number of commits.
• Number of rollback.
• Number of active processes on the server. 
• Number of bases postgres server.
• Number tuples returned by the server. 
• Tuples in the database searched.
• Tuples inserted into the postgres server.
• Updated tuples in the postgres server.
 • Number of tuples removed postgres server.
All these modules are parameterized in the file "config.ini" that comes in the package of the plugin. 
These modules can be eliminated or extended for postgresql administrator.
Page 8
7 CONFIGURATION FILE
In this file are the beginning of the plugin parameters, predefined modules and the modules we want
to load user created sql.
For predefinos modules (enable / disable):
Percent cpu usage: GCPU = yes. If no boot file does not load
Percentage of use of mem: GMem = yes. If no boot file does not load
Apart from these two modules predefinos two more (but not be disabled), see list of modules.
IMPORTANT: SQL MODULES MAY MONITOR ONLY A PARAMETER THAT IS THE
ONLY QUESTIONS MAY RETURN A DATA (A ROW AND COLUMN)
Below is an example of the file config.ini
#pandora_postgres_plugin.conf
#
#
#
#REQUIRED FIELDS
#Name of the database on which we connect
basename = david
#server address
server_addr = 127.0.0.1
#server port
port = 5432
#user to connect
user = postgres
#password
password =
#################################
#Enable Predefined Modules
# eg: Gcpu = yes (enabled)
# Gcpu = no (disabled)
# Gcpu = (disabled)
##################################
# Percentage of cpu usage
Gcpu = yes
# Percentage of memory usage
Gmem = yes
Page 9
################################################################################
#User Modules, allows users to create their own monitoring functions from sql query
#eg : usermod
# name = "user module"
# description = "user module"
# query := "SELECT count(*) from pg_stat_user_tables;" IMPORTANT query = is bad, query :=
# type = "generic_data" (default is geneneric_data)
# max_warning = This field is optional
# min_warning = This field is optional
# max_critical = This field is optional
# min_critical = This field is optional
# max = This field is optional
# min = This field is optional
# end
################################################################################
usermod
name = "Number of users from the DB"
description = "Number of users Postgres server"
query := "SELECT count(*) from pg_stat_activity;"
min_critical = 1
max_critical = 2
#type = "generic_data"
end
usermod
name = "Number of active locks the DB"
description = "Number of active locks postgres server"
query := "SELECT count(*) from pg_locks ;"
min_warning =100
max_warning = 500
#type = "generic_data"
end
usermod
name = "Number of commits"
description = "Number of commit made by the server"
query := "SELECT sum(xact_commit) FROM (pg_database AS db JOIN pg_stat_database sdb ON
db.datname=sdb.datname);"
type = "generic_data_inc"
max_warning = 25
max = 600
end
usermod
name = "Space server bytes"
description = "Space server bytes"
query := "SELECT sum(pg_database_size(datname)) FROM pg_database;"
#type = "generic_data"
end
usermod
name = "Version of the DB"
description = "Version of the postgres server"
Page 10
query := "SELECT version() ;"
type = "generic_data_string"
end
usermod
name = "Number of roles from the DB"
description = "Number of postgres server roles"
query := "SELECT count(*) from pg_roles ;"
type = "generic_data"
end
usermod
name = "Number of rollback"
description = "Number of rollback made by the server"
query := "SELECT sum(xact_rollback) FROM (pg_database AS db JOIN pg_stat_database sdb ON
db.datname=sdb.datname);"
type = "generic_data_inc"
end
usermod
name = "Number of active processes on the server"
description = "Number of active processes on the server"
query := "SELECT sum(xact_rollback) FROM (pg_database AS db JOIN pg_stat_database sdb ON
db.datname=sdb.datname);"
max = 2000
type = "generic_data"
end
usermod
name = "Number of bases in the DB"
description = "Number of bases postgres server"
query := "SELECT count(*) FROM pg_database;"
type = "generic_data"
end
usermod
name = "Tuples returned in the DB"
description = "Number tuples returned by the server"
query := "SELECT sum(tup_returned) FROM (pg_database AS db JOIN pg_stat_database sdb ON
db.datname=sdb.datname);"
type = "generic_data_inc"
end
usermod
name = "Tuples in the database searched "
description = "Tuples sought in postgres server"
query := "SELECT sum(tup_fetched) FROM (pg_database AS db JOIN pg_stat_database sdb ON
db.datname=sdb.datname);"
type = "generic_data_inc"
end
usermod
name = "Tuples inserted into the database"
description = "Tuples inserted into the postgres server"
query := "SELECT sum(tup_inserted) FROM (pg_database AS db JOIN pg_stat_database sdb ON
db.datname=sdb.datname);"
type = "generic_data_inc"
Page 11
end
usermod
name = "Updated tuples in the database"
description = "Updated tuples in the postgres server"
query := "SELECT sum(tup_updated) FROM (pg_database AS db JOIN pg_stat_database sdb ON
db.datname=sdb.datname);"
type = "generic_data_inc"
end
usermod
name = "Removed from the database tuples"
description = "number of tuples removed postgres server"
query := "SELECT sum(tup_deleted) FROM (pg_database AS db JOIN pg_stat_database sdb ON
db.datname=sdb.datname);"
type = "generic_data_inc"
end
Page 12

More Related Content

What's hot

MySQL replication & cluster
MySQL replication & clusterMySQL replication & cluster
MySQL replication & clusterelliando dias
 
CUDA by Example : CUDA C on Multiple GPUs : Notes
CUDA by Example : CUDA C on Multiple GPUs : NotesCUDA by Example : CUDA C on Multiple GPUs : Notes
CUDA by Example : CUDA C on Multiple GPUs : NotesSubhajit Sahu
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestratorYoungHeon (Roy) Kim
 
Managing PostgreSQL with Ansible - FOSDEM PGDay 2016
Managing PostgreSQL with Ansible - FOSDEM PGDay 2016Managing PostgreSQL with Ansible - FOSDEM PGDay 2016
Managing PostgreSQL with Ansible - FOSDEM PGDay 2016Gulcin Yildirim Jelinek
 
Percona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationPercona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationMydbops
 
Ajuste (tuning) del rendimiento de SQL Server 2008
Ajuste (tuning) del rendimiento de SQL Server 2008Ajuste (tuning) del rendimiento de SQL Server 2008
Ajuste (tuning) del rendimiento de SQL Server 2008Eduardo Castro
 
Troubleshooting MySQL Performance
Troubleshooting MySQL PerformanceTroubleshooting MySQL Performance
Troubleshooting MySQL PerformanceSveta Smirnova
 
Memcached Presentation @757rb
Memcached Presentation @757rbMemcached Presentation @757rb
Memcached Presentation @757rbKen Collins
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document StoreI Goo Lee
 
Documentation - Element and ElementVector
Documentation - Element and ElementVectorDocumentation - Element and ElementVector
Documentation - Element and ElementVectorMichel Alves
 
MySQL Replication: Demo Réplica en Español
MySQL Replication: Demo Réplica en EspañolMySQL Replication: Demo Réplica en Español
MySQL Replication: Demo Réplica en EspañolKeith Hollman
 
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기Ji-Woong Choi
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterI Goo Lee
 
nginx: writing your first module
nginx: writing your first modulenginx: writing your first module
nginx: writing your first moduleredivy
 
Top5 scalabilityissues withappendix
Top5 scalabilityissues withappendixTop5 scalabilityissues withappendix
Top5 scalabilityissues withappendixColdFusionConference
 
Deploy hadoop cluster
Deploy hadoop clusterDeploy hadoop cluster
Deploy hadoop clusterChirag Ahuja
 
MySQL Tokudb engine benchmark
MySQL Tokudb engine benchmarkMySQL Tokudb engine benchmark
MySQL Tokudb engine benchmarkLouis liu
 
Distributed systems at ok.ru #rigadevday
Distributed systems at ok.ru #rigadevdayDistributed systems at ok.ru #rigadevday
Distributed systems at ok.ru #rigadevdayodnoklassniki.ru
 

What's hot (20)

MySQL replication & cluster
MySQL replication & clusterMySQL replication & cluster
MySQL replication & cluster
 
CUDA by Example : CUDA C on Multiple GPUs : Notes
CUDA by Example : CUDA C on Multiple GPUs : NotesCUDA by Example : CUDA C on Multiple GPUs : Notes
CUDA by Example : CUDA C on Multiple GPUs : Notes
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestrator
 
Managing PostgreSQL with Ansible - FOSDEM PGDay 2016
Managing PostgreSQL with Ansible - FOSDEM PGDay 2016Managing PostgreSQL with Ansible - FOSDEM PGDay 2016
Managing PostgreSQL with Ansible - FOSDEM PGDay 2016
 
Bugzilla guide
Bugzilla guideBugzilla guide
Bugzilla guide
 
Percona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationPercona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL Administration
 
Operation outbreak
Operation outbreakOperation outbreak
Operation outbreak
 
Ajuste (tuning) del rendimiento de SQL Server 2008
Ajuste (tuning) del rendimiento de SQL Server 2008Ajuste (tuning) del rendimiento de SQL Server 2008
Ajuste (tuning) del rendimiento de SQL Server 2008
 
Troubleshooting MySQL Performance
Troubleshooting MySQL PerformanceTroubleshooting MySQL Performance
Troubleshooting MySQL Performance
 
Memcached Presentation @757rb
Memcached Presentation @757rbMemcached Presentation @757rb
Memcached Presentation @757rb
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document Store
 
Documentation - Element and ElementVector
Documentation - Element and ElementVectorDocumentation - Element and ElementVector
Documentation - Element and ElementVector
 
MySQL Replication: Demo Réplica en Español
MySQL Replication: Demo Réplica en EspañolMySQL Replication: Demo Réplica en Español
MySQL Replication: Demo Réplica en Español
 
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
 
nginx: writing your first module
nginx: writing your first modulenginx: writing your first module
nginx: writing your first module
 
Top5 scalabilityissues withappendix
Top5 scalabilityissues withappendixTop5 scalabilityissues withappendix
Top5 scalabilityissues withappendix
 
Deploy hadoop cluster
Deploy hadoop clusterDeploy hadoop cluster
Deploy hadoop cluster
 
MySQL Tokudb engine benchmark
MySQL Tokudb engine benchmarkMySQL Tokudb engine benchmark
MySQL Tokudb engine benchmark
 
Distributed systems at ok.ru #rigadevday
Distributed systems at ok.ru #rigadevdayDistributed systems at ok.ru #rigadevday
Distributed systems at ok.ru #rigadevday
 

Viewers also liked

Pandora FMS: Analizador de logs avanzado
Pandora FMS: Analizador de logs avanzadoPandora FMS: Analizador de logs avanzado
Pandora FMS: Analizador de logs avanzadoPandora FMS
 
Pandora FMS: Advanced Log Parser
Pandora FMS: Advanced Log Parser Pandora FMS: Advanced Log Parser
Pandora FMS: Advanced Log Parser Pandora FMS
 
Advanced pg_stat_statements: Filtering, Regression Testing & more
Advanced pg_stat_statements: Filtering, Regression Testing & moreAdvanced pg_stat_statements: Filtering, Regression Testing & more
Advanced pg_stat_statements: Filtering, Regression Testing & moreLukas Fittl
 
Regression testing
Regression testingRegression testing
Regression testingHarsh verma
 
What will testing look like in year 2020
What will testing look like in year 2020What will testing look like in year 2020
What will testing look like in year 2020BugRaptors
 
Customer Satisfaction Measures
Customer Satisfaction MeasuresCustomer Satisfaction Measures
Customer Satisfaction MeasuresMichael Lieberman
 
All you need to know about regression testing | David Tzemach
All you need to know about regression testing | David TzemachAll you need to know about regression testing | David Tzemach
All you need to know about regression testing | David TzemachDavid Tzemach
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Bitbar
 
Automated visual-regression-testing
Automated visual-regression-testingAutomated visual-regression-testing
Automated visual-regression-testingSriram Angajala
 
Automated Testing for Embedded Software in C or C++
Automated Testing for Embedded Software in C or C++Automated Testing for Embedded Software in C or C++
Automated Testing for Embedded Software in C or C++Lars Thorup
 
Regression testing
Regression testingRegression testing
Regression testingMohua Amin
 
Automated Regression Testing for Embedded Systems in Action
Automated Regression Testing for Embedded Systems in ActionAutomated Regression Testing for Embedded Systems in Action
Automated Regression Testing for Embedded Systems in ActionAANDTech
 
Chap13 intro to multiple regression
Chap13 intro to multiple regressionChap13 intro to multiple regression
Chap13 intro to multiple regressionUni Azza Aunillah
 

Viewers also liked (15)

Pandora FMS: Analizador de logs avanzado
Pandora FMS: Analizador de logs avanzadoPandora FMS: Analizador de logs avanzado
Pandora FMS: Analizador de logs avanzado
 
Pandora FMS: Advanced Log Parser
Pandora FMS: Advanced Log Parser Pandora FMS: Advanced Log Parser
Pandora FMS: Advanced Log Parser
 
Advanced pg_stat_statements: Filtering, Regression Testing & more
Advanced pg_stat_statements: Filtering, Regression Testing & moreAdvanced pg_stat_statements: Filtering, Regression Testing & more
Advanced pg_stat_statements: Filtering, Regression Testing & more
 
Regression testing
Regression testingRegression testing
Regression testing
 
What will testing look like in year 2020
What will testing look like in year 2020What will testing look like in year 2020
What will testing look like in year 2020
 
Customer Satisfaction Measures
Customer Satisfaction MeasuresCustomer Satisfaction Measures
Customer Satisfaction Measures
 
All you need to know about regression testing | David Tzemach
All you need to know about regression testing | David TzemachAll you need to know about regression testing | David Tzemach
All you need to know about regression testing | David Tzemach
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?
 
Automated visual-regression-testing
Automated visual-regression-testingAutomated visual-regression-testing
Automated visual-regression-testing
 
Automated Testing for Embedded Software in C or C++
Automated Testing for Embedded Software in C or C++Automated Testing for Embedded Software in C or C++
Automated Testing for Embedded Software in C or C++
 
Regression testing
Regression testingRegression testing
Regression testing
 
Automated Regression Testing for Embedded Systems in Action
Automated Regression Testing for Embedded Systems in ActionAutomated Regression Testing for Embedded Systems in Action
Automated Regression Testing for Embedded Systems in Action
 
Chap13 intro to multiple regression
Chap13 intro to multiple regressionChap13 intro to multiple regression
Chap13 intro to multiple regression
 
customer satisfaction
customer satisfactioncustomer satisfaction
customer satisfaction
 
Customer satisfaction
Customer satisfactionCustomer satisfaction
Customer satisfaction
 

Similar to Pandora FMS: PostgreSQL Plugin

Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...
Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...
Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...Databricks
 
Pandora FMS: DB2 Enterprise Plugin
Pandora FMS: DB2 Enterprise PluginPandora FMS: DB2 Enterprise Plugin
Pandora FMS: DB2 Enterprise PluginPandora FMS
 
0292-introduction-postgresql.pdf
0292-introduction-postgresql.pdf0292-introduction-postgresql.pdf
0292-introduction-postgresql.pdfMustafa Keskin
 
Dataguard broker and observerst
Dataguard broker and observerstDataguard broker and observerst
Dataguard broker and observerstsmajeed1
 
Build your own_map_by_yourself
Build your own_map_by_yourselfBuild your own_map_by_yourself
Build your own_map_by_yourselfMarc Huang
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012Roland Bouman
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012Roland Bouman
 
Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2PgTraining
 
Improving the performance of Odoo deployments
Improving the performance of Odoo deploymentsImproving the performance of Odoo deployments
Improving the performance of Odoo deploymentsOdoo
 
digital marketing training in bangalore
digital marketing training in bangaloredigital marketing training in bangalore
digital marketing training in bangaloreVenus Tech Inc.
 
SQL Server R Services: What Every SQL Professional Should Know
SQL Server R Services: What Every SQL Professional Should KnowSQL Server R Services: What Every SQL Professional Should Know
SQL Server R Services: What Every SQL Professional Should KnowBob Ward
 
Get expertise with mongo db
Get expertise with mongo dbGet expertise with mongo db
Get expertise with mongo dbAmit Thakkar
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellEmily Ikuta
 
OpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQLOpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQLOpen Gurukul
 
MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015Dave Stokes
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsJohn Kanagaraj
 

Similar to Pandora FMS: PostgreSQL Plugin (20)

Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...
Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...
Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...
 
GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)
 
Osol Pgsql
Osol PgsqlOsol Pgsql
Osol Pgsql
 
Pandora FMS: DB2 Enterprise Plugin
Pandora FMS: DB2 Enterprise PluginPandora FMS: DB2 Enterprise Plugin
Pandora FMS: DB2 Enterprise Plugin
 
0292-introduction-postgresql.pdf
0292-introduction-postgresql.pdf0292-introduction-postgresql.pdf
0292-introduction-postgresql.pdf
 
Dataguard broker and observerst
Dataguard broker and observerstDataguard broker and observerst
Dataguard broker and observerst
 
Build your own_map_by_yourself
Build your own_map_by_yourselfBuild your own_map_by_yourself
Build your own_map_by_yourself
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
 
Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2
 
Improving the performance of Odoo deployments
Improving the performance of Odoo deploymentsImproving the performance of Odoo deployments
Improving the performance of Odoo deployments
 
digital marketing training in bangalore
digital marketing training in bangaloredigital marketing training in bangalore
digital marketing training in bangalore
 
SQL Server R Services: What Every SQL Professional Should Know
SQL Server R Services: What Every SQL Professional Should KnowSQL Server R Services: What Every SQL Professional Should Know
SQL Server R Services: What Every SQL Professional Should Know
 
Get expertise with mongo db
Get expertise with mongo dbGet expertise with mongo db
Get expertise with mongo db
 
query_tuning.pdf
query_tuning.pdfquery_tuning.pdf
query_tuning.pdf
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a Nutshell
 
OpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQLOpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQL
 
MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
 

More from Pandora FMS

Pandora FMS: Plugin de Raven DB
Pandora FMS: Plugin de Raven DBPandora FMS: Plugin de Raven DB
Pandora FMS: Plugin de Raven DBPandora FMS
 
Pandora FMS: Raven DB Plugin
Pandora FMS: Raven DB PluginPandora FMS: Raven DB Plugin
Pandora FMS: Raven DB PluginPandora FMS
 
Pandora FMS: Plugin de Apache Hbase
Pandora FMS: Plugin de Apache HbasePandora FMS: Plugin de Apache Hbase
Pandora FMS: Plugin de Apache HbasePandora FMS
 
Pandora FMS: Cisco Remote inventory modules
Pandora FMS: Cisco Remote inventory modulesPandora FMS: Cisco Remote inventory modules
Pandora FMS: Cisco Remote inventory modulesPandora FMS
 
Pandora FMS: Plugin de exchange de acceso de web
Pandora FMS: Plugin de exchange de acceso  de web Pandora FMS: Plugin de exchange de acceso  de web
Pandora FMS: Plugin de exchange de acceso de web Pandora FMS
 
Pandora FMS: Exchange OWA Plugin
Pandora FMS: Exchange OWA PluginPandora FMS: Exchange OWA Plugin
Pandora FMS: Exchange OWA PluginPandora FMS
 
Pandora FMS: Plugin de monitorización de Outlook Anywhere
Pandora FMS: Plugin de monitorización de Outlook AnywherePandora FMS: Plugin de monitorización de Outlook Anywhere
Pandora FMS: Plugin de monitorización de Outlook AnywherePandora FMS
 
Pandora FMS: Outlook Anywhere Plugin
Pandora FMS: Outlook Anywhere PluginPandora FMS: Outlook Anywhere Plugin
Pandora FMS: Outlook Anywhere PluginPandora FMS
 
Pandora FMS: Plugin Enterprise de Exchange
Pandora FMS: Plugin Enterprise de ExchangePandora FMS: Plugin Enterprise de Exchange
Pandora FMS: Plugin Enterprise de ExchangePandora FMS
 
Pandora FMS: Exchange Enterprise plugin
Pandora FMS: Exchange Enterprise pluginPandora FMS: Exchange Enterprise plugin
Pandora FMS: Exchange Enterprise pluginPandora FMS
 
Pandora FMS: Plugin de monitorización de cliente de Exchage
Pandora FMS: Plugin de monitorización de cliente de ExchagePandora FMS: Plugin de monitorización de cliente de Exchage
Pandora FMS: Plugin de monitorización de cliente de ExchagePandora FMS
 
Pandora FMS: End to End Exchange Plugin
Pandora FMS: End to End Exchange PluginPandora FMS: End to End Exchange Plugin
Pandora FMS: End to End Exchange PluginPandora FMS
 
Pandora FMS: Monitorización de Blackberry Exchange
Pandora FMS: Monitorización de Blackberry ExchangePandora FMS: Monitorización de Blackberry Exchange
Pandora FMS: Monitorización de Blackberry ExchangePandora FMS
 
Pandora FMS: Blackberry Exchange Monitoring
Pandora FMS: Blackberry Exchange MonitoringPandora FMS: Blackberry Exchange Monitoring
Pandora FMS: Blackberry Exchange MonitoringPandora FMS
 
Pandora FMS: Plugin de Exchange ActivSync
Pandora FMS: Plugin de Exchange ActivSyncPandora FMS: Plugin de Exchange ActivSync
Pandora FMS: Plugin de Exchange ActivSyncPandora FMS
 
Pandora FMS: Exchange ActivSync Plugin
Pandora FMS: Exchange ActivSync PluginPandora FMS: Exchange ActivSync Plugin
Pandora FMS: Exchange ActivSync PluginPandora FMS
 
Pandora FMS: Plugin Enterprise de VMware
Pandora FMS: Plugin Enterprise de VMwarePandora FMS: Plugin Enterprise de VMware
Pandora FMS: Plugin Enterprise de VMwarePandora FMS
 
Pandora FMS: VMware Enterprise Plugin
Pandora FMS: VMware Enterprise PluginPandora FMS: VMware Enterprise Plugin
Pandora FMS: VMware Enterprise PluginPandora FMS
 
Pandora FMS: Plugin de monitorización de Hyper V
Pandora FMS: Plugin de monitorización de Hyper VPandora FMS: Plugin de monitorización de Hyper V
Pandora FMS: Plugin de monitorización de Hyper VPandora FMS
 
Pandora FMS: Hyper V Plugin
Pandora FMS: Hyper V PluginPandora FMS: Hyper V Plugin
Pandora FMS: Hyper V PluginPandora FMS
 

More from Pandora FMS (20)

Pandora FMS: Plugin de Raven DB
Pandora FMS: Plugin de Raven DBPandora FMS: Plugin de Raven DB
Pandora FMS: Plugin de Raven DB
 
Pandora FMS: Raven DB Plugin
Pandora FMS: Raven DB PluginPandora FMS: Raven DB Plugin
Pandora FMS: Raven DB Plugin
 
Pandora FMS: Plugin de Apache Hbase
Pandora FMS: Plugin de Apache HbasePandora FMS: Plugin de Apache Hbase
Pandora FMS: Plugin de Apache Hbase
 
Pandora FMS: Cisco Remote inventory modules
Pandora FMS: Cisco Remote inventory modulesPandora FMS: Cisco Remote inventory modules
Pandora FMS: Cisco Remote inventory modules
 
Pandora FMS: Plugin de exchange de acceso de web
Pandora FMS: Plugin de exchange de acceso  de web Pandora FMS: Plugin de exchange de acceso  de web
Pandora FMS: Plugin de exchange de acceso de web
 
Pandora FMS: Exchange OWA Plugin
Pandora FMS: Exchange OWA PluginPandora FMS: Exchange OWA Plugin
Pandora FMS: Exchange OWA Plugin
 
Pandora FMS: Plugin de monitorización de Outlook Anywhere
Pandora FMS: Plugin de monitorización de Outlook AnywherePandora FMS: Plugin de monitorización de Outlook Anywhere
Pandora FMS: Plugin de monitorización de Outlook Anywhere
 
Pandora FMS: Outlook Anywhere Plugin
Pandora FMS: Outlook Anywhere PluginPandora FMS: Outlook Anywhere Plugin
Pandora FMS: Outlook Anywhere Plugin
 
Pandora FMS: Plugin Enterprise de Exchange
Pandora FMS: Plugin Enterprise de ExchangePandora FMS: Plugin Enterprise de Exchange
Pandora FMS: Plugin Enterprise de Exchange
 
Pandora FMS: Exchange Enterprise plugin
Pandora FMS: Exchange Enterprise pluginPandora FMS: Exchange Enterprise plugin
Pandora FMS: Exchange Enterprise plugin
 
Pandora FMS: Plugin de monitorización de cliente de Exchage
Pandora FMS: Plugin de monitorización de cliente de ExchagePandora FMS: Plugin de monitorización de cliente de Exchage
Pandora FMS: Plugin de monitorización de cliente de Exchage
 
Pandora FMS: End to End Exchange Plugin
Pandora FMS: End to End Exchange PluginPandora FMS: End to End Exchange Plugin
Pandora FMS: End to End Exchange Plugin
 
Pandora FMS: Monitorización de Blackberry Exchange
Pandora FMS: Monitorización de Blackberry ExchangePandora FMS: Monitorización de Blackberry Exchange
Pandora FMS: Monitorización de Blackberry Exchange
 
Pandora FMS: Blackberry Exchange Monitoring
Pandora FMS: Blackberry Exchange MonitoringPandora FMS: Blackberry Exchange Monitoring
Pandora FMS: Blackberry Exchange Monitoring
 
Pandora FMS: Plugin de Exchange ActivSync
Pandora FMS: Plugin de Exchange ActivSyncPandora FMS: Plugin de Exchange ActivSync
Pandora FMS: Plugin de Exchange ActivSync
 
Pandora FMS: Exchange ActivSync Plugin
Pandora FMS: Exchange ActivSync PluginPandora FMS: Exchange ActivSync Plugin
Pandora FMS: Exchange ActivSync Plugin
 
Pandora FMS: Plugin Enterprise de VMware
Pandora FMS: Plugin Enterprise de VMwarePandora FMS: Plugin Enterprise de VMware
Pandora FMS: Plugin Enterprise de VMware
 
Pandora FMS: VMware Enterprise Plugin
Pandora FMS: VMware Enterprise PluginPandora FMS: VMware Enterprise Plugin
Pandora FMS: VMware Enterprise Plugin
 
Pandora FMS: Plugin de monitorización de Hyper V
Pandora FMS: Plugin de monitorización de Hyper VPandora FMS: Plugin de monitorización de Hyper V
Pandora FMS: Plugin de monitorización de Hyper V
 
Pandora FMS: Hyper V Plugin
Pandora FMS: Hyper V PluginPandora FMS: Hyper V Plugin
Pandora FMS: Hyper V Plugin
 

Pandora FMS: PostgreSQL Plugin

  • 2. Manual Monitoring postgresql Server Administration © Artica Soluciones Tecnológicas 2005­2012 Index 1.Changelog.....................................................................................3 2.Introduction...................................................................................4 3.Requirements................................................................................5 3.1.Documentation that must deliver the required monitoring area...............................5 4.Compatibility Matrix ....................................................................6 5.Installation.....................................................................................7 6.Monitorización .............................................................................8 7.Configuration file..........................................................................9
  • 3. 1 CHANGELOG Date Author Change Version 19/04/12 David First Version v1r1 Page 3
  • 4. 2 INTRODUCTION The following diagram gives an idea of the interaction of pandora plugin. This paper aims at describing the monitoring of PostgreSQL databases on Unix. To extract the information is used: • An external configuration file which defines all the parameters of the plugin. •  It uses the software already installed  on the system for monitoring by the plugin  without having to install third party libraries or utilities. • They perform a number of basic checks "default", but you can remove or customize. •  It has an interface "open"  to specify SQL queries free model allowing SQL queries  always return a data only. From a general point of view Pandora fms launches plugin, loading the configuration parameters from file configuracion.ini and performs a series of queries to postgres server and returns an xml monitoring, which is collected by pandora. We can also launch this plugin from the command line: ./pandora_postgres_plugin.pl -f file-config This implementation is using a configuration file (or boot) called configuración.ini, if we throw without use file would be: ./pandora_postgres_plugin.pl -u user -c password [-n basename] [-d dir_ip_server] [-p port] [-h] For more info ./pandora_postgres_plugin.pl -h Page 4
  • 5. 3 REQUIREMENTS The requirements to work properly this monitoring are: • Install the Pandora FMS agent. • To have perl installed. •  Having a postgresql database installed on the machine where it will be monitored, with  connectivity to the database. • Specify the name, user, password and host of the postgresql database. 3.1.  Documentation that must deliver the required monitoring area For proper monitoring postgresql is necessary for the technical area send some information  that will be included in the configuration files. This information is: • Username, password, host with access to the postgresql database. • IMPORTANT: SQL MODULES MAY MONITOR ONLY A PARAMETER THAT IS THE ONLY  QUESTIONS MAY RETURN A DATA (A ROW AND COLUMN) Page 5
  • 6. 4 COMPATIBILITY MATRIX The Agent compatibility matrix is as follows Systems which have been tested • Ubuntu 12.10 con postgresql 9 • OpenSuse 11.2 con postgresql 9 Systems where should work • Other Unix systems with postgresql 9 or  higher. Page 6
  • 7. 5 INSTALLATION To install this plugin must follow the following steps:  1st. Copy and plugin configuration file in / etc / pandora / plugins / (if you have the plugin oars in  another folder see step 2).  2nd. Access the folder where the configuration file pandora_agent.conf (in ubuntu / etc / pandora.  In this file we add a line  module_plugin perl pandora_postgres_plugin.pl -f filename_config 2> /etc/pandora/plugins/error.log In case you want to install the plugin into a separate folder will be the following line:  module_plugin perl path/pandora_postgres_plugin.pl -f filename_config 2> /etc/pandora/plugins/erro.log To perform this action you can use the following command:  sudo echo "module_plugin path/pandora_postgres_plugin.pl -f filename_config 2> /etc/pandora/plugins/error.log" >> /etc/pandora/ pandora_agent.conf Also you can install without having a configuration file, then the command is:  module_plugin ./pandora_postgres_plugin.pl -u user -c password [-n basename] [-d dir_ip_server] [-p port] 2> error.log 3 º. Reboot the agent.  sudo /etc/init.d/pandora_agent_daemon We can also install the plugin if you use the configuration file, but lose some features (like creating  your own queries). Page 7
  • 8. 6 MONITORING The plugin monitors "default" the following: • Connection Status   If possible the connection to the specified IP and ports.→ •  Server status • Server port →  Only if the server is listening. • Percentage of cpu usage  • Percentage of memory usage  Included in the file config.ini: • Number of roles from the DB. • Number of users postgres server. • Number of active locks postgres server.  • Space server bytes. • Number of commits. • Number of rollback. • Number of active processes on the server.  • Number of bases postgres server. • Number tuples returned by the server.  • Tuples in the database searched. • Tuples inserted into the postgres server. • Updated tuples in the postgres server.  • Number of tuples removed postgres server. All these modules are parameterized in the file "config.ini" that comes in the package of the plugin.  These modules can be eliminated or extended for postgresql administrator. Page 8
  • 9. 7 CONFIGURATION FILE In this file are the beginning of the plugin parameters, predefined modules and the modules we want to load user created sql. For predefinos modules (enable / disable): Percent cpu usage: GCPU = yes. If no boot file does not load Percentage of use of mem: GMem = yes. If no boot file does not load Apart from these two modules predefinos two more (but not be disabled), see list of modules. IMPORTANT: SQL MODULES MAY MONITOR ONLY A PARAMETER THAT IS THE ONLY QUESTIONS MAY RETURN A DATA (A ROW AND COLUMN) Below is an example of the file config.ini #pandora_postgres_plugin.conf # # # #REQUIRED FIELDS #Name of the database on which we connect basename = david #server address server_addr = 127.0.0.1 #server port port = 5432 #user to connect user = postgres #password password = ################################# #Enable Predefined Modules # eg: Gcpu = yes (enabled) # Gcpu = no (disabled) # Gcpu = (disabled) ################################## # Percentage of cpu usage Gcpu = yes # Percentage of memory usage Gmem = yes Page 9
  • 10. ################################################################################ #User Modules, allows users to create their own monitoring functions from sql query #eg : usermod # name = "user module" # description = "user module" # query := "SELECT count(*) from pg_stat_user_tables;" IMPORTANT query = is bad, query := # type = "generic_data" (default is geneneric_data) # max_warning = This field is optional # min_warning = This field is optional # max_critical = This field is optional # min_critical = This field is optional # max = This field is optional # min = This field is optional # end ################################################################################ usermod name = "Number of users from the DB" description = "Number of users Postgres server" query := "SELECT count(*) from pg_stat_activity;" min_critical = 1 max_critical = 2 #type = "generic_data" end usermod name = "Number of active locks the DB" description = "Number of active locks postgres server" query := "SELECT count(*) from pg_locks ;" min_warning =100 max_warning = 500 #type = "generic_data" end usermod name = "Number of commits" description = "Number of commit made by the server" query := "SELECT sum(xact_commit) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname);" type = "generic_data_inc" max_warning = 25 max = 600 end usermod name = "Space server bytes" description = "Space server bytes" query := "SELECT sum(pg_database_size(datname)) FROM pg_database;" #type = "generic_data" end usermod name = "Version of the DB" description = "Version of the postgres server" Page 10
  • 11. query := "SELECT version() ;" type = "generic_data_string" end usermod name = "Number of roles from the DB" description = "Number of postgres server roles" query := "SELECT count(*) from pg_roles ;" type = "generic_data" end usermod name = "Number of rollback" description = "Number of rollback made by the server" query := "SELECT sum(xact_rollback) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname);" type = "generic_data_inc" end usermod name = "Number of active processes on the server" description = "Number of active processes on the server" query := "SELECT sum(xact_rollback) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname);" max = 2000 type = "generic_data" end usermod name = "Number of bases in the DB" description = "Number of bases postgres server" query := "SELECT count(*) FROM pg_database;" type = "generic_data" end usermod name = "Tuples returned in the DB" description = "Number tuples returned by the server" query := "SELECT sum(tup_returned) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname);" type = "generic_data_inc" end usermod name = "Tuples in the database searched " description = "Tuples sought in postgres server" query := "SELECT sum(tup_fetched) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname);" type = "generic_data_inc" end usermod name = "Tuples inserted into the database" description = "Tuples inserted into the postgres server" query := "SELECT sum(tup_inserted) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname);" type = "generic_data_inc" Page 11
  • 12. end usermod name = "Updated tuples in the database" description = "Updated tuples in the postgres server" query := "SELECT sum(tup_updated) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname);" type = "generic_data_inc" end usermod name = "Removed from the database tuples" description = "number of tuples removed postgres server" query := "SELECT sum(tup_deleted) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname);" type = "generic_data_inc" end Page 12