1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins/modules/monitoring
Simon Kelly 8de1c0c205
monit: fix module detection of monitored process state (#1107)
* refactor and test

* require version >= 5.21.0

Prior to this version the status output was different

* python version compatability

* use exception classes from utils

* modify monit to use 'status' output instead of 'summary' output

The summary output is a fixed width table which truncates the
contents and prevents us from parsing the actual status of the
program.

* add integration tests + fixes

* remove unused handlers in monit integration test

* fix lint

* add '__metaclass__ = type' to integration python files

* raise AttributeError

* simplify status

* lint: add type to parameter docs

* remove lint ignore

* move monit process config into main file

* specify path to monit PID file

* set config location based on os_family

* create required directories

* update aliases to set group and skips

* add changelog

* add author

* add types to docs

* add EPEL repo

* custom vars for centos-6

* uninstall EPEL

* support older versions

* wait for status to change before exiting

* use 'validate' to force status updates

* handle 'execution failed'

* better status output for errors

* add more context to failure + standardize

* don't check rc for validate

* legacy string format support

* add integration test for 'reloaded' and 'present'

* don't wait after reload

* lint

* Revert "uninstall EPEL"

This reverts commit 4d548718d0.

* make 'present' more robust

* Apply suggestions from code review

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* add license header

* drop daemon.py and use python-daemon instead

* skip python2.6 which is not supported by python-daemon

* refactor test tasks for reuse

* cleanup files after test

* lint

* start process before enabling monit

This shouldn't be necessary but I'm adding it in the hopes
it will make tests more robust.

* retry task

* attempt to rescue the task on failure

* fix indentation

* ignore check if rescue ran

* restart monit instead of reload

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-10-23 12:26:23 +02:00
..
datadog Add include_tags to datadog_monitor (#409) 2020-10-23 07:12:22 +02:00
sensu modules: fix examples to use FQCN for builtin modules (#648) 2020-07-14 18:28:08 +03:00
airbrake_deployment.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
bigpanda.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
circonus_annotation.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
honeybadger_deployment.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
icinga2_feature.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
icinga2_host.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
librato_annotation.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
logentries.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
logstash_plugin.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
monit.py monit: fix module detection of monitored process state (#1107) 2020-10-23 12:26:23 +02:00
nagios.py fix ignored sanity tests (#1026) 2020-10-02 14:51:10 +02:00
newrelic_deployment.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
pagerduty.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
pagerduty_alert.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
pingdom.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
rollbar_deployment.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
spectrum_device.py collection: Change default='no's and 'yes's to default=False and default=True (#556) 2020-06-22 15:56:35 +02:00
stackdriver.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
statusio_maintenance.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
uptimerobot.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00