Code: Select all
ps -ef --cols=300 >/tmp/info.txt
tail -1000 /var/log/messages | grep ndo2db >>/tmp/info.txt
tail -500 /usr/local/nagios/var/nagios.log |grep ndo2db >>/tmp/info.txtCode: Select all
ps -ef --cols=300 >/tmp/info.txt
tail -1000 /var/log/messages | grep ndo2db >>/tmp/info.txt
tail -500 /usr/local/nagios/var/nagios.log |grep ndo2db >>/tmp/info.txtCode: Select all
mysql 1966 1 0 Apr26 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
mysql 2523 1966 0 Apr26 ? 03:49:04 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/r
un/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sockCode: Select all
mysql 4600 1 0 11:08 ? 00:00:00 /usr/libexec/mysqld --basedir=/usrCode: Select all
symbolic-links=0Code: Select all
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pidCode: Select all
systemctl restart mariadb.serviceCode: Select all
ps -ef |grep mysqlCode: Select all
/etc/systemd/system/multi-user.target.wants/mariadb.serviceCode: Select all
[root@nodea system]# cat mariadb.service
# It's not recommended to modify this file in-place, because it will be
# overwritten during package upgrades. If you want to customize, the
# best way is to create a file "/etc/systemd/system/mariadb.service",
# containing
# .include /usr/lib/systemd/system/mariadb.service
# ...make your changes here...
# or create a file "/etc/systemd/system/mariadb.service.d/foo.conf",
# which doesn't need to include ".include" call and which will be parsed
# after the file mariadb.service itself is parsed.
#
# For more info about custom unit files, see systemd.unit(5) or
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
# For example, if you want to increase mysql's open-files-limit to 10000,
# you need to increase systemd's LimitNOFILE setting, so create a file named
# "/etc/systemd/system/mariadb.service.d/limits.conf" containing:
# [Service]
# LimitNOFILE=10000
# Note: /usr/lib/... is recommended in the .include line though /lib/...
# still works.
# Don't forget to reload systemd daemon after you change unit configuration:
# root> systemctl --system daemon-reload
# Use [mysqld.INSTANCENAME] as sections in my.cnf to configure this instance.
[Unit]
Description=MariaDB 10.1 database server
After=syslog.target
After=network.target
[Service]
Type=notify
User=mysql
Group=mysql
ExecStartPre=/usr/libexec/mysql-check-socket
ExecStartPre=/usr/libexec/mysql-prepare-db-dir %n
# MYSQLD_OPTS here is for users to set in /etc/systemd/system/[email protected]/MY_SPECIAL.conf
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
# per bug #547485
ExecStart=/usr/libexec/mysqld --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER
ExecStartPost=/usr/libexec/mysql-check-upgrade
ExecStopPost=/usr/libexec/mysql-wait-stop
# Setting this to true can break replication and the Type=notify settings
# See also bind-address mysqld option.
PrivateNetwork=false
KillMode=process
KillSignal=SIGTERM
# Don't want to see an automated SIGKILL ever
SendSIGKILL=no
# Restart crashed server only, on-failure would also restart, for example, when
# my.cnf contains unknown option
Restart=on-abort
RestartSec=5s
UMask=007
# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=300
# Place temp files in a secure directory, not /tmp
PrivateTmp=true
[Install]
WantedBy=multi-user.target
[root@nodea system]#
Code: Select all
uname -a >/tmp/info.txt
cat /etc/*release* >>/tmp/info.txt
chage -l nagios >>/tmp/info.txt
ipcs -q >>/tmp/info.txt
tail -10 /var/log/mariadb/mariadb.log >>/tmp/info.txtCode: Select all
Linux nodea.techmahindra.com 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux release 7.2.1511 (Core)
Derived from Red Hat Enterprise Linux 7.2 (Source)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.2.1511 (Core)
CentOS Linux release 7.2.1511 (Core)
cpe:/o:centos:centos:7
Last password change : Aug 31, 2016
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
------ Message Queues --------
key msqid owner perms used-bytes messages
0x25010080 148242432 nagios 600 0 0
0x12010080 148570113 nagios 600 0 0
2017-06-26 4:34:39 140252283750528 [Note] InnoDB: Completed initialization of buffer pool
2017-06-26 4:34:39 140252283750528 [Note] InnoDB: Highest supported file format is Barracuda.
2017-06-26 4:34:40 140252283750528 [Note] InnoDB: 128 rollback segment(s) are active.
2017-06-26 4:34:40 140252283750528 [Note] InnoDB: Waiting for purge to start
2017-06-26 4:34:40 140252283750528 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.31-77.0 started; log sequence number 1680347
2017-06-26 4:34:40 140251485959936 [Note] InnoDB: Dumping buffer pool(s) not yet started
2017-06-26 4:34:40 140252283750528 [Note] Plugin 'FEEDBACK' is disabled.
2017-06-26 4:34:40 140252283750528 [Note] Server socket created on IP: '::'.
2017-06-26 4:34:40 140252283750528 [Note] /usr/libexec/mysqld: ready for connections.
Version: '10.1.17-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
Databse Error
A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.
Run the following from the CLI as root to attempt to repair the DB:
/usr/local/nagiosxi/scripts/repair_databases.sh
Code: Select all
service nagios stop
service ndo2db stop
service crond stop
service mariadb stop
for i in `ipcs -q | grep nagios |awk '{print $2}'`; do ipcrm -q $i; done
service mariadb start
mysqlcheck -f -r -u root -pnagiosxi --all-databases
service ndo2db start
service nagios start
service crond startCode: Select all
service crond stop
killall -9 crond
service crond start