Very basic configuration questions

Pete Dewell pete at stuff-done.co.uk
Mon Jul 18 14:44:08 CEST 2005


Try defining the $USER$ variable as

$USER5$='our.site.tld'

I found that using single quotes stops a lot of substitution errors.

As for restarting Nagios, there is a "restart" option on the web 
interface, under "process info". I'm not sure whether it uses HUP, but 
it seems to do the job.

Pete Dewell

Ralph.Grothe at itdz-berlin.de wrote:
> Hi,
> 
> I newly subscribed to this list.
> So forgive if these kind of embryonic questions already have been
> asked and answered a 1000 times.
> I'm a bit too impatient to dig through the FAQs and list archives
> right now.
> I will do this later.
> 
> I tweaked my set of config files so long until nagios pre-flight
> check didn't report errors
> but only warnings anymore.
> 
> The warnings are due to many predefined hosts that I haven't had
> the time to elaborate on required service checks yet.
> 
> So I started nagios in daemon mode (i.e. -d), and having had the
> first 6 nodes monitored (i.e. mere check_icmp so far) for the
> lunch break.
> 
> Of course I couldn't expect everything to work from the
> beginning.
> 
> So I noticed a couple of errors when I turned my eye on nagios
> log and nagios user's mail queue.
> 
> First there's a minute macro expansion problem.
> 
> Among others I defined this MX domain
> 
> $ grep ^\$USER5 /opt/sw/nagios/etc/resource.cfg
> $USER5$=our.site.tld
> 
> $ grep resource.cfg /opt/sw/nagios/etc/nagios.cfg
> resource_file=/opt/sw/nagios/etc/resource.cfg
> 
> $ cat -n /opt/sw/nagios/etc/contacts.cfg | sed -n 15,23p
>     15
>     16  define contact {
>     17      use                                 generic-contact
>     18      contact_name                        grothe
>     19      alias                               Ralph Grothe SAZ
>     20  #                                       see resource.cfg
> for $USER5$
>     21      email
> ralph.grothe@$USER5$
>     22  }
>     23
> 
> This is what happened.
> The MTA bounced the notification on an check_icmp alert because
> there was some queer substitution,
> recipient rewriting going on.
> 
> 
> $ grep -E Final-Recipient\|Diagnostic-Code /var/spool/mail/nagios
> 
> Final-Recipient: rfc822; ralph.grothe at USER5.other.site.tld
> Diagnostic-Code: X-Postfix; Name service error for
> name=user5.other.site.tld
> 
> 
> Why didn't the macro get substituted?
> Did the MTA rewrite the other.site.tld as suffix, or where could
> have come from?
> (n.b. {our,other}.site.tld are merely dummies for real addresses
> for I feared being spammed)
> 
> Another question,
> if I extend or adapt my Nagios config do I have to bring the the
> daemon down,
> or would a 
> 
> $ kill -HUP $(cat /var/opt/nagios/nagios.pid)
> 
> suffice?
> 
> Thanks
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&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

-- 
Pete Dewell | Stuff Done
pete at stuff-done.co.uk


** The information contained in this message, including any attachment,
is confidential and may be privileged or otherwise protected from
disclosure. The information is intended only for the person or entity to
which it is addressed. If you are not the intended recipient, please
contact the sender and delete this message from your system. Any review,
re-transmission, distribution or other use of this information by
persons or entities other than the intended recipient is prohibited. *


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&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