Coder Social home page Coder Social logo

postgresql_zabbix's Introduction

Monitoring PostgreSQL in Zabbix 3.2

PostgreSQL is a modern, dynamically developing database management system with a very large set of capabilities that allow you to solve a wide range of tasks. The use of PostgreSQL generally refers to a very critical segment of the IT infrastructure that is associated with processing and storing data. Given the special place of the Data Base in the infrastructure and the degree of criticality of the tasks assigned to it, the question arises of monitoring and proper control over the operation of the DBMS. In this regard, PostgreSQL has extensive internal means of collecting and storing statistics. Collected statistics allows you to get a fairly detailed picture of what happens under the hood during the operation of the DBMS. This statistics is stored in special system tables-views and is constantly updated. Performing ordinary SQL queries in these tables, you can get a variety of data on databases, tables, indexes and other subsystems of the DBMS. Below I describe the way and means for monitoring PostgreSQL in the Zabbix monitoring system. I like this monitoring system because it provides ample opportunities for realizing the most customary monitoring of various systems and processes.

Monitoring will be based on SQL queries to the statistics tables. The queries themselves are configured as an additional configuration file to the zabbix agent, in which the SQL queries are wrapped in the so-called. UserParameters - user-defined monitoring parameters. The custom parameter in Zabbix is ​​a great way to configure monitoring for non-standard things, such things in our case will be the parameters of PostgreSQL. Each user parameter consists of two elements: Key name and Command. The key name is a unique name that does not intersect with other key names. The command is the actual action command that the zabbix agent must execute. In the expanded version, this command can be passed various parameters.

Install

Install the zabbix-agent and add user parametr in etc/zabbix/zabbix_agentd.conf

after restart zabbix agent

 systemctl restart zabbix-agent

Let's give the user access to the database

 /var/lib/pgsql/9.4/data/pg_hba.conf
 
host    all             postgres             127.0.0.1/32            trust

and restart for apply

service postgresql-9.4 restart

Cheсk the connect to Data Base

 sudo -u postgres psql -h 127.0.0.1 -p 5432 -U postgres -d freeswitchdb

Import template in Zabbix Server

Then we import the template and add it to the network node, after that go to the macro and set access to the database

alt text

also you can import complex screen

alt text

postgresql_zabbix's People

Contributors

skletsov avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.