Puppet module icinga

94 views
Skip to first unread message

Giuseppe Broccolo

unread,
Nov 4, 2013, 5:30:43 AM11/4/13
to example42-pu...@googlegroups.com
Hi all,

I'm trying to set up icinga using puppet: as reference I'm following instructions on https://github.com/example42/puppet-icinga. As a check, I launch puppet on a virtual machine created with Vagrant. I attach below the error I obtained when I launch 'vagrant up' command:

    Error: Puppet::Parser::AST::Resource failed with error NoMethodError: undefined method `downcase' for #<Hash:0x00000001bcf3f8> at /tmp/vagrant-puppet/modules-0/icinga/manifests/init.pp:2 on node shane.devise-it.lan

If I take a look on the virtual machine in the file init.pp:

    class icinga {
      class{'icinga::params':} ->
      class{'icinga::install':} ->
      class{'icinga::idoconfig':} ~>
      class{'icinga::idoservice':} ->
      class{'icinga::config':} ~>
      class{'icinga::service':} ->
      Class['icinga']

      if ( $icinga::params::gui_type =~ /^(classic|web|both)$/ ) {
        include icinga::gui
      } else {
        notice('no gui selected')
      }
      if ( $icinga::params::perfdata == true and $icinga::params::perfdatatype == 'pnp4nagios' ) {
        include pnp4nagios
      }
   }

I suppose that problem is in the  params.pp manifest. I've changed nothing of what I could set up following the instructions in https://github.com/example42/puppet-icinga.

Is this a known problem? Please tell me if more info are needed.

Many thanks in advance.

Giuseppe.

David Schmitt

unread,
Nov 4, 2013, 8:06:10 AM11/4/13
to example42-pu...@googlegroups.com
Hi Giuseppe,
There is something strange going on with your setup. Line 2 in
icinga/manifests/init.pp does not contain any code afaict from afar. To
investigate further, please provide more info about how you got the
module, which exact version you're using, which other modules you have
installed, and the puppet version you are using.


Regards, David

Giuseppe Broccolo

unread,
Nov 4, 2013, 9:28:18 AM11/4/13
to example42-pu...@googlegroups.com
Well, I've installed the 3.3.0 version of Puppet. For the installation of the Icinga Puppet modules I used librarian-puppet with bundler. In the puppetfile I put the following lines:

    forge "http://forge.puppetlabs.com"

    mod "puppetlabs/postgresql", :git => 'g...@git.2ndquadrant.it:2ndquadrant-it/i-it/i-hw-benchmark-it/puppet-postgresql.git'
    mod "puppi", :git => 'g...@github.com:example42/puppi.git'
    mod "puppet/icinga", :git => 'g...@github.com:example42/puppet-icinga.git'

I set up Icinga with Puppet on a virtual machine created with Vagrant. This is the Vagrant file:

    Vagrant.configure("2") do |config|
      {
        :shane => {
          :box     => 'ubuntu_12042x86_64',
          :box_url => 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210.box',
          :ip      => '192.168.56.150',
        },
      }.each do |name,cfg|
        config.vm.define name do |local|
          local.vm.box = cfg[:box]
          local.vm.box_url = cfg[:box_url]
          local.vm.hostname = name
          local.vm.network :private_network, ip: cfg[:ip]
          local.vm.provision :shell, :inline => 'mkdir -p /srv/raid /srv/xlog; apt-get update'
          local.vm.provision :puppet do |puppet|
            puppet.hiera_config_path = 'hiera.yaml'
            puppet.manifests_path = "../manifests"
            puppet.module_path = ["../local_modules", "../modules"]
            puppet.manifest_file = "site.pp"
            puppet.options = [
             '--verbose',
             '--debug',
            ]
          end
        end
      end
    end

Hope this could be enough.

Many thanks.

Giuseppe.




--
You received this message because you are subscribed to a topic in the Google Groups "Example42 Puppet Modules" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/example42-puppet-modules/M7kbzcG4FEw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to example42-puppet-modules+unsub...@googlegroups.com.
To post to this group, send email to example42-puppet-modules@googlegroups.com.
Visit this group at http://groups.google.com/group/example42-puppet-modules.
For more options, visit https://groups.google.com/groups/opt_out.

Giuseppe Broccolo

unread,
Nov 4, 2013, 9:31:03 AM11/4/13
to example42-pu...@googlegroups.com
Vagrant version: 1.3.3

Puppet module: example42-icinga v2.1.2

Alessandro Franceschi

unread,
Nov 7, 2013, 6:14:31 AM11/7/13
to example42-pu...@googlegroups.com
    Error: Puppet::Parser::AST::Resource failed with error NoMethodError: undefined method `downcase' for #<Hash:0x00000001bcf3f8> at /tmp/vagrant-puppet/modules-0/icinga/manifests/init.pp:2 on node shane.devise-it.lan

downcase is a function in puppetlabs' stdlib module, you should add it .

Also the code you mentioned:


    class icinga {
      class{'icinga::params':} ->
      class{'icinga::install':} ->
      class{'icinga::idoconfig':} ~>
      class{'icinga::idoservice':} ->
      class{'icinga::config':} ~>
      class{'icinga::service':} ->
      Class['icinga']

      if ( $icinga::params::gui_type =~ /^(classic|web|both)$/ ) {
        include icinga::gui
      } else {
        notice('no gui selected')
      }
      if ( $icinga::params::perfdata == true and $icinga::params::perfdatatype == 'pnp4nagios' ) {
        include pnp4nagios
      }
   }


does not seem from an example42 module...
To unsubscribe from this group and all its topics, send an email to example42-puppet-modules+unsubscr...@googlegroups.com.
To post to this group, send email to example42-pu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages