Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Install monit from source and add several tools with LWRP.

License

Notifications You must be signed in to change notification settings

higanworks-cookbooks/monit_bin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7ad261b · Jun 17, 2015

History

86 Commits
Jun 17, 2015
Jun 25, 2014
Aug 15, 2014
Jan 16, 2015
Aug 15, 2014
Aug 15, 2014
Aug 15, 2014
Aug 15, 2014
Aug 15, 2014
Aug 15, 2014
Aug 15, 2014
Aug 15, 2014
Aug 15, 2014
Aug 15, 2014
Feb 8, 2013
Aug 12, 2014
Aug 12, 2014
Aug 15, 2014
Jan 16, 2015

Repository files navigation

monit_bin cookbook

Build Status

  • Install monit from source.
  • Include setting tools monitensite, monitdisite.
  • Add LWRP for created configs.

Requirements

  • make (build-essential)

Platform

  • ubuntu
  • SmartOS

Usage

recipe[monit] to default install.

call from other recipe

include_recipe "monit_bin"

----
  put config from template to /etc/monit/conf.avail/
----

# enable
monit_bin "myapp.conf"

# disable
monit_bin "myapp.conf" do
  enable false
end

monitensite monitdisite

These tools contorol monit setting like a2ensite,a2disite.

Put your confing to /etc/monit/conf.avail/ and...

** To enable setting**

monitensite postfix.conf
monit reload

** To disable setting**

monitdisite postfix.conf
monit reload

Attributes

node['monit']['monitrc']['start_delay'] wait some time (in seconds) at startup before start checking services default:30

TODO: Write attributes...

Resources and Providers

monit_bin

Call monitensite and monit disite.

Example

monit_bin "postfix" do
  action :enable
end

monti_bin_check_system

build config for system resource with poricy strings.

Example

monit_bin_check_system "localperf" do
  action :create
  policies ["if memory usage > 70 % then alert"]
end

monti_bin_check_filesystem

build config for filesystem resource with poricy strings.

Example

monit_bin_check_filesystem "rootfs" do
  action :create
  path "/"
  policies ["if space usage > 70 % then alert"]
end

monti_bin_check_process

build config for process resource with poricy strings.

Example

monit_bin_check_process "sshd" do
  action :create
  type "pid"
  pidfile "/var/run/sshd.pid "
  start_program "/usr/sbin/service ssh start"
  stop_program "/usr/sbin/service ssh stop"
end

Recipes

  • default: install monit from souce.
  • include: just define monit as service resource.
  • services: monitoring services. setting from attributes.
  • smartos_inittab: install and regist inittab for smartos. Smartos use this insted of default.

FAQ

monit status/summray doesn't work?

When using monit without m/monit, You should set 127.0.0.1 or 0.0.0.0 to node[:monit][:monitrc][:'http_address] attribute.

Test

kitchen test

Author

Author:: HiganWorks LLC (sawanoboriyu@higanworks.com)

About

Install monit from source and add several tools with LWRP.

Resources

License

Stars

Watchers

Forks

Packages

No packages published