ps error when /etc/init.d/nagios start

Werner Flamme Werner.Flamme at ufz.de
Fri Feb 18 09:14:34 CET 2005


Bit Takeshi schrieb am 18.02.2005 07:10:
> --- Werner Flamme <Werner.Flamme at ufz.de>  
> 
>>Well, since you did not configure nagios (this is
>>what nagios tells you
>>here), nagios cannot start. So when you invoke the
>>nagios start script
>>nagios does not start and the pid file does not
>>exist. This start script
>>uses "ps -p $NagiosPID" to determine whether nagios
>>runs or not. Since
>>there is not $NagiosPID (nagios did not start
>>because of the missing
>>config) you get the error message you gave at the
>>beginning.
>>
>>So, first configure nagios, then call
>>"/usr/local/nagios/bin/nagios -v
>>
>>>/usr/local/nagios/etc/nagios.cfg" to see if the
>>
>>config is correct and
>>only then you may "/etc/init.d/nagios start".
>>
>>BTW: did you "make install-config" after "make
>>install"?
>>
> 
> 
> Hello,
> 
> Thanks for your your reply. I am sure I did a "make
> install; make install-config". I double checked what i did
> with history | grep install-config. And it was there.
> 
> But this time I did it again and watch the output more
> carefully,
> 
> --------------////////////////////--------------------
> [root at ns1 /home/vuhung/tmp/nagios-2.0b2]#make
> install-config
> /usr/bin/install -c -m 775 -o nagios -g nagios -d
> /usr/local/nagios/etc
> /usr/bin/install -c -m 664 -o nagios -g nagios
> sample-config/nagios.cfg
> /usr/local/nagios/etc/nagios.cfg-sample
> /usr/bin/install -c -m 664 -o nagios -g nagios
> sample-config/cgi.cfg /usr/local/nagios/etc/cgi.cfg-sample
> /usr/bin/install -c -m 660 -o nagios -g nagios
> sample-config/resource.cfg
> /usr/local/nagios/etc/resource.cfg-sample
> /usr/bin/install -c -m 664 -o nagios -g nagios
> sample-config/template-object/bigger.cfg
> /usr/local/nagios/etc/bigger.cfg-sample
> /usr/bin/install -c -m 664 -o nagios -g nagios
> sample-config/template-object/minimal.cfg
> /usr/local/nagios/etc/minimal.cfg-sample
> /usr/bin/install -c -m 664 -o nagios -g nagios
> sample-config/template-object/checkcommands.cfg
> /usr/local/nagios/etc/checkcommands.cfg-sample
> /usr/bin/install -c -m 664 -o nagios -g nagios
> sample-config/template-object/misccommands.cfg
> /usr/local/nagios/etc/misccommands.cfg-sample
> 
> *** Sample config file installed ***
> 
> Remember, these are *SAMPLE* config files.  You'll need to
> read
> the documentation for more information on how to actually
> define
> services, hosts, etc. to fit your particular needs.
> 
> If you have questions about configuring Nagios properly,
> please:
>        - Look at the sample config files
>        - Read the HTML documentation
>        - Read the FAQs online at
> http://www.nagios.org/faqs
> *BEFORE* you post a question to one of the mailing lists.
> -------------/////////////////////----------------------------
> 
> As you can see, some critical files were not copied:
> 
> 
> timeperiods.cfg
> dependencies.cfg
> hosts.cfg
> hostgroups.cfg
> contacts.cfg
> contactgroups.cfg
> 
> Where I can get samples for these files?
> 
> Vu Hung
> 
> 
> http://www.fedu.uec.ac.jp/~vuhung/
> http://chuiyang.org
> 
> __________________________________
> Let's Celebrate Together!
> Yahoo! JAPAN
> http://pr.mail.yahoo.co.jp/so2005/
> 
> 
Hi Vu Hung,

have a look at the sample-config subdir after "make". You will find
something like
---snip---
.   README   cgi.cfg.in      nagios.cfg     resource.cfg     template-extinfo
..  cgi.cfg  default-object  nagios.cfg.in  resource.cfg.in  template-object

./default-object:
.                     contacts.cfg.in      hosts.cfg.in
..                    dependencies.cfg     misccommands.cfg
README                dependencies.cfg.in  misccommands.cfg.in
checkcommands.cfg     escalations.cfg      services.cfg
checkcommands.cfg.in  escalations.cfg.in   services.cfg.in
contactgroups.cfg     hostgroups.cfg       timeperiods.cfg
contactgroups.cfg.in  hostgroups.cfg.in    timeperiods.cfg.in
contacts.cfg          hosts.cfg

./template-extinfo:
.  ..  README  hostextinfo.cfg  serviceextinfo.cfg

./template-object:
.                     dependencies.cfg     minimal.cfg.in
..                    dependencies.cfg.in  misccommands.cfg
README                escalations.cfg      misccommands.cfg.in
checkcommands.cfg     escalations.cfg.in   services.cfg
checkcommands.cfg.in  hostgroups.cfg       services.cfg.in
contactgroups.cfg     hostgroups.cfg.in    timeperiods.cfg
contactgroups.cfg.in  hosts.cfg            timeperiods.cfg.in
contacts.cfg          hosts.cfg.in
contacts.cfg.in       minimal.cfg
---pins---

in this dir and its subdirectories. Now I see by myself, that not all those
.cfg files were copied into the etc directory with "make install-config": I
am missing hostextinfo.cfg... Well, I don't need it since my hostextinfos
are stored in MySQL, but it was nice to have, since the "hostextinfo"
entries in cgi.cfg did not work for me.

When you don't have those files, you should consider to download nagios
anew... :-)

HTH,
\/\/erner

-- 
Werner Flamme, Abt. WKDV
UFZ Umweltforschungszentrum Leipzig-Halle GmbH,
Permoserstr. 15, 04318 Leipzig - http://www.ufz.de
eMail: werner.flamme at ufz.de, Tel.: (0341) 235-2500







-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
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