Error: Cannot open log file '/var/log/nagios/nagios.log' for reading!

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Thu Feb 27 12:33:06 CET 2003


Dear Sir,


I am writing to thank you for your letter and say,

On Thu, Feb 27, 2003 at 09:08:15AM -0000, Yugo Ashida wrote:
> I get the message:
> 
> Error: Cannot open log file '/var/log/nagios/nagios.log' for reading! when i
> try and access the Event Log, Alert History or Notifications on the web
> page.
> 
> Is this because the nagios process is running as root. If so do i just need
> to create a username called nagios and then run the service from that?
> 

Probably.

The default (run configure when installing from source) installation is
for nagios to run as user nagios and in group nagios.

You'll have the sort of trouble you describe otherwise.

Here's some of my Nag processes,

nagios  8375  0.0  6.1 25728 15876  ??  Ss   Mon10AM  28:44.68
/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 69713  0.0  0.1   460  196  ??  S    10:29PM   0:00.00 /sbin/ping
-n -c 10 10.0.100.132
nagios 69717  0.0  6.2 25728 16072  ??  S    10:29PM   0:00.00
/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 69718  0.0  0.1   632  272  ??  S    10:29PM   0:00.00 sh -c
/usr/local/nagios/libexec/check_by_ssh -t 30 -H zeus -l wwwrobot -C
'/usr/local/bin/system_health_check poseidon'
nagios 69719  0.0  0.2   972  588  ??  S    10:29PM   0:00.00
/usr/local/nagios/libexec/check_by_ssh -t 30 -H zeus -l wwwrobot -C
/usr/local/bin/system_health_check poseidon
nagios 69720  0.5  0.6  2092 1472  ??  S    10:29PM   0:00.02
/usr/bin/ssh -l wwwrobot zeus /usr/local/bin/system_health_check
poseidon
nagios 69722  0.0  6.2 25728 16072  ??  S    10:29PM   0:00.00
/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

All running as user nagios.

> Yugo Ashida
> EDP
> Miki Travel Ltd
> +44 (0) 207 398 7284
> 


I can't imagine how your nagios process is running as root after it has
daemonised.

Are you running Nag without -d  (not recommended other than for
debugging) ?

Yours sincerely.


-- 
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list