Hi,
>>> 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,
>> }
>> }
>> }
I now changed it to:
$hostgroups_parameter = generate (some command)
@@nagios_host { "$hostname":
use => "generic-host",
address => $fqdn,
alias => $hostname,
ensure => present,
target => "$nagios::common::nagios_conf_test/host-$hostname.cfg",
hostgroups => $hostgroups_parameter ? {
"" => undef,
default => "$hostgroups_parameter",
},
}
but the error remains.
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.