Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a complete example for master-client configuration #14

Open
mushkevych opened this issue Mar 7, 2014 · 7 comments
Open

Provide a complete example for master-client configuration #14

mushkevych opened this issue Mar 7, 2014 · 7 comments

Comments

@mushkevych
Copy link

First of all - thank you for great Puppet module!

In my case, nagios master and nagios client were successfully installed in default configuration.
Unfortunately, nagios master does not start due to:

Error: There are no services defined!
Error: There are no hosts defined!

I was wondering whether it would be possible to provide configuration instructions on setting up 1 master and 1 client env. It would be great should the instruction cover setting up one or two basic services, such as ping or cpu usage

Sincerely
Dan

@mushkevych
Copy link
Author

Reason behind the Errors was absence of the PuppetDb. After following the guide [1], and updating the Puppet Agent nodes before updating Puppet Master, I was able to setup Nagios in Server-Client configuration.

While I am using CentOS 6.5, I had to change manifests/params.pp so that 'CentOS' was listed next to "Fedora":

sed -i "s/'Fedora'/'Fedora', 'CentOS'/g" /etc/puppet/modules/nagios/manifests/params.pp

At the end, there was an issue with the missing /var/run/nagios folder, that could be fixed with the snippet [2].

Dan

[1] http://docs.puppetlabs.com/puppetdb/latest/connect_puppet_master.html

[2]

exec{"mkdir -p /var/run/nagios":
  path => "/usr/bin:/usr/sbin:/bin",
  unless => "test -d /var/run/nagios",
}
-> 
exec{"chown nagios:nagios /var/run/nagios":
  path => "/usr/bin:/usr/sbin:/bin",
}  

@thias
Copy link
Owner

thias commented Apr 8, 2014

This all makes a lot of sense. The exported resources are required, so PuppetDB makes that work. Regarding the params.pp change, unfortunately that's because there are multiple nagios and nrpe packages our there, with no one standard place for configuration and run files :-(

I'll try to update the module so that it's possible to override the relevant paths using hiera.

@thias
Copy link
Owner

thias commented Apr 8, 2014

The defaults for the configuration and /var/run directories should be fixed now, to be the EPEL ones. See 8021791 and please let me know how it goes! (you shouldn't need to edit params.pp nor the mkdir exec anymore)

@mushkevych
Copy link
Author

Matthias

Thank you for the reply and patched.
Could you please advice how to install latest version of the module from your GitHub?

I have tried following:

wget https://github.com/thias/puppet-nagios/archive/master.zip -O /tmp/puppet-nagios.zip
mkdir /tmp/unzip-puppet-nagios
unzip /tmp/puppet-nagios.zip -d /tmp/unzip-puppet-nagios
tar -zcvf ./puppet-nagios.tar.gz -C /tmp/unzip-puppet-nagios/puppet-nagios-master .
puppet module install ./puppet-nagios.tar.gz

But it is failing with

Error: Could not parse filename to obtain the username, module name and version.  ()

Dan

@thias
Copy link
Owner

thias commented Apr 22, 2014

Given what the message says, you probably need to rename the .tar.gz file to match the forge naming. Something like "thias-nagios-0.4.4.tar.gz" might work. You might also have to rename
the directory that you're compressing.

@EssentialMix
Copy link

Guys quick question. Your are using PuppetDB for storing configuration of Nagios. Is any way to install multiple independent instance of Nagios Server using same Puppet Master?

@emre141
Copy link

emre141 commented Jul 9, 2015

Hi All,

We I have a question how can i install nagios core and nagios-plugin and nrpe from puppet (over the puppet) we should use source files for nagios core and plugin and nrpe or can we use rpm or repository?

And also could use share a sample installation for nagios server,plugin,nrpe from puppet configuration?

Thanks
Emre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants