jeffwillette / docker-alertd Goto Github PK
View Code? Open in Web Editor NEWMonitor docker stats and send alerts
License: MIT License
Monitor docker stats and send alerts
License: MIT License
I downloaded the latest version in order to be able to only check for container existence. However, it seems like alerting does not work at all anymore. Sample config:
---
duration: 100 # duration in ms between docker API calls
iterations: 0 # number of iterations to run (0 = run forever)
containers:
- name: foo
expectedRunning: true
- name: bar
expectedRunning: true
- name: baz
email:
active: true
smtp: some.example.com
password: ...
port: 587
from: [email protected]
subject: "monitoring alert"
to:
- [email protected]
- [email protected]
When stopping a container expected to be running, nothing happens.
Any idea what could be wrong?
Really like the idea of this service. It is very minimal and serves a very specific purpose. Thanks for the work!
My requirement is to only be alerted when a container is completely absent. I can achieve this by setting min-procs
to 1. Therefore I´m not interested in any cpu oder memory usage warnings.
Would it be possible to only watch the metrics which are actually defined in the config file?
I have two DNS mapped to a running container. Now sometimes one url fails but other works as expected.Need to know if there is any option to monitor the same.
formatting should be up to the alerter, so the error should store things as agnostically as possible and leave the formatting for the sender of the message.
emails should be formatted so that if there is one message in the email, a blurb is put into the subject, if there is more than one message, it should say "multiple alerts" or something of the sort.
look into the way that alerts (for each individual container) and alerts (for all containers combined) are formed. These might need to be different structs.
A CPU usage might spike for some short lived process. It should take this into account since it is getting CPU usage info every second or so.
notification type should be optionally set in settings.
Currently, the program exits/crashes when a container does not exist or is removed.
In my opinion the service should keep running and only send an alert about the circumstance.
What do you think?
There is a test failing with the error:
2017/02/11 01:12:33 key 'min-procs' not found
It is probably being cause by the JSON templates in the test file being out of date
Currently if there is a CPU spike, it will send an alert, then a recovery alert, and then another alert if there is an intermittent spike.
I think there should probably be something like a delay between an alert and a recovery check to see if a recovery is really warranted.
Another possible way around this issue is to only send an alert after a certain amount of consecutive checks showed an alert is really necessary. That would cut down the amount of times that an alert would be sent for a short spike
There should be an option pull from the registry and run it from docker instead of going through the trouble of installing the binary and running it as a background process.
Are there any security concerns with mounting the docker.sock
?
Will the configuration come from the Dockerfile or from a normal config file passed to the container?
These are actually two separate features.
It would help to be able to define different subjects for e-mail alerts depending on the type of alert (failure or recovery). Example: "container failure" vs. "container recovery"
It would also be nice to provide a custom text or even use a template for individual content in alerts/e-mails.
Both features are nice to have.
right now a check for existence means that it will check to see that the container exists, running or not. There needs to be another state check where it checks for whether or not the container is currently running.
Disclaimer: I do not have any experience with go(lang).
Is there any possible alternative method to install this service? go get
takes forever to download docker (which is a dependency I assume).
I want to check for the existence of a container (regardless of state).
In my case the container is initially stopped / not running.
As far as I understand the correct way to do this is the following:
containers:
- name: xyz
However, with this I´m getting alerts when the container starts and recovery alerts when the container stops. It looks like the above configuration causes docker-alertd to expect the container not to be running.
Do you have any idea what the problem could be?
it should also notify when things return to normal for the container
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.