Hi,

On 10-03-11 13:46, Martijn Grendelman wrote:
>> Yesterday I implemented a module for managing Nagios configurations. It
>> has turned out to be quite a complex beast, but in my test environment, it
>> seemed to do everything it should.
>>
>> Now, in production, managing some 30 hosts, I get the following on the
>> node that is both Puppetmaster and Nagios server:
>>
>>> Thu Mar 10 12:13:14 +0100 2011 
>>> /Stage[main]/Nagios::Server/Nagios_host[server017] (err): Could not 
>>> evaluate: undefined method `sort' for :absent:Symbol
>>> Thu Mar 10 12:13:14 +0100 2011 
>>> /Stage[main]/Nagios::Target/Nagios_host[offman01] (err): Could not 
>>> evaluate: undefined method `sort' for :absent:Symbol
>>> Thu Mar 10 12:13:14 +0100 2011 
>>> /Stage[main]/Nagios::Server/Nagios_host[server000-vpn] (err): Could not 
>>> evaluate: undefined method `sort' for :absent:Symbol
>>
>> It does this for all nodes. Unfortunately, I have no idea what that means
>> or where to start looking. Google doesn't give any results when searching
>> for this error.
>>
>> The strange thing that I notice is, that for any 'normal' node, it gives
>> the error as a result of the Nagios::Server class (which is only included
>> on the Nagios server i.e. 'this' node, and collects the Nagios_host
>> resources), but for the node itself (offman01, the middle line in the
>> excerpt above), the error is reported for the Nagios::Target class (which
>> is included on all monitored nodes, including the Nagios server itself,
>> which exports the @@nagios_host definitions).
>>
>> I am not sure what more information to give you, so if anyone has ANY
>> idea, please let me know.
> 
> Some more information:
> 
> The nagios::target class has this:
> 
> class nagios::target {
> 
>     include nagios::common
> 
>     @@nagios_host { "$hostname":
>         use => "generic-host",
>         address => $fqdn,
>         alias => $hostname,
>         ensure => present,
>         target => "$nagios::common::nagios_conf_test/host-$hostname.cfg",
>     }
> 
>     $hostgroups_parameter = generate (some command)
> 
>     if $hostgroups_parameter != "" {
>         Nagios_host["$hostname"] {
>             hostgroups => $hostgroups_parameter,
>         }
>     }
> }
> 
> Now, if I comment out the last 'if' with everything inside, the error
> gradually disappers, with gradually meaning, that for each node that did a
> catalog run /before/ the Nagios server node, the error is gone.
> 
> I have verified that 'some command' actually generates valid information,
> and it does so for all hosts, or so it seems.
> 
> Hm, just wondering right now: could it be because there are no quotes
> around $hostgroups_parameter after 'hostgroups => ' ?

No, that's not it, the error is back, even with quotes.

Pointers still very much appreciated!!

Best regards,
Martijn.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to