Description
Automatron (Ah-Tom-a-tron) is an open source framework designed to detect and remediate IT systems issues. Meaning, it can be used to monitor systems and when it detects issues; correct them.
Automatron alternatives and similar packages
Based on the "DevOps Tools" category.
Alternatively, view Automatron alternatives based on common mentions on social networks and blogs.
-
Ansible
Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com. -
Docker Compose
Define and run multi-container applications with Docker -
letsencrypt
Certbot is EFF's tool to obtain certs from Let's Encrypt and (optionally) auto-enable HTTPS on your server. It can also act as a client for any other CA that uses the ACME protocol. -
SaltStack
Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here: -
psutil
Cross-platform lib for process and system monitoring in Python -
supervisor
Supervisor process control system for Unix (supervisord) -
BorgBackup
Deduplicating archiver with compression and authenticated encryption. -
cloudinit
Official upstream for the cloud-init: cloud instance initialization -
pexpect
A Python module for controlling interactive programs in a pseudo-terminal -
pyinfra
pyinfra automates infrastructure super fast at massive scale. It can be used for ad-hoc command execution, service deployment, configuration management and more. -
honcho
Honcho: a python clone of Foreman. For managing Procfile-based applications. -
pypyr automation task runner
pypyr task-runner cli & api for automation pipelines. Automate anything by combining commands, different scripts in different languages & applications into one pipeline process. -
riffdog
Riffdog Terraform scanner - finding 'things' in the Real World (aka AWS) which Terraform didn't put there.
Access the most powerful time series database as a service
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Automatron or a related project?
README
Automatron is a framework for creating self-healing infrastructure. Simply put, it detects system events & takes action to correct them.
The goal of Automatron is to allow users to automate the execution of common tasks performed during system events. These tasks can be as simple as sending an email to as complicated as restarting services across multiple hosts.
Features
- Automatically detect and add new systems to monitor
- Monitoring is executed over SSH and completely agent-less
- Policy based Runbooks allow for monitoring policies rather than server specific configurations
- Supports Nagios compliant health check scripts
- Allows dead simple arbitrary shell commands for both checks and actions
- Runbook flexibility with Jinja2 templating support
- Pluggable Architecture that simplifies customization
Runbooks
The core of Automatron is based around Runbooks. Runbooks are policies that define health checks and actions. You can think of them in the same way you would think of a printed runbook. Except with Automatron, the actions are automated.
A simple Runbook example
The below runbook is a very basic example, it will check if NGINX is running (every 2 minutes) and restart it after 2 unsuccessful checks.
name: Check NGINX
schedule: "*/2 * * * *"
checks:
nginx_is_running:
execute_from: target
type: cmd
cmd: service nginx status
actions:
restart_nginx:
execute_from: target
trigger: 2
frequency: 300
call_on:
- WARNING
- CRITICAL
- UNKNOWN
type: cmd
cmd: service nginx restart
The above actions will be performed every 300 seconds (5 minutes) until the health check returns an OK status. This delay allows time for NGINX to restart after each execution.
A complex Runbook with Jinja2
This next runbook example is a more complex version of the above. In this example we will use Jinja2 and Automatron's Facts to enhance our runbook further.
name: Check NGINX
{% if "prod" in facts['hostname'] %}
schedule:
second: */20
{% else %}
schedule: "*/2 * * * *"
{% endif %}
checks:
nginx_is_running:
execute_from: target
type: cmd
cmd: service nginx status
actions:
restart_nginx:
execute_from: target
trigger: 2
frequency: 300
call_on:
- WARNING
- CRITICAL
- UNKNOWN
type: cmd
cmd: service nginx restart
remove_from_dns:
execute_from: remote
trigger: 0
frequency: 0
call_on:
- WARNING
- CRITICAL
- UNKNOWN
type: plugin
plugin: cloudflare/dns.py
args: remove [email protected] apikey123 example.com --content {{ facts['network']['eth0']['v4'][0] }}
The above example uses Jinja2 and Facts to create a conditional schedule. If our target server has a hostname that contains the word "prod" within it. The schedule for the health check will be every 20 seconds. If not, it will be every 2 minutes.
Another addition is the remove_from_dns
action, which will remove the target server's DNS entry using the CloudFlare DNS plugin.
By using Facts and Jinja2 together you can customize a single runbook to cover unique actions for multiple hosts and environments.
Stay in the loop
License
Copyright 2016 Benjamin Cane
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*Note that all licence references and agreements mentioned in the Automatron README section above
are relevant to that project's source code only.