Xitoring Document
Home
FAQ
Support
Register
Home
FAQ
Support
Register
  • Xitoring

    • Introduction
    • Release Notes
    • Xitoring Release Notes
    • Linux Xitogent Release Notes
    • Windows Xitogent Release Notes
    • Xitoring Mobile App Release Notes
    • Account Management
    • API Access & Automation
    • Team Management & Collaboration
    • Billing & Subscription Management
  • Getting Started

    • Getting Started with Xitoring
    • Workflows & Guides
    • Monitor Your First Server
    • Import / Migration
    • Migrate from UptimeRobot to Xitoring
    • Migrate from Pingdom to Xitoring
    • Migrate from Uptime.com to Xitoring
    • Migrate from BetterStack to Xitoring
  • Help & Support

    • FAQ & Troubleshooting
    • Glossary
  • Server Monitoring

    • Server Monitoring
    • Graphs
    • Live Statistics
    • Monitor Services
    • Auto-Triggers
  • Xitogent on Linux

    • Install Xitogent on Linux
    • Update Xitogent on Linux
    • Uninstall Xitogent on Linux
  • Xitogent on Windows

    • Install Xitogent on Windows
    • Uninstall Xitogent on Windows
    • Xitogent Service
    • Update Xitogent on Windows
    • Disk Performance (I/O)
  • Xitogent on Azure

    • Xitogent on Azure
    • Monitor Azure Linux VM
    • Monitor Azure Windows VM
  • Xitogent CLI

    • Xitogent CLI
    • Xitogent Pause/Unpause
    • Xitogent Status
    • Xitogent debug
    • Xitogent Diagnosis
    • Which data we collect
  • Xitoring CLI

    • Xitoring CLI
  • Uptime Monitoring

    • What is Uptime Monitoring
    • Monitoring Nodes (Geographic Locations)
    • What is Check
    • Auto-Discovery
    • Auto Fault Tolerance
    • Heartbeat Check
    • Ping Check
    • HTTP(S) Check
    • DNS Check
    • FTP Check
    • SMTP Check
    • IMAP Check
    • POP3 Check
    • TCP Check
    • UDP Check
  • SSL Monitoring

    • SSL Monitoring
  • Incidents

    • Incidents
    • Incident's Root Cause
    • Incidents Notification
    • Incident Notes
    • Resolving Incidents Manually
    • Incident Policy
  • Maintenance Schedule

    • Maintenance Schedule
  • Email Reports

    • Email Reports
  • Integrations

    • Integrations
    • Apache Integration
    • CoreDNS Integration
    • CouchDB Integration
    • Disk Health Integration
    • Docker Integration
    • Dovecot Integration
    • Exim Integration
    • HAProxy Integration
    • IIS Integration
    • InfluxDB Integration
    • Kafka Integration
    • KeyDB Integration
    • LiteSpeed Integration
    • MongoDB Integration
    • MySQL Integration
    • Netstat Integration
    • Nginx Integration
    • OpenLiteSpeed Integration
    • OpenVPN Integration
    • PHP-FPM Integration
    • Postfix Integration
    • PostgreSQL Integration
    • RabbitMQ integration
    • Redis Integration
    • MS SQL Server Integration
    • Supervisor Integration
    • Varnish Integration
    • Wireguard Integration
  • Notifications

    • Notifications
    • Creating Notification Roles
    • Email Integration
    • Mobile Push Notifications
    • SMS Integration
    • Phone call Integration
    • Webhook Integration
    • Integration for Slack
    • Telegram Integration
    • WhatsApp Integration
    • Mattermost Integration
    • Discord Integration
    • Google Chat Integration
    • Microsoft Teams Integration
    • Atlassian Opsgenie Integration
    • Splunk On-Call Integration
    • Pushover Integration
    • Pushbullet Integration
    • Gotify Integration
    • Ntfy Integration
    • Spike.sh Integration
    • PagerDuty Integration
    • Zapier Integration
    • AlertOps Integration
  • Status Page

    • Status page
  • 3rd Party Status Pages

    • Using 3rd party Status Pages
    • Atlassian Status Page Integration with Xitoring
    • Status.io Integration with Xitoring
    • Statuspal Integration with Xitoring
    • Instatus Integration with Xitoring
  • Dashboards

    • Main Dashboard
    • Custom Dashboards
  • Metrics

    • Metrics
  • MCP Server

    • Setup & Tool Reference

PostgreSQL Integration

PostgreSQL, also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance.

Monitoring the PostgreSQL is crucial to ensure performance and availability. Xitoring provides a comprehensive monitoring solution for PostgreSQL that allows users to monitor performance, usage, and resource metrics easily.

Enable PostgreSQL Integration

Tips

PostgreSQL (Postgres) is supported on both Linux and Windows, on versions: 12,13,14,15,16

In order to enable PostgreSQL integration on Xitogent please follow this step-by-step guide:

  1. Run following queries on your Postgres CLI or GUI:

     create user xitogent with password 'YOUR_PASSWORD';
     grant pg_monitor to xitogent;
     grant SELECT ON pg_stat_database to xitogent;
    
  2. Verify that the permissions are correct by running the following command:

     psql -h localhost -U xitogent postgres -c \
     "select * from pg_stat_database LIMIT(1);" \
     && echo -e "\e[0;32mPostgres connection - OK\e[0m" \
     || echo -e "\e[0;31mCannot connect to Postgres\e[0m"
    
  3. Now it's required to modify PostgreSQL configuration to enable performance and monitoring metrics. Please note that the configuration file path could vary based on OS and installation method.

    1. On Linux servers you can probably find the configuration file on /etc/postgresql/14/main/postgresql.conf
    2. On Windows servers you can probably find the configuration file on C:\Program Files\PostgreSQL\16\data\postgresql.conf

Required configurations to apply on the file:

track_activities = on
track_counts = on
track_io_timing = on
track_functions = all
shared_preload_libraries = 'pg_stat_statements'
  1. Connect to your PostgreSQL again to run the following query: CREATE EXTENSION IF NOT EXISTS pg_stat_statements;

  2. Now run the following query to verify the setup: SELECT * FROM pg_stat_statements; if you are getting a response, everything is fine.

  3. Now run xitogent integrate and select PostgreSQL from the list, and provide host (localhost), port (5432), user, password, and SSL mode.

  4. Xitogent will test the connection and set up the rest automatically. After a minute you can see graphs and data on your Server overview.

Setup Triggers for PostgreSQL integration

Xitogent also enables users to create Triggers for PostgreSQL integrations and set up incidents based on specific parameters. These parameters include:

CPU
Memory
Active connections
Idle connections
Cache hit
Total disk space
Database deadlocks
Active queries
Waiting queries
Committed transactions
Rollback transactions
Read disk blocks
Rows returned
Rows selected
Rows inserted
Rows updated
Rows deleted

For instance, users can create a Trigger for Total queries per second that generates an incident if the total queries exceed a specific threshold. On the Trigger page, users can view the current value for each parameter and configure their alerts accordingly.

Last Updated: 2/25/24, 11:31 AM
Prev
Postfix Integration
Next
RabbitMQ integration