configuration directory and file directives ... perplexity (long and boring). [SEC=UNCLASSIFIED]

Stanley.Hopcroft at Dest.gov.au Stanley.Hopcroft at Dest.gov.au
Thu Oct 25 04:07:22 CEST 2007


Dear Tim,

(Yes, I am the nitwit). 

> -----Original Message-----
> Mr Hopcroft,
> 
> My first reaction was an unqualified "yuk!, what nitwit would even 
> consider this", then I noticed it was you, and having seen your ever 
> useful posts since the Netsaint 0.0.7 days, I relented. Although 
> hearing vi called "anachronistic" ruffles a couple of feathers.

(OT. Have a look at what Rob Pike has been saying about Unix for some
years. To an MSCE, vi is .. well I am happy with my original choice of
words. I am not a Windows admin and am perfectly happy with vi to do my
Nagios configuration [or my own home brew semi-automation] but not
everyone who likes Nagios likes vi).

> Notepad isn't? 
> No accounting for taste...

(OT. For unambitious text mangling it's Ok. How many people depend on vi
macros or even conditional substitution ?)

> 
> I can't actually speak to your specific question, but it just seems 
> like a scary thought. Better to run samba on the Nagios machine and 
> let them mount it, and/or SVN. And then there's the GUI method, of 
> course.

Good thought but why should they change to suit one application ?

At this site there are no Unix Sys admin skills (apart from me) and
everyone likes Windows. Having the configs on Win means management is
happy they are adequately backed up.

Does cfg_dir=/Some/Path actually work ? and if so, would anyone be so
kind as to paste a few lines containing these directives from their
nagios.cfg ?

Here is the problem, adding a cfg_dir to point to a _Unix_ directory
like so

***************
*** 78,83 ****
--- 78,87 ----
  # extension) in a particular directory by using the cfg_dir
  # directive as shown below:
  
+ cfg_dir=/etc/nagios
+ 
+ # cfg_dir=/mnt/dest_smb/coms/NMS/nagios
+ 
  #cfg_dir=/etc/nagios/servers
  #cfg_dir=/etc/nagios/printers
  #cfg_dir=/etc/nagios/switches
[root at acisp057 nagios]# 

causes 

[root at acisp057 nagios]# nagios -v nagios.cfg 

Nagios 2.9
Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org) Last
Modified: 04-10-2007
License: GPL

Reading configuration data...

Error: Unexpected token or statement in file '/etc/nagios/cgi.cfg' on
line 23.

***> One or more problems was encountered while processing the config
files...

     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a
previous
     version of Nagios, you should be aware that some
variables/definitions
     may have been removed or modified in this version.  Make sure to
read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.

[root at acisp057 nagios]# 

Take out cfg_dir and all is well.

> 
> good luck!
> 
> tim

Thank you.

Yours sincerely.


Classification: UNCLASSIFIED

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.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