Page 1 of 3

New Install, Apache & mysql checks fail

Posted: Wed Jul 08, 2015 8:57 am
by benningtonr
We have a new server, and after installing the nagios client I have a few checks that fail. I am sure this is a simple fix, but I am weak in the area of changing Linux files so I need some help.

Thank you

Re: New Install, Apache & mysql checks fail

Posted: Wed Jul 08, 2015 9:05 am
by benningtonr
Oh, and CPU stats is getting the following

UNKNOWN: iostat not found or is not executable by the nagios user.

Re: New Install, Apache & mysql checks fail

Posted: Wed Jul 08, 2015 9:13 am
by lmiltchev
The "iostat" is usually part of "sysstat". Depending on the OS/distro, you can install the missing package on the remote box (client) by running:

on CentOS/RHEL

Code: Select all

yum install sysstat -y
on Ubuntu/Debian

Code: Select all

sudo apt-get install sysstat
Hope this helps.

Re: New Install, Apache & mysql checks fail

Posted: Wed Jul 08, 2015 9:54 am
by benningtonr
This is a production box, what affects will this have?

Re: New Install, Apache & mysql checks fail

Posted: Wed Jul 08, 2015 9:59 am
by jolson
The command will fetch a package from the internet and install it on the server - this will use bandwidth, CPU time, and disk space. I don't think you'll have a problem with the installation of sysstat, and I don't think installing it will negatively impact your production box.

Re: New Install, Apache & mysql checks fail

Posted: Wed Jul 08, 2015 10:03 am
by lmiltchev
In addition to what jolson said, here's some info about sysstat:
Sysstat is a powerful logging and monitoring tool for Linux/Unix systems. It can be used to monitor system performance and troubleshoot problems.
https://www.maketecheasier.com/monitor- ... h-sysstat/

Re: New Install, Apache & mysql checks fail

Posted: Wed Jul 08, 2015 10:11 am
by benningtonr
Okay, great, it was installed and is working.
Oh it is an ubuntu server 14.04.2 LTS
Now all that is left are these:

Apache Web Server Critical 1h 33m 4s 5/5 2015-07-08 11:00:21 NRPE: Unable to read output
Memory Usage Warning 1h 6m 51s 5/5 2015-07-08 11:01:46 WARNING - 2818 / 3953 MB (%) Free Memory, Used: 1135 MB, Shared: 7 MB, Buffers: 244 MB, Cached: 588 MB
MySQL Server Critical 1h 33m 4s 5/5 2015-07-08 11:00:23 NRPE: Unable to read output

Memory usage is 1100 MB so there seems to be an issue with the way it is reading memory it should read about 75% free and be clean and green
The other two are self explanitory.

Thanks again for all the assistance.

Re: New Install, Apache & mysql checks fail

Posted: Wed Jul 08, 2015 10:14 am
by abrist
Can you post the full check commands for these 3 checks?

Re: New Install, Apache & mysql checks fail

Posted: Wed Jul 08, 2015 10:18 am
by benningtonr
check_nrpe!check_init_service!-a 'httpd'

check_nrpe!check_mem!-a '-w 20 -c 10'

check_nrpe!check_init_service!-a 'mysqld'

Not completly sure this is what you want but it is a start.

Thank you

Re: New Install, Apache & mysql checks fail

Posted: Wed Jul 08, 2015 10:43 am
by benningtonr
define service {
host_name SkillsOnLine
service_description Apache Web Server
use xiwizard_nrpe_service
servicegroups HDD Usage,ICMP
check_command check_nrpe!check_init_service!-a 'httpd'
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts chrisj,davev,Dina Richards,ronb


define service {
host_name SkillsOnLine
service_description MySQL Server
use xiwizard_nrpe_service
servicegroups HDD Usage,ICMP
check_command check_nrpe!check_init_service!-a 'mysqld'
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts chrisj,davev,Dina Richards,ronb
_xiwizard linux-server
register 1
}

define service {
host_name SkillsOnLine
service_description Memory Usage
use xiwizard_nrpe_service
servicegroups HDD Usage,ICMP
check_command check_nrpe!check_mem!-a '-w 20 -c 10'
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 1
contacts chrisj,davev,Dina Richards,ronb
_xiwizard linux-server
register 1
}