FAQ
Hello,

I can't wrap my head around what is causing this error. After rebooting the
box I get this error. If I remove the $hostgroup parameter is errors at
$product_domain and down the line. What is going wrong here? I have facters
defined for nagios server.
I am testing this where nagios server (puppet client) is currently on the
puppetmaster. The error prevents me from updating my nagios configs.

facter | egrep "product_info|product_domain"
product_domain => nagios_server
product_info => nagios_server


puppet agent --test --verbose
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Invalid parameter product_domain at line 370 on node nagios_node.
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run


class nagios-server {

File <<| tag == 'nagios' |>>

define host($ip = $::fqdn, $short_alias = $::fqdn, $hostgroup =
$::product_info, $product_domain = $::product_domain) {
case $product_info {
/SomeProduct/: {
$nagios_cfgdir = "/usr/local/nagios/etc/objects/ctf/hosts"
@@file {
"$nagios_cfgdir/${name}.cfg":
ignore => ".svn",
ensure => present,
content => template( "nagios/host.cfg" ),
mode => 644,
owner => nagios,
group => nagios,
tag => 'nagios',
notify => Service[nagios],
}
}





Thanks,
David Garvey

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • David Garvey at Aug 1, 2012 at 5:22 pm
    When I comment the line out I still get a related error:

    #puppet agent --test --verbose
    err: Could not retrieve catalog from remote server: Error 400 on SERVER:
    Invalid parameter short_alias at line 370 on node nagios
    warning: Not using cache on failed catalog
    err: Could not retrieve catalog; skipping run
    #grep short_alias /etc/puppet/modules/nagios/manifests/init.pp
    #define host($ip = $::fqdn, $short_alias = $::fqdn, $product_domain =
    $::product_domain) {
    #
    On Wed, Aug 1, 2012 at 8:56 AM, david.garvey@gmail.com wrote:

    Hello,

    I can't wrap my head around what is causing this error. After rebooting
    the box I get this error. If I remove the $hostgroup parameter it errors at
    $product_domain and down the line. What is going wrong here? I have facters
    defined for nagios server.
    I am testing this where nagios server (puppet client) is currently on the
    puppetmaster. The error prevents me from updating my nagios configs.

    facter | egrep "product_info|product_domain"
    product_domain => nagios_server
    product_info => nagios_server


    puppet agent --test --verbose
    err: Could not retrieve catalog from remote server: Error 400 on SERVER:
    Invalid parameter product_domain at line 370 on node nagios_node.
    warning: Not using cache on failed catalog
    err: Could not retrieve catalog; skipping run


    class nagios-server {

    File <<| tag == 'nagios' |>>

    define host($ip = $::fqdn, $short_alias = $::fqdn, $hostgroup =
    $::product_info, $product_domain = $::product_domain) {
    case $product_info {
    /SomeProduct/: {
    $nagios_cfgdir = "/usr/local/nagios/etc/objects/ctf/hosts"
    @@file {
    "$nagios_cfgdir/${name}.cfg":
    ignore => ".svn",
    ensure => present,
    content => template( "nagios/host.cfg" ),
    mode => 644,
    owner => nagios,
    group => nagios,
    tag => 'nagios',
    notify => Service[nagios],
    }
    }





    Thanks,
    David Garvey


    --
    David Garvey

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Calvin Walton at Aug 1, 2012 at 6:01 pm

    On Wed, 2012-08-01 at 08:56 -0700, david.garvey@gmail.com wrote:
    Hello,

    I can't wrap my head around what is causing this error. After rebooting the
    box I get this error. If I remove the $hostgroup parameter is errors at
    $product_domain and down the line. What is going wrong here? I have facters
    defined for nagios server.
    I am testing this where nagios server (puppet client) is currently on the
    puppetmaster. The error prevents me from updating my nagios configs.
    puppet agent --test --verbose
    err: Could not retrieve catalog from remote server: Error 400 on SERVER:
    Invalid parameter product_domain at line 370 on node nagios_node.
    define host($ip = $::fqdn, $short_alias = $::fqdn, $hostgroup =
    $::product_info, $product_domain = $::product_domain) {
    case $product_info {
    Hmm. I'm actually wondering if the reason for this is the reference to
    the facts in the default values for the parameters. I was under the
    impression that *should* work, but I'm not totally familiar with the
    code in question.

    Can you say which versions of Puppet you're running on the server and
    client?

    As a workaround, you might try something like this:

    define host($ip = 'UNSET') {
    if $ip == 'UNSET' {
    $ip = $::fqdn
    }
    ...
    }

    --
    Calvin Walton <calvin.walton@kepstin.ca>

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedAug 1, '12 at 3:56p
activeAug 1, '12 at 6:01p
posts3
users2
websitepuppetlabs.com

2 users in discussion

David Garvey: 2 posts Calvin Walton: 1 post

People

Translate

site design / logo © 2022 Grokbase