{"id":21008509,"url":"https://github.com/metrixware-echoes-tech/puppet-monit","last_synced_at":"2025-12-11T21:38:47.196Z","repository":{"id":20158338,"uuid":"23428914","full_name":"metrixware-echoes-tech/puppet-monit","owner":"metrixware-echoes-tech","description":"Puppet module to manage monit installation and configuration","archived":false,"fork":false,"pushed_at":"2018-09-11T08:46:31.000Z","size":119,"stargazers_count":4,"open_issues_count":6,"forks_count":49,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-29T06:56:49.862Z","etag":null,"topics":["monit","puppet"],"latest_commit_sha":null,"homepage":"https://forge.puppetlabs.com/echoes/monit","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metrixware-echoes-tech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-28T13:30:25.000Z","updated_at":"2023-01-30T09:45:18.000Z","dependencies_parsed_at":"2022-08-03T07:45:21.561Z","dependency_job_id":null,"html_url":"https://github.com/metrixware-echoes-tech/puppet-monit","commit_stats":null,"previous_names":["echoes-tech/puppet-monit"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/metrixware-echoes-tech/puppet-monit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrixware-echoes-tech%2Fpuppet-monit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrixware-echoes-tech%2Fpuppet-monit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrixware-echoes-tech%2Fpuppet-monit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrixware-echoes-tech%2Fpuppet-monit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metrixware-echoes-tech","download_url":"https://codeload.github.com/metrixware-echoes-tech/puppet-monit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrixware-echoes-tech%2Fpuppet-monit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27670528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-11T02:00:11.302Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["monit","puppet"],"created_at":"2024-11-19T09:12:43.472Z","updated_at":"2025-12-11T21:38:47.114Z","avatar_url":"https://github.com/metrixware-echoes-tech.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# monit\n\n[![Build Status](https://travis-ci.org/echoes-tech/puppet-monit.svg?branch=master)]\n(https://travis-ci.org/echoes-tech/puppet-monit)\n[![Flattr Button](https://api.flattr.com/button/flattr-badge-large.png \"Flattr This!\")]\n(https://flattr.com/submit/auto?user_id=echoes\u0026url=https://forge.puppetlabs.com/echoes/monit\u0026title=Puppet%20module%20to%20manage%20Monit\u0026description=This%20module%20installs%20and%20configures%20Monit.%20It%20allows%20you%20to%20enable%20HTTP%20Dashboard%20an%20to%20add%20check%20from%20a%20file.\u0026lang=en_GB\u0026category=software \"Puppet module to manage Monit installation and configuration\")\n\n#### Table of Contents\n\n1. [Overview](#overview)\n2. [Module Description - What the module does and why it is useful](#module-description)\n3. [Setup - The basics of getting started with monit](#setup)\n    * [Setup requirements](#setup-requirements)\n    * [Beginning with monit](#beginning-with-monit)\n4. [Usage - Configuration options and additional functionality](#usage)\n    * [Enable Monit Dashboard](#enable-monit-dashboard)\n    * [Add a check](#add-a-check)\n    * [Remove a check](#remove-a-check)\n5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)\n6. [Limitations - OS compatibility, etc.](#limitations)\n7. [Development - Guide for contributing to the module](#development)\n8. [Contributors](#contributors)\n\n## Overview\n\nPuppet module to manage Monit installation and configuration.\n\n## Module Description\n\nThis module installs and configures [Monit](http://mmonit.com/monit/).\nIt allows you to enable HTTP Dashboard an to add check from a file.\n\n## Setup\n\n### Setup Requirements\n\n**WARNING:** For RedHat systems, you may need to add an additional repository like the [EPEL repository](http://fedoraproject.org/wiki/EPEL).\nYou can use the module [stahnma-epel](https://forge.puppetlabs.com/stahnma/epel) to do this.\n\nSupports Puppet v3 (optionally with future parser) and v4 with Ruby versions\n1.8.7 (Puppet v3 only), 1.9.3, 2.0.0 and 2.1.0.\n\n### Beginning with monit\n\n```puppet\ninclude ::monit\n```\n\n## Usage\n\n### Enable Monit Dashboard\n\n```puppet\nclass { 'monit':\n  httpd          =\u003e true,\n  httpd_address  =\u003e '172.16.0.3',\n  httpd_password =\u003e 'CHANGE_ME',\n}\n```\n\n### Add a check\n\nUsing the source parameter:\n\n```puppet\nmonit::check { 'ntp':\n  source =\u003e \"puppet:///modules/${module_name}/ntp\",\n}\n```\n\nOr using the content parameter with a string:\n\n```puppet\nmonit::check { 'ntp':\n  content =\u003e 'check process ntpd with pidfile /var/run/ntpd.pid\n  start program = \"/etc/init.d/ntpd start\"\n  stop  program = \"/etc/init.d/ntpd stop\"\n  if failed host 127.0.0.1 port 123 type udp then alert\n  if 5 restarts within 5 cycles then timeout\n',\n}\n```\n\nOr using the content parameter with a template:\n\n```puppet\nmonit::check { 'ntp':\n  content =\u003e template(\"${module_name}/ntp.erb\"),\n}\n```\n\n### Remove a check\n\n```puppet\nmonit::check { 'ntp':\n  ensure =\u003e absent,\n}\n```\n\n## Reference\n\n### Classes\n\n#### Public classes\n\n* monit: Main class, includes all other classes.\n\n#### Private classes\n\n* monit::params: Sets parameter defaults per operating system.\n* monit::install: Handles the packages.\n* monit::config: Handles the configuration file.\n* monit::service: Handles the service.\n* monit::firewall: Handles the firewall configuration.\n\n#### Parameters\n\nThe following parameters are available in the `::monit` class:\n\n##### `alert_emails`\n\nSpecifies one or more email addresses to send global alerts to. Valid options: array. Default value: []\n\n##### `check_interval`\n\nSpecifies the interval between two checks of Monit. Valid options: numeric. Default value: 120\n\n##### `config_file`\n\nSpecifies a path to the main config file. Valid options: string. Default value: varies with operating system\n\n##### `config_dir`\n\nSpecifies a path to the config directory. Valid options: string. Default value: varies with operating system\n\n##### `config_dir_purge`\n\nSpecifies if unmanaged files in the config directory should be purged. Valid options: 'true' or 'false'. Default value: 'false'\n\n##### `httpd`\n\nSpecifies whether to enable the Monit Dashboard. Valid options: 'true' or 'false'. Default value: 'false'\n\n##### `httpd_port`\n\nSpecifies the port of the Monit Dashboard. Valid options: numeric. Default value: 2812\n\n##### `httpd_address`\n\nSpecifies the IP address of the Monit Dashboard. Valid options: string. Default value: 'locahost'\n\n##### `httpd_user`\n\nSpecifies the user to access the Monit Dashboard. Valid options: string. Default value: 'admin'\n\n##### `httpd_password`\n\nSpecifies the password to access the Monit Dashboard. Valid options: string. Default value: 'monit'\n\n##### `logfile`\n\nSpecifies the logfile directive value. Valid options: string. Default value: '/var/log/monit.log'\n\nIt is possible to use syslog instead of direct file logging. (e.g. 'syslog facility log_daemon')\n\n##### `mailserver`\n\nIf set to a string, alerts will be sent by email to this mailserver. Valid options: string. Default value: undef\n\nFor more details, see: https://mmonit.com/monit/documentation/monit.html#Setting-a-mail-server-for-alert-delivery\n\n##### `mailformat`\n\nSpecifies the alert message format. Valid options: hash. Default value: undef\n\nFor more details, see: https://mmonit.com/monit/documentation/monit.html#Message-format\n\n##### `manage_firewall`\n\nIf true and if puppetlabs-firewall module is present, Puppet manages firewall to allow HTTP access for Monit Dashboard. Valid options: 'true' or 'false'. Default value: 'false'\n\n##### `mmonit_address` *Requires at least Monit 5.0*\n\nSpecifies the remote address of an M/Monit server to be used by Monit agent for report. If set to undef, M/Monit connection is disabled. Valid options: string. Default value: undef\n\n##### `mmonit_port` *Requires at least Monit 5.0*\n\nSpecifies the remote port of the M/Monit server. Valid options: numeric. Default value: 8080\n\n##### `mmonit_user` *Requires at least Monit 5.0*\n\nSpecifies the user to connect to the remote M/Monit server. Valid options: string. Default value: 'monit'\n\nIf you set both user and password to an empty string, authentication is disabled.\n\n##### `mmonit_password` *Requires at least Monit 5.0*\n\nSpecifies the password of the account used to connect to the remote M/Monit server. Valid options: string. Default value: 'monit'\n\nIf you set both user and password to an empty string, authentication is disabled.\n\n##### `mmonit_without_credential` *Requires at least Monit 5.0*\n\nBy default Monit registers credentials with M/Monit so M/Monit can smoothly communicate back to Monit and you don't have to register Monit credentials manually in M/Monit. It is possible to disable credential registration setting this option to 'true'. Valid options: 'true' or 'false'. Default value: 'false'\n\n##### `package_ensure`\n\nTells Puppet whether the Monit package should be installed, and what version. Valid options: 'present', 'latest', or a specific version number. Default value: 'present'\n\n##### `package_name`\n\nTells Puppet what Monit package to manage. Valid options: string. Default value: 'monit'\n\n##### `service_ensure`\n\nTells Puppet whether the Monit service should be running. Valid options: 'running' or 'stopped'. Default value: 'running'\n\n##### `service_manage`\n\nTells Puppet whether to manage the Monit service. Valid options: 'true' or 'false'. Default value: 'true'\n\n##### `service_name`\n\nTells Puppet what Monit service to manage. Valid options: string. Default value: 'monit'\n\n##### `start_delay` *Requires at least Monit 5.0*\n\nIf set, Monit will wait the specified time in seconds before it starts checking services. Valid options: numeric. Default value: 0\n\n### Defines\n\n#### Public defines\n\n* monit::check: Adds a Monit check.\n\n#### Parameters\n\nThe following parameters are available in the `::monit::check` define:\n\n##### `ensure`\n\nTells Puppet whether the check should exist. Valid options: 'present', 'absent'. Default value: present\n\n##### `source`\n\nTells Puppet what is the path of the configuration file. Valid options: string. Exclusive with the `content` parameter. Default value: undef\n\n##### `content`\n\nSpecifies the content of the configuration file. Valid options: string. Exclusive with the `source` parameter. Default value: undef\n\n##### `package_name`\n\nTells Puppet which Monit package is required. Valid options: string. Default value: 'monit'\n\n##### `service_name`\n\nTells Puppet which Monit service will be notify. Valid options: string. Default value: 'monit'\n\n## Limitations\n\nRedHat and Debian family OSes are officially supported. Tested and built on Debian and CentOS.\n\n## Development\n\n[Echoes Technologies](https://echoes.fr) modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great.\n\n[Fork this module on GitHub](https://github.com/echoes-tech/puppet-monit/fork)\n\n## Contributors\n\nThe list of contributors can be found at: https://github.com/echoes-tech/puppet-monit/graphs/contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrixware-echoes-tech%2Fpuppet-monit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetrixware-echoes-tech%2Fpuppet-monit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrixware-echoes-tech%2Fpuppet-monit/lists"}