init.d/nagios

Noel Platzke neufpas at gmail.com
Fri Mar 19 23:56:48 CET 2010


The init script should really be changed to this so we avoid this problem
altogether...

NagiosStatusFile=$(grep "status_file=" $NagiosCfgFile | awk -F\= '{print
$2}')
NagiosRetentionFile=$(grep "state_retention_file=" $NagiosCfgFile | awk -F\=
'{print $2}')
NagiosCommandFile=$(grep "command_file" $NagiosCfgFile | awk -F\= '{print
$2}')
NagiosCacheFile=$(grep "object_cache_file" $NagiosCfgFile | awk -F\= '{print
$2}')
NagiosPrecacheFile=$(grep "precached_object_file" $NagiosCfgFile | awk -F\=
'{print $2}')
NagiosRunFile=$(grep "lock_file" $NagiosCfgFile | awk -F\= '{print $2}')



On Fri, Mar 19, 2010 at 3:42 PM, Martin Melin <martinm at op5.org> wrote:

> On Fri, Mar 19, 2010 at 7:28 PM, David Dyer-Bennet <dd-b at dd-b.net> wrote:
>
>>
>> The init file built and installed by "make install-init" doesn't seem to
>> work right.  I apparently have nagios running after saying "service nagios
>> start" (it reported success), based on receiving some notifications and on
>> ps showing /usr/local/nagios/bin/nagios running as a daemon, but "service
>> nagios status" reports "nagios is not running".
>>
>> (This is on a Centos 4.8 system, with Nagios 3.2.1 built from source.)
>>
>> I configured this version with
>> "--with-lockfile=/usr/local/nagios/var/nagios.pid" after the previous
>> version, without that, logged a permissions error when it tried to start
>> up nagios.  I suppose that could be the wrong fix for that problem, and
>> hence causing this one.
>>
>
> This is probably because the init script says:
>
> NagiosRunFile=${prefix}/var/nagios.lock
>
> But your pid file is called nagios.pid.
>
> So either recompile Nagios, or edit your init script to look in the
> nagios.pid file instead (probably the easier route, eh? :-)
>
> --
> Martin Melin
>
> May your delusions be benign and your compulsions have utility
> ____________________________
> op5 AB
> http://www.op5.com
>
> http://www.op5.org/
> http://www.op5.com/op5/products/network-monitor/nagios/
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100319/3eda5adc/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
-------------- next part --------------
_______________________________________________
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