Article Number: 513 Rating: 5/5 from 1 votes Last Updated: Tue, Jul 19, 2016 at 10:09 PM

Similar documents
It is important to remember that an external worker needs all of the plugins installed on it so it can execute the checks that are handed to it.

Article Number: 722 Rating: Unrated Last Updated: Thu, Jul 20, 2017 at 12:31 AM

Article Number: 602 Rating: Unrated Last Updated: Tue, Jan 2, 2018 at 5:13 PM

Article Number: 549 Rating: Unrated Last Updated: Tue, May 30, 2017 at 11:02 AM

This is sometimes necessary to free up disk space on a volume that cannot have extra disk space easily added.

Article Number: 552 Rating: Unrated Last Updated: Sun, Nov 20, 2016 at 6:09 PM. This guide will show you how to integrate Nagios XI with ServiceNow.

Offloading MySQL to Remote Server

This guide is broken up into several sections and covers different Linux distributions and non- Linux operating systems.

Argument 1 = A number (0, 1, 2, 3) that will be used as the exit code the script will exit with (this is how Nagios determines the status)

Monitoring Apache Tomcat Servers With Nagios XI

Offloading NDO2DB To Remote Server

OK: {C: 68% free / 99.51GB total} 'C: free'= g; ; ;0; 'C: free %'=68%;20;10;0;100

Article Number: 38 Rating: Unrated Last Updated: Thu, Apr 28, 2016 at 9:49 PM

Purpose. Target Audience. Windows Machine Requirements. Windows Server Core (No Desktop) Nagios XI. Monitoring Windows Using WMI

Purpose. Target Audience. Install SNMP On The Remote Linux Machine. Nagios XI. Monitoring Linux Using SNMP

There are separate firewall daemons for for IPv4 and IPv6 and hence there are separate commands which are provided below.

How To Monitor Apache Cassandra Distributed Databases

Visualize Your Data With Grafana Percona Live Daniel Lee - Software Engineer at Grafana Labs

Article Number: 406 Rating: 3/5 from 2 votes Last Updated: Mon, Jun 5, 2017 at 3:08 AM. This document describes how to install NDOUtils from source.

Article Number: 569 Rating: 2.7/5 from 3 votes Last Updated: Tue, Sep 12, 2017 at 2:54 AM

Publish Joomla! Article

Publish Joomla! Article

Backing Up And Restoring Your Nagios XI System

This document is intended for use by Nagios Administrators that want to use Slack for notifications.

Nortridge Loan System

Download and Installation Instructions: After WAMP Server download start the installation:

Article Number: 802 Rating: 4/5 from 1 votes Last Updated: Wed, Mar 7, 2018 at 5:20 PM

Contents. Getting Set Up Contents 2

This document covers how to manage fused servers in Nagios Fusion.

Downloading and Managing Firmware in Cisco UCS Central

Nagios XI Host and Service Details Overview

Illustrated Steps to create greggroeten.net with AWS

MassTransit 6.0 Installation Guide for Enterprise and Professional Servers on Macintosh

WAMP Bundle installation guide for CCSuite

Purpose. Target Audience. Prerequisites. What Is An Event Handler? Nagios XI. Introduction to Event Handlers

Article Number: 801 Rating: Unrated Last Updated: Tue, Mar 13, 2018 at 9:19 PM

Plugin Monitoring for GLPI

Performance Monitoring and SiteScope

Notifications 4 How to set notifications for a particular item 4. s 4 How to one or more members of the committee 4

1Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12

How to recover a lost administrator password?

Plugin Monitoring for GLPI

IELM 511 Information Systems Design Labs 5 and 6. DB creation and Population

VMWARE VREALIZE OPERATIONS MANAGEMENT PACK FOR. Nagios. User Guide

PHP: Cookies, Sessions, Databases. CS174. Chris Pollett. Sep 24, 2008.

PHP Arrays. Lecture 18. Robb T. Koether. Hampden-Sydney College. Mon, Mar 4, 2013

Database connection 1

This document is intended for use by Nagios Administrators that want to monitor SNMP devices using an SNMP Walk to discover it's available objects.

Causeway ECM Team Notifications. Online Help. Online Help Documentation. Production Release. February 2016

Understanding The User Macros Component

Configure 802.1x - PEAP with FreeRadius and WLC 8.3

Mysql Tutorial Create Database Username Password Through Phpmyadmin

Database Performance Analyzer (DPA) Quick Demo

Review a Sample Database Using a SQLyog MySQL GUI Tool

RSA NetWitness Logs. Salesforce. Event Source Log Configuration Guide. Last Modified: Wednesday, February 14, 2018

Enterprise Navigation

This document is intended for use by Nagios XI Administrators who wish to monitor JMX applications.

Performance Monitors Setup Guide

Nagios XI Monitoring Windows Event Logs With NagEventLog

HP Intelligent Management Center v7.1 MySQL 5.6 Installation and Configuration Guide (Windows)

next Using PearsonAccess for the ACT Test

Install some base packages. I recommend following this guide as root on a new VPS or using sudo su, it will make running setup just a touch easier.

Integrate MySQL Server EventTracker Enterprise

Microsoft Expression Web Basics of Creating a Web Site

1Z MySQL Cloud Service 2018 Implementation Essentials Exam Summary Syllabus Questions

This FAQ is only applicable for hostings ordered after 23/6/2010

VMware Horizon View Deployment

DATABASE SYSTEMS. Introduction to MySQL. Database System Course, 2018

Apache Manual Install Ubuntu Php Mysql. Phpmyadmin No >>>CLICK HERE<<<

NETWRIX GROUP POLICY CHANGE REPORTER

BioStar INSTALLATION GUIDE. Version 1.00 English

vcenter Support Assistant User's Guide

Installing LAMP on Ubuntu and (Lucid Lynx, Maverick Meerkat)

Coveo Platform 7.0. Oracle UCM Connector Guide

INSTALLING RACHEL ON SYNOLOGY GIAKONDA IT

Assuming you have Icinga 2 installed properly, and the API is not enabled, the commands will guide you through the basics:

vrealize Operations Manager Customization and Administration Guide vrealize Operations Manager 6.4

More DEV Less OPS. An introduction to Opsview s Event Handlers. Summary Strategy What Kind of Automation Do I Want?...

Infoblox Authenticated DHCP

MySQL 5.x on QNX Neutrino OS Step-by-step installation manual

Using PHP with MYSQL

Managing Administrator Preferences

vcenter Operations Manager for Horizon View Administration

CentOS 7 with MariaDB

Application Notes for Integrating Vitel Ivize with Avaya Modular Messaging - Issue 1.0

Host and Service Status pages provide a Network Traffic Analysis tab

AuditConfigurationArchiveandSoftwareManagementChanges (Network Audit)

v5: How to restore Exchange databases

VMware vrealize Operations Management Pack for vcloud Director 4.5 Guide

Exercises. Notes: Exercise 1. Install the Cacti Plugin Architecture (Cacti PA)

AUTOMATING THE COLLECTION OF DATA

Princess Nourah bint Abdulrahman University. Computer Sciences Department

icontact for Salesforce Installation Guide

v7.0 Intelligent Management Center MySQL 5.5 Installation and Configuration Guide (for Windows)

Volunteer Scheduler Pro Quick Start Guide Salvation Army

CallAnalyst Enterprise CallAlert (Version 2.3)

Installing Dolphin on Your PC

Salesforce ldeas Implementation Guide

Implementing the NI TestStand Connector

LEMP Image Guide. Date Version Description. 7.15/2017 V1.2 Alibaba cloud Image doc V /2017 V1.1 Alibaba cloud Image doc V1.

Transcription:

Nagios XI - MySQL/MariaDB - Max Connections Article Number: 513 Rating: 5/5 from 1 votes Last Updated: Tue, Jul 19, 2016 at 10:09 PM O ve r vie w This KB article is about the MySQL / MariaDB database and adjusting the maximum connections allowed. This can be required in larger XI installations. Historically MySQL has been the database used by Nagios XI, however in CentOS 7.x onwards MariaDB is used instead of MySQL. MariaDB is simply a fork of the MySQL database how scenario. This KB article applies to Nagios XI implementations that have the database server on the same server as Nagios XI (default) OR if you have offloaded the database server to an ext This KB article covers three topics: 1. Identifying the current maximum connections allowed and what it has peaked at 2. Increasing the maximum connections allowed to the database application 3. Ongoing monitoring of the connections to help identify if they need increasing in the future Generally you'll be reading this article because you may have noticed events like this in your log files: PHP Warning: mysql_connect(): Too many connections I de nt if ying C o nne c t io ns By default, the database server allows 151 connections. You can determine the current maximum allowed connections using this command: mysql -uroot -pnagiosxi -e "show variables like 'max_connections';" Variable_name Value max_connections 151 How do you know if you need to increase this value? We can run another query that shows us what the peak number of connections has been since the database server daemon was mysql -uroot -pnagiosxi -e "show global status like 'Max_used_connections';" Variable_name Value Max_used_connections 65 If the number returned is the same as (or close to max_connections) then you need to increase the allowed number of max_connections. If you have an offloaded database server, execute those commands on the offloaded database server. I nc r e a s ing Ma x C o nne c t io ns In this example we are going to define max_connections at 1000. It has been observed that MariaDB can only have it's max_connections= set to a maximum of 818. If you use any value greater MariaDB will default back to a value of 214. In On your Nagios XI server OR your offloaded database server, edit the file /etc/my.cnf Add the following line in the section [mysqld] max_connections=1000 If the line already exists, simply change the value to a higher number. Save the file. Now execute the following commands: :

: service nagios stop service ndo2db stop OR Offloaded Database Server: service mysqld restart : service ndo2db start service nagios start Once you have performed these steps, you can execute the commands outlined in the "Identifying Connections" section of this KB article to ensure the changes have applied. O ngo ing Mo nit o r ing Now that you have made the changes, you should create some Nagios services to monitor the connections. This will allow you to observe the changes you have made as you may nee There are two different metrics we will monitor: Max_used_connections The maximum number of connections that have been in use simultaneously since the server started Threads_connected The number of currently open connections The services will generate performance graphs, which will help identify trends. First, we need to create a user account in the database server that can access these metrics. This read only account will not be granted access to any of the databases, it is simply u In the following commands, the username is readonly and the password is readonly_password echo "CREATE USER 'readonly'@'localhost' IDENTIFIED BY 'readonly_password';" mysql -u root -p'nagiosxi' Offloaded Database Server: If you have an offloaded database server, you will need to run this command instead. This command uses 10.25.5.2 as the IP address of the Nagios XI server. You will need to cha echo "CREATE USER 'readonly'@'10.25.5.2' IDENTIFIED BY 'readonly_password';" mysql -u root -p'nagiosxi' Now we can test the plugin commands before creating the services. Nagios XI comes bundled with the plugin which will be used for the services. This command checks the Max_used_connections and has the critical threshold of 1000: /usr/local/nagios/libexec/ -u readonly -preadonly_password -d information_schema -q "select variable_value from global Connecting To Remote Database Server: /usr/local/nagios/libexec/ -H offloaded_server -u readonly -preadonly_password -d information_schema -q "select variab QUERY OK: 'select variable_value from global_status where Variable_name='Max_used_connections';' returned 67.000000 result=67.000000; This command checks the Threads_connected and has the warning threshold of 900: /usr/local/nagios/libexec/ -u readonly -preadonly_password -d information_schema -q "select variable_value from global Connecting To Remote Database Server: /usr/local/nagios/libexec/ -H offloaded_server -u readonly -preadonly_password -d information_schema -q "select variab QUERY OK: 'select variable_value from global_status where Variable_name='Threads_connected';' returned 42.000000 result=42.000000;900 After testing that both of those commands worked, the next step is to create the services in Nagios XI. Click the C onfigure menu Click C o re C o nfig ura tio n Ma na g e r In the left pane under C o mma nd s click C o mma nd s Populate the fields as follows:

Command Name Command Line $USER1$/ $ARG2$ $ARG3$ Command Type check command Checked In the left pane under Monitoring click See rvicee s This is for Max_used_connections Populate the fields on each tab as follows: localhost Description Database Max_used_connections Select localhost Manage Templates button Select xiwizard_mysqlquery_service -u readonly -p'readonly_password' $ARG2$ -d information_schema -q "select variable_value from global_status where Variable_name='Max_used_conn $ARG3$ -c :1000 C he c k S e tting s Check interval 15 Retry interval 5 Max check attempts 6 Check period xi_timeperiod_24x7 Ale rt S e tting s Complete any notification options as required This is for Threads_connected Populate the fields on each tab as follows: localhost

Description Database Threads_connected Select localhost Manage Templates button Select xiwizard_mysqlquery_service -u readonly -p'readonly_password' $ARG2$ -d information_schema -q "select variable_value from global_status where Variable_name='Threads_connect $ARG3$ -w :900 C he c k S e tting s Check interval 15 Retry interval 5 Max check attempts 6 Check period xi_timeperiod_24x7 Ale rt S e tting s Complete any notification options as required Click Apply C onfigura tion In the services above, if you have an offloaded database server, change the following: The name of the offloaded database server (you'll need a host object for this) Select the offloaded database server -H offloaded_server -u readonly -p'readonly_password' Here are some performance graphs to demonstrate the history collected by these services.

Fina l Tho ught s For any support related questions please visit the Nagios Support Forums at: http://support.nagios.com/forum/ Posted by: tle a - Thu, Jun 2, 2016 at 2:30 AM. This article has been viewed 4802 times. Online URL: https://support.nagios.com/kb/article/nagios-xi-mysql-mariadb-max-connections-513.html