pgolm / ansible-role-monit Goto Github PK
View Code? Open in Web Editor NEWAnsible role to configure monit.
Home Page: https://galaxy.ansible.com/pgolm/monit/
Ansible role to configure monit.
Home Page: https://galaxy.ansible.com/pgolm/monit/
so, my solution is, that you can add Enabled: False to just one monit service and ansible will not add it to the project. It will also delete it later if changed from True to False. Default befaviour (if True or nothing specified) is True
I was wondering (hoping) that you could maybe make the installation step either optional or take it out completely? As the version in the standard repo's tends to be fairly out of date. And there are those of us who like to live on the edge and install via their git repo....
If that can be done, I'd use y'all's role exclusively as far as configuring my monit.... I've got my own building-role taken care of.
And I'd be happy to help contribute a macOS wing as well!
The webinterface can be bound to a unix socket instead of a TCP port (see https://mmonit.com/monit/documentation/monit.html#UNIX-SOCKET), but it's not currently possible with this role. Can this be added?
Thanks for this role,
Sylvain
Its rather confusing that this is called "playbook" when its a role.
Hello,
Thanks for this cool initiative.
I'm having an error message when activation the user interface.
Here is my defaults/main.yml file for acl rules :
monit_webinterface_acl_rules :
I get those error when provisioning :
<127.0.0.1> REMOTE_MODULE group name=vagrant:monit state=present
failed: [default] => (item=toto:titi) => {"failed": true, "item": "toto:titi", "name": "toto:titi"}
msg: groupadd: 'toto:titi' is not a valid group name
Why is the module group invoked here ? I thought it would just replace the rules variable in the template file of the webinterface.
Thanks
Cyrille
Latest monit is broken.
https://bugs.launchpad.net/ubuntu/+source/monit/+bug/1786910
Is there a way to specify which version of monit to use?
README says monit_eventqueue_dir
defaults to /var/lib/monit/events
however this is not the case in defaults/main.yml
.
This means the monitrc.j2
template never adds the set eventqueue
block:
{% if monit_eventqueue_dir is defined %}
set eventqueue
basedir {{ monit_eventqueue_dir | default('/var/lib/monit/events') }}
slots {{ monit_eventqueue_slots | default(100) }}
{% endif %}
Which means alerts don't send.
Monit documentation specifies a way to manage the monit's web server TLS configuration. It would be nice to support this configuration through this ansible role.@
When running a play with --check
flag, the task fails with the following message:
TASK [monit : monitors - Remove unused monitors] *******************************
fatal: [123.345.567.789]: FAILED! => {"failed": true, "msg": "'dict object' has no attribute 'stdout_lines'"}
to retry, use: --limit @/Users/koenpunt/.../ansible/playbook.retry
Hi,
First, thanks for the nice ansible role! It was a pleasure using it.
Running it against my CentOS7 box, I noticed two problems with the configuration:
/etc/monit.conf
, the original /etc/monitrc
still remains and is loaded when the service starts and the two configurations are merged. In addition to the ambiguity it causes, a dangerous effect is that the default user/pass of admin:monit
will still be active which is a security issue.monitrc_conf
to /etc/monitrc
to avoid having both files on the system. This revealed another issue: the Ansible configuration file (templates/monitrc.j2
) sets the id and state of the service to be in the /var/lib/monit
folder, while this folder does not exist (at least not on my box). This causes the service to complain and fail to start.I fixed these issues and a patch of the fix is attached. I can do a pull request if you agree with the changes (commit: roozbehf@f1c8f85)
can you let me know why its throwing variable undefined!!
the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'unicode' object has no attribute 'name'\n\nThe error appears to have been in '/root/ansible-consul-temp/roles/pgolm.monit/tasks/monitors.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: monitors - Write monitors\n ^ here\n
The webinterface template, as it is now, causes the following message in the logs when launching monit:
monit: monit httpd not started since no connect allowed
In the monit documentation: https://mmonit.com/monit/documentation/monit.html, the syntax is:
SET HTTPD PORT <number> [ADDRESS <hostname | IP-address>]
[SSL <ENABLE | DISABLE>]
[PEMFILE <path>]
[CLIENTPEMFILE <path>]
[ALLOWSELFCERTIFICATION]
[SIGNATURE <ENABLE | DISABLE>]
ALLOW <user:password | IP-address | IP-range>+
Hi. Please fix monit_service_detele_unlisted
, there is mistake in word 'delete', cannot copy-paste from documentation. Thanks!
I have such error
TASK [ANXS.postgresql : PostgreSQL | Make sure the PostgreSQL users are present] ***
fatal: [163.172.154.240]: FAILED! => {"failed": true, "msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chown: changing ownership of '/tmp/ansible-tmp-1489444628.62-212718584096187/': Operation not permitted\nchown: changing ownership of '/tmp/ansible-tmp-1489444628.62-212718584096187/postgresql_user.py': Operation not permitted\n). For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"}
to retry, use: --limit @/eqa/standalone/ansible_provision/install_postgre.retry
It appears only when I setup Postgres on Scaleway VPS.
Error doesn't appear when I setup Postgres on DigitalOcean VPS.
Any ideas ?
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.