Nagios & Apache problem
-
idefixgallier
- Posts: 10
- Joined: Mon Feb 10, 2014 8:57 am
Nagios & Apache problem
Hi!
I am using nagios 4.02 on an Ubuntu 12.04 - both were running
for a longer period of time without any issues.
Todays restart of nagios and apache2 (i configured a new iftraffic check) made
nagios running and apache2 running, but each cgi called from the web interface
ends up in:
Error: Could not read object configuration data!
I reinstalled nagios completely, tested the cgi scripts from the command line (with
nagios user, nagcmd user and www-data user) ... tested for errors in the config files, of course
... nothing
nagios.log and apache.log are without any information to that topic....
Any tipss for me?
I am using nagios 4.02 on an Ubuntu 12.04 - both were running
for a longer period of time without any issues.
Todays restart of nagios and apache2 (i configured a new iftraffic check) made
nagios running and apache2 running, but each cgi called from the web interface
ends up in:
Error: Could not read object configuration data!
I reinstalled nagios completely, tested the cgi scripts from the command line (with
nagios user, nagcmd user and www-data user) ... tested for errors in the config files, of course
... nothing
nagios.log and apache.log are without any information to that topic....
Any tipss for me?
Re: Nagios & Apache problem
Nagios most likely is not running. Try:idefixgallier wrote: Error: Could not read object configuration data!
Code: Select all
service nagios stop
killall nagios
ps -aef | grep nagios.cfg
service nagios startFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
idefixgallier
- Posts: 10
- Joined: Mon Feb 10, 2014 8:57 am
Re: Nagios & Apache problem
Thank you for the answer -
as i posted ... yes nagios is running (its collecting data, sending warning mails/sms, etc) ...
as i posted ... yes nagios is running (its collecting data, sending warning mails/sms, etc) ...
Re: Nagios & Apache problem
But you may have multiple instances, with one hung up. Did you try the above steps at least?
Could you post a tail of your apache log?
Lets check the groups settings:
And check if the nagios user is expired:
Could you post a tail of your apache log?
Code: Select all
tail -25 /var/log/httpd/error_logCode: Select all
grep nag /etc/groupCode: Select all
chage -l nagiosFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
idefixgallier
- Posts: 10
- Joined: Mon Feb 10, 2014 8:57 am
Re: Nagios & Apache problem
Hi,
yes I restarted nagios, i have restarted the whole server too.
I installed nagios from scretch, I actived a backup from last week,
i checked the user and the usergroups (www-data group and user).
no effect.
There are no hints in the log - i tested the status.cgi and tac.cgi
with the www-data user ... correct html was displayed on the bash
(i disabled authentication before)
I even straced the apache processes ... no evidence of a problem...
In the meantime,i did a complete restore of the whole server from last weekend and
nagios is running again.
I hope that (whatever it was) is not appearing again as really not having
any clue what was happening.
yes I restarted nagios, i have restarted the whole server too.
I installed nagios from scretch, I actived a backup from last week,
i checked the user and the usergroups (www-data group and user).
no effect.
There are no hints in the log - i tested the status.cgi and tac.cgi
with the www-data user ... correct html was displayed on the bash
(i disabled authentication before)
I even straced the apache processes ... no evidence of a problem...
In the meantime,i did a complete restore of the whole server from last weekend and
nagios is running again.
I hope that (whatever it was) is not appearing again as really not having
any clue what was happening.
Re: Nagios & Apache problem
That is good to hear, but this is not a solution. Hopefully this does not happen again.idefixgallier wrote:In the meantime,i did a complete restore of the whole server from last weekend and
nagios is running again.
The error you experienced is almost always caused by multiple daemons, or permission/group issues. Let us know if this recurs.idefixgallier wrote:I hope that (whatever it was) is not appearing again as really not having
any clue what was happening.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
idefixgallier
- Posts: 10
- Joined: Mon Feb 10, 2014 8:57 am
Re: Nagios & Apache problem
I have found the solution - it is possibly a bug in nagios itself:
(and ... its reproducable)
I found the same "error" on my old nagios system and on a completly new system -
when i change the parameter retry_check_interval from integer to float (in my case 1 to 0.5)
nagios is running without any problems (and is doing a 30second retry check interval)
BUT
As soon as i change it to 1 (integer) again ... both are working again.
Try it yourself ...
regards
Martin
(and ... its reproducable)
I found the same "error" on my old nagios system and on a completly new system -
when i change the parameter retry_check_interval from integer to float (in my case 1 to 0.5)
Code: Select all
define service{
use generic-service
host_name wwwweb.fhstp.ac.at
service_description Webseite_generell
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 1
retry_check_interval 0.5
contact_groups linux-admins, sms1,graf-server
notification_interval 120
notification_period 24x7
BUT
the webinterface is not working any more.Error: Could not read object configuration data!
As soon as i change it to 1 (integer) again ... both are working again.
Try it yourself ...
regards
Martin
Re: Nagios & Apache problem
That is not a bug, that is an intentional design decision. If we allowed floats, people would schedule everything as .1 (6 seconds) and this would cause *incredibly* heavy load on the server. It could also lead to divide-by-zero errors where something is scheduled to run every half second (extreme example, but we have had this request).
Former Nagios employee
-
idefixgallier
- Posts: 10
- Joined: Mon Feb 10, 2014 8:57 am
Re: Nagios & Apache problem
Good point -
but its not very simple for the administrator that nagios itself
is running but the webinterface not (with a not very useful message)
- maybe make a "strong" warning while checking the nagios config
during startup that floating values could lead to web-interface problems...
We are using check_interval 0.3 on our switches for a long time without
having problems with the webinterface so it was suprising that a 0.5 in the retry_check_interval
causes this ...
regards
but its not very simple for the administrator that nagios itself
is running but the webinterface not (with a not very useful message)
- maybe make a "strong" warning while checking the nagios config
during startup that floating values could lead to web-interface problems...
We are using check_interval 0.3 on our switches for a long time without
having problems with the webinterface so it was suprising that a 0.5 in the retry_check_interval
causes this ...
regards
Re: Nagios & Apache problem
What version of nagios were you using that allowed and used floats in configs?
The better way to do this would be to alter:
To:
Which will half all your check times. Beware that this will DRASTICALLY increase load.
The better way to do this would be to alter:
Code: Select all
interval_length=60Code: Select all
interval_length=30Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.