Apache problem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Apache problem

Post by benningtonr »

I have Ubuntu 12, with Apache installed and running, i also installed the nagios update
i used the Linux wizard, and i have a couple issue

1. Apache Web Server Critical 41m 3s 5/5 2012-05-24 11:35:10 NRPE: Unable to read output

2. CPU Stats Unknown 40m 34s 5/5 2012-05-24 11:35:39 UNKNOWN: iostat not found or is not executable by the nagios user.

Thanks for all the help
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Apache problem

Post by scottwilkerson »

1. It is possible apache is running under a different name than was specified in the wizard by default.

2. You likely need to install sysstat

Code: Select all

sudo apt-get sysstat
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: Apache problem

Post by benningtonr »

ronb@ubuntu:/$ sudo apt-get sysstat
[sudo] password for ronb:
E: Invalid operation sysstat
ronb@ubuntu:/$ apt-get sysstat
E: Invalid operation sysstat
ronb@ubuntu:/$ sudo apt-get sysstat
E: Invalid operation sysstat
ronb@ubuntu:/$ sudo apt-get sysstat
E: Invalid operation sysstat
ronb@ubuntu:/$

That command does not run.
This is on a clean Ubuntu 12 install as a vm, just for testing Nagios.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Apache problem

Post by scottwilkerson »

Sorry, I missed the install keyword

Code: Select all

sudo apt-get install sysstat
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: Apache problem

Post by benningtonr »

Silly question, do I install this on Ubuntu, or nagios vm?
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: Apache problem

Post by benningtonr »

I ran this on the ubuntu vm, still getting the same critical error
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Apache problem

Post by scottwilkerson »

This was for the following error
UNKNOWN: iostat not found or is not executable by the nagios user.
actually looking again the critical error looks like your NRPE config might not have the command you are calling specified.

What wizard are you running? What procedure did you follow to install the agent on this Ubuntu machine?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: Apache problem

Post by benningtonr »

i used the ubuntu/debian agent installation instructions from the linux wizard.

Linux wizard
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: Apache problem

Post by benningtonr »

here is the command in nagios

check_nrpe!check_init_service!-a 'httpd'
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Apache problem

Post by lmiltchev »

Re: Apache issue

Go to the Core Config Manager->Monitoring->Services->Config name filter: <your_Ubuntu_box> ->Apache Web Server->Modify->Common Settings tab - change:

Code: Select all

$ARG2$ = -a 'httpd'
to

Code: Select all

$ARG2$ = -a 'apache2'
Click on "Save" and "Apply Configuration".

Re: iostat

In order to install iostat on your client machine (Ubuntu box), run in terminal:

Code: Select all

sudo apt-get install sysstat
Run a test check - run the following commands in a terminal on your Nagios server:

Code: Select all

cd /usr/local/nagios/libexec
./check_nrpe -H <IP_address_of_your_Ubuntu_machine> -t 30 -c check_cpu_stats -a '-w 85 -c 95'
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked