Ask Your Question
0

Puppet Nagios Integration

asked 2016-08-08 07:53:10 -0500

ChetAn P gravatar image

Dear all,

I have question regarding , How do we configure Nagios with Puppet. for eg. Once the Node is created how we can add that node to Nagios Server through Puppet ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-08-09 10:10:32 -0500

awippler gravatar image

updated 2016-08-09 10:58:55 -0500

You would need puppetdb in your environment for exported resources.

Then on your nodes you would have something like:

@@nagios_host { $::fqdn:
    ensure                => present,
    alias                 => $::hostname,
    address               => $::ipaddress,
    use                   => "linux-server",
    contacts              => "slack, helpdesk",
    max_check_attempts    => "3",
    check_period          => "24x7",
    check_interval        => "3", 
    notification_interval => "0",
    notification_period   => "24x7",
    notification_options  => "d,u,r",
}

On your nagios instance you would collect those resources by having this in your manifest:

# collect resources and populate /etc/nagios/nagios_*.cfg
Nagios_host <<||>>
Nagios_service <<||>>
Nagios_contact <<||>>
Nagios_contactgroup <<||>>

You can also use tags if you want to separate your nagios instances by datacenter.

@@nagios_host { $::fqdn:
      ...
      tag => 'datacenter-a',
}

and

Nagios_host <<| tag == 'datacenter-a' |>>
edit flag offensive delete link more

Comments

Yes, I have Puppet Enterprise Version [Latest version 2016.3..] already installed. I have the architecture like below :- 1. One Puppet Master 2. One Nagios Master Server [Not register with Puppet Mster] 3. One Agent which is registered with Puppet Master Can you please help me how can i configure

ChetAn P gravatar imageChetAn P ( 2016-08-09 11:33:42 -0500 )edit

Add the nagios host to puppet.

awippler gravatar imageawippler ( 2016-08-16 08:08:45 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-08-08 07:53:10 -0500

Seen: 130 times

Last updated: Aug 09 '16