phlipper / chef-monit Goto Github PK
View Code? Open in Web Editor NEWChef cookbook for monit package
Home Page: http://phlippers.net/chef-monit
License: MIT License
Chef cookbook for monit package
Home Page: http://phlippers.net/chef-monit
License: MIT License
I want to use m/monit with this cookbook, and m/monit recommends to disable any mail alerts setting in the monitrc config file: http://mmonit.com/documentation/mmonit_manual.pdf (search for "How to prevent Monit from also sending alerts").
Would you merge a PR that adds an attribute that add this possibility? something like remove_mail_statements
that defaults to false obviously :)
Thanks!
I'm trying to install monit on RHEL (6.4) from binary and I can't figure out how to get it to copy the correct init.d template. I've tried manually and the version in templates/centos works perfectly but for some reason it only copies the version from templates/default. I can't tell if this is a bug or I'm just missing something.
Thanks in advance.
Hi, I tried this recipe today and I'm getting an error:
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /usr/sbin/invoke-rc.d monit restart ----
STDOUT: Stopping daemon monitor: monit.
Starting daemon monitor: monit
STDERR: invoke-rc.d: initscript monit, action "restart" failed.
---- End output of /usr/sbin/invoke-rc.d monit restart ----
Ran /usr/sbin/invoke-rc.d monit restart returned 1
On Ubuntu 10.04
How about we give the user the ability to install monit from either source or via package manager?
I was encountering a chef compile time error with line 73 of recipes/default.rb because of the mismatch between the directory name and the name field in metadata.rb
I was able to get around a chef compile issue by renaming the git directory. How are you guys approaching this?
The .ruby-version
file specifies version 2.2 but, according to rbenv, there is no version by that name available.
-> rbenv install 2.2
ruby-build: definition not found: 2.2
The following versions contain `2.2' in the name:
2.2.0-dev
2.2.0-preview1
2.2.0-preview2
2.2.0-rc1
2.2.0
2.2.1
2.2.2
rbx-2.2.0
rbx-2.2.1
rbx-2.2.2
rbx-2.2.3
rbx-2.2.4
rbx-2.2.5
rbx-2.2.6
rbx-2.2.7
rbx-2.2.9
rbx-2.2.10
See all available versions with `rbenv install --list'.
Should this not be changed to 2.2.0?
The default attributes specify version 5.8.1 of Monit for binary installs. This version has gone from the Monit download site causing this cookbook to fail.
This is the best monit cookbook and it's not in the chef supermarket!!!
Sometimes when you are in a dev
environment, or even when you want to create a instance of a database cluster that you won't like the service to be running right away because performance reasons, it's interesting to not start monit after the installation.
It would be interesting to have a attribute that switches the auto start off, like:
default[:monit][:auto_start] = false
Could this cookbook have a support for MMonit collector? In the monitrc file there would be following line:
set mmonit http://monit:monit@localhost:8080/collector
which would configurable via attribute
Setting the login credentials for the web interface using node['monit']['web_interface']['allow'] is resulting in the unencrypted credentials being available from the chef server. Is there a good way to remove them from the Ohai data collected after a chef client run?
Ideally I would like to populate them from an encrypted data bag instead of from an attribute. I'm doing this now in a round about manner by reading them and inserting into the allow array. But then they are captured by Ohai.
Hi, there any reason to have this:
default["monit"]["idfile"] = "/var/.monit.id"
default["monit"]["statefile"] = "/var/lib/monit/state"
Instead of:
default["monit"]["idfile"] = "/var/lib/monit/id"
default["monit"]["statefile"] = "/var/lib/monit/state"
Grouping every monit file in its directory ?
Hello, I got following error while running chef-client which includes install-monit-binary in runlist:
This error appears on chef-client run after "first run" which is successful.
Looks like /usr/bin/monit is not available during command "cd /var/chef/cache && tar zxvf monit-5.10.tar.gz && cd monit-5.10 && cp bin/monit /usr/bin/monit" because monit service is running.
Following is the error:
Recipe: monit::install_binary
execute[install-monit-binary] action run
Error executing action `run` on resource 'execute[install-monit-binary]'
Mixlib::ShellOut::ShellCommandFailed
Expected process to exit with [0], but received '1'
---- Begin output of cd /var/chef/cache && tar zxvf monit-5.10.tar.gz && cd monit-5.10 && cp bin/monit /usr/bin/monit ----
STDOUT: monit-5.10/
monit-5.10/bin/
monit-5.10/bin/monit
monit-5.10/COPYING
monit-5.10/conf/
monit-5.10/conf/monitrc
monit-5.10/man/
monit-5.10/man/man1/
monit-5.10/man/man1/monit.1
STDERR: cp: cannot create regular file `/usr/bin/monit': Text file busy
---- End output of cd /var/chef/cache && tar zxvf monit-5.10.tar.gz && cd monit-5.10 && cp bin/monit /usr/bin/monit ----
Ran cd /var/chef/cache && tar zxvf monit-5.10.tar.gz && cd monit-5.10 && cp bin/monit /usr/bin/monit returned 1
Resource Declaration:
In /var/chef/cache/cookbooks/monit/recipes/install_binary.rb
10: execute "install-monit-binary" do
11: command "cd #{Chef::Config[:file_cache_path]} && \
12: tar zxvf monit-#{node["monit"]["binary"]["version"]}.tar.gz && \
13: cd monit-#{node["monit"]["binary"]["version"]} && \
14: cp bin/monit #{node["monit"]["binary"]["prefix"]}/bin/monit"
15: action :nothing
16: end
17:
Compiled Resource:
Declared in /var/chef/cache/cookbooks/monit/recipes/install_binary.rb:10:in `from_file'
execute("install-monit-binary") do
action [:nothing]
retries 0
retry_delay 2
guard_interpreter :default
command "cd /var/chef/cache && tar zxvf monit-5.10.tar.gz && cd monit-5.10 && cp bin/monit /usr/bin/monit"
backup 5
returns 0
cookbook_name "monit"
recipe_name "install_binary"
end
Recipe: monit::default
* service[monit] action reload
- reload service service[monit]
Running handlers:
[2014-12-11T14:09:31-05:00] ERROR: Running exception handlers
Running handlers complete
[2014-12-11T14:09:31-05:00] ERROR: Exception handlers complete
[2014-12-11T14:09:31-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 136 resources updated in 497.362269175 seconds
[2014-12-11T14:09:31-05:00] ERROR: execute[install-monit-binary] (monit::install_binary line 10) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of cd /var/chef/cache && tar zxvf monit-5.10.tar.gz && cd monit-5.10 && cp bin/monit /usr/bin/monit ----
STDOUT: monit-5.10/
monit-5.10/bin/
monit-5.10/bin/monit
monit-5.10/COPYING
monit-5.10/conf/
monit-5.10/conf/monitrc
monit-5.10/man/
monit-5.10/man/man1/
monit-5.10/man/man1/monit.1
STDERR: cp: cannot create regular file `/usr/bin/monit': Text file busy
---- End output of cd /var/chef/cache && tar zxvf monit-5.10.tar.gz && cd monit-5.10 && cp bin/monit /usr/bin/monit ----
Ran cd /var/chef/cache && tar zxvf monit-5.10.tar.gz && cd monit-5.10 && cp bin/monit /usr/bin/monit returned 1
[2014-12-11T14:09:32-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
need to update binary to 5.13: https://mmonit.com/monit/dist/binary/
I am trying the cookbook using kitchen & am stuck at the issue below:
================================================================================
Recipe Compile Error in /tmp/kitchen/cache/cookbooks/yum/resources/globalconfig.rb
================================================================================
ArgumentError
-------------
Cannot specify both default and name_property/name_attribute together on property path of resource yum_globalconfig
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/yum/resources/globalconfig.rb:76:in `class_from_file'
Relevant File Content:
----------------------
/tmp/kitchen/cache/cookbooks/yum/resources/globalconfig.rb:
69: attribute :mdpolicy, :kind_of => String, :equal_to => %w(instant group:primary group:small group:main group:all), :default => nil
70: attribute :metadata_expire, :kind_of => String, :regex => [/^\d+$/, /^\d+[mhd]$/, /never/], :default => nil
71: attribute :mirrorlist_expire, :kind_of => String, :regex => /^\d+$/, :default => nil
72: attribute :multilib_policy, :kind_of => String, :equal_to => %w(all best), :default => nil
73: attribute :obsoletes, :kind_of => [TrueClass, FalseClass], :default => true
74: attribute :overwrite_groups, :kind_of => [TrueClass, FalseClass], :default => nil
75: attribute :password, :kind_of => String, :regex => /.*/, :default => nil
76>> attribute :path, :kind_of => String, :regex => /.*/, :default => nil, :name_attribute => true
77: attribute :persistdir, :kind_of => String, :regex => /.*/, :default => nil
78: attribute :pluginconfpath, :kind_of => String, :regex => /.*/, :default => nil
79: attribute :pluginpath, :kind_of => String, :regex => /.*/, :default => nil
80: attribute :plugins, :kind_of => [TrueClass, FalseClass], :default => true
81: attribute :protected_multilib, :kind_of => [TrueClass, FalseClass], :default => nil
82: attribute :protected_packages, :kind_of => String, :regex => /.*/, :default => nil
83: attribute :proxy, :kind_of => String, :regex => /.*/, :default => nil
84: attribute :proxy_password, :kind_of => String, :regex => /.*/, :default => nil
85: attribute :proxy_username, :kind_of => String, :regex => /.*/, :default => nil
System Info:
------------
chef_version=13.5.3
platform=centos
platform_version=6.6
ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
program_name=chef-solo worker: ppid=3023;start=23:26:53;
executable=/opt/chef/bin/chef-solo
Can you let me know what am I doing wrong.
HI, it would be nice to have this cookbook uploaded to opscode comunity site, specially for those of us who use Berkshelf.
We store all of our service credentials (mail, db, lb, etc...) in encrypted data bags. I would like to extend this cookbook to support reading and setting mail credentials using an encrypted data bag. Does that sound valuable?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.