(UNKNOWN VARIABLE) when running nagios

Andreas Ericsson ae at op5.se
Mon Dec 20 17:34:39 CET 2004


Qolinar wrote:
> Thanks (I already tried that), but this brings me to my next error:
> 
> L17ADLNX1:/usr/local/nagios # /usr/local/nagios/bin/nagios
> /usr/local/nagios/etc/nagios.cfg -v
> 
> Nagios 2.0b1
> Copyright (c) 1999-2004 Ethan Galstad (nagios at nagios.org)
> Last Modified: 12-15-2005
> License: GPL
> 
> Nagios 2.0b1 starting... (PID=871)
> Error: Invalid hostgroup object directive 'contact_groups'.
> Error: Could not add object property in file
> '/usr/local/nagios/etc/hostgroups.cfg' on line 25.
> Bailing out due to one or more errors encountered in the configuration
> files.  Run Nagios from the command line with the -v option to verify
> your config before restarting. (PID=871)
> L17ADLNX1:/usr/local/nagios #
> 
> Here is the hostgroups.cfg file:
> 

Read the CHANGES file. It will tell you all you need to know. For a 
quick-start in the right direction, you can use the attached 
object_config_fix.php script to convert your object config to one that 
Nagios 2.0 will understand.
Run it as such;
php object_config_fix.php /path/to/nagios.cfg

To convert your comment.log, you'll need to run the attached 
12to20comments.php script, as such;
12to20comments.php /path/to/comment.log

That should get you to your next question, which I predict will be "Why 
are my notification emails all weird?? They used to work in 1.2!".

The answer to that is to read the CHANGES file and make the necessary 
alterations to your notification commands.

Cheers.

> 
> # 'switches' host group definition
> define hostgroup{
>         hostgroup_name  switches
>         alias           Switches
>         contact_groups  nagios
>         members         laknsm3548
>         }
> 
> 
> # 'routers' host group definition
> define hostgroup{
>         hostgroup_name  routers
>         alias           Routers
>         contact_groups  nagios
> 
> 
> I did a fresh install of Nagios 2.0b1; I renamed the old directories
> to preserve my config data. I used the provided sample configs that
> came with the new version; I simply removed "sample" from the file
> names. The only config files I moved from my previous install of
> Nagios 1.2 were:
> 
> hosts.cfg
> hostgroups.cfg
> services.cfg
> 
> 
> On Mon, 20 Dec 2004 17:07:20 +0100, Andreas Ericsson <ae at op5.se> wrote:
> 
>>Qolinar wrote:
>>
>>>After re-reading the docs and re-installing/compiling/etc., I am still
>>>receiving the following error when running nagios:
>>>
>>
>>Remove the max_embedded_perl_calls line. It's not a valid variable in
>>Nagios 2, and should hence be removed.
>>
>>If you've simply copied the config from an old installation you're
>>likely to encounter more of these little popups. Just delete the line in
>>question and move on.
>>
>>
>>>L17ADLNX1:/usr/local/nagios/var # /usr/local/nagios/bin/nagios
>>>/usr/local/nagios/etc/nagios.cfg -v
>>>
>>>Nagios 2.0b1
>>>Copyright (c) 1999-2004 Ethan Galstad (nagios at nagios.org )
>>>Last Modified: 12-15-2005
>>>License: GPL
>>>
>>>Error in configuration file '/usr/local/nagios/etc/nagios.cfg' - Line
>>>869 (UNKNOWN VARIABLE)
>>>Nagios 2.0b1 starting... (PID=4175)
>>>Bailing out due to one or more errors encountered in the configuration
>>>files.  Run Nagios from the command line with the -v option to verify
>>>your config before restarting. (PID=4175)
>>>L17ADLNX1:/usr/local/nagios/var #
>>>
>>>Here is the nagios.cfg file:
>>>
>>># MAXIMUM EMBEDDED PERL INTERPRETER CALLS
>>># This value determines how often (if at all) the embedded Perl
>>># interpreter is reinitialized during runtime.  This is useful
>>># if you notice that the Perl interpreter is causing slow
>>># memory leaks over time.  Setting this value to 0 means the
>>># embedded Perl interpreter will never be reinitialized.  Any
>>># value > 0 is the number of times the embedded Perl interpreter
>>># is used (i.e. a Perl plugin is executed) before it is
>>># reinitialized during runtime.  If you didn't compile Nagios with
>>># embedded Perl support, this option has no effect.
>>>
>>>#my change
>>>max_embedded_perl_calls=0
>>>
>>>
>>>Line 869 is the  last line (max_embedded_perl_calls=0). When I
>>>re-installed, I did so --enable-embedded-perl whereas I didn't the
>>>first time and it STILL gives me the above error.
>>>
>>>
>>>What have I done wrong???
>>>
>>>
>>>-------------------------------------------------------
>>>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://productguide.itmanagersjournal.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
>>>
>>
>>--
>>Andreas Ericsson                   andreas.ericsson at op5.se 
>>OP5 AB                             www.op5.se 
>>Lead Developer
>>
> 
> 

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: object_config_fix.php
Type: application/x-php
Size: 5367 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20041220/ac7c790b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 12to20comments.php
Type: application/x-php
Size: 3173 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20041220/ac7c790b/attachment-0001.bin>


More information about the Users mailing list