-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Expanded notification support #79
Comments
Templated notifications can get a bit tricky because some of our destinations will not allow extended information, but some definitely do and we're not taking advantage of all of them right now (Slack and Hipchat come to mind). |
We should come up with a class of notifications that represent the system notifications and make those configurable by system administrators. This should not be made to replace an external monitoring system. |
This also should implement websocket events for notifications (at least notification tests) |
I'm surprised that this has not been done yet, Tower is at version 3.2.1 and you can't modify the "template" |
Hey, it should also be possible to allow notifications to be sent upon changes, not solely for success or failed. This would allow for security monitoring and reporting of infrastructure/configuration changes. |
Playbooks only have a success and failure state; 'changed' only applies to hosts. |
Sure, I'm aware of that, but it would be helpful to be able to receive a notification if any of the hosts of a play had a task applied that changed a configuration. |
Hi, The easiest form would be basically a webhook with more features: allow selection the http method, and a field where I could write the POST payload as a Jinja template, and substitute some variables. |
Is it possible to get the output of the debug module/ stdout into the e-mail notfications? |
This is highly unlikely to ever happen, just due to the scaling problem it causes if you're trying to schlep a 10MB log file around. |
@wenottingham ok your are right generally it is not a good idea but it would be nice if there were checkbox to enable this feature anyhow - because not every environment contains thousands of servers |
You can find the notification backends here: https://github.com/ansible/awx/tree/devel/awx/main/notifications If you have any other questions related to this specific topic it'd be best to take it up on the mailing list or IRC. |
@matburt thank you for your fast reply I changed in /usr/lib/python2.7/site-packages/awx/main/models/jobs (in docker containers) ( Lines 685 to 692 in 07680dd
all_hosts[h.host_name] = dict(failed=h.failed,
changed=h.changed,
dark=h.dark,
failures=h.failures,
ok=h.ok,
processed=h.processed,
skipped=h.skipped,
stdout=h.stdout) but this does not put the stdout in the notification. (building from source does not works for me, the playbook exits with an error: unexpected parameter: 'stream' in /usr/lib/python2.7/dist-packages/ansible/modules/cloud/docker/docker_image.py Line 602) |
@MBcom stdout for the job is not stored in a host-specific manner in the way you're attempting to access it; if you wanted to include the stdout for the entire job, you'd need to add it here: Line 699 in 07680dd
e.g., ...
hosts=all_hosts,
stdout=self.result_stdout_raw_handle().read().decode('utf-8')) Keep in mind that these interfaces are subject to change (future upgrades of awx likely will break with your one-off changes), and as @wenottingham mentioned above, this is likely not the type of change we'd introduce to awx due to the performance implications. |
An working AWX with mail notifications containing the ansible output can be found at https://github.com/mbcom/awx/ @ryanpetrello and @matburt - thanks for helping me on this issue |
+1 Must needed feature |
FYI, we've just released a new version of awx (https://github.com/ansible/awx/releases/tag/3.0.0) which includes support for notifications using the Grafana annotations API. |
Implementation Notes for "On Start" Notification TemplatesDiscussed implementation details of this feature w/ @beeankha today. Here are some highlights of the work to do:
At this point in time, the UI probably has what they need to start integrating with the API. @mabashian how do you feel about this?
|
Implementation Notes for Custom HTTP Method + Basic Auth SupportDiscussed implementation details of this feature w/ @beeankha today. Here are some highlights of the work to do: Custom HTTP Method
Basic Auth Support
@mabashian does the UI need special code to handle these new parameters, or is it smart enough to just draw the fields based on the fields defined on the template? |
Org Breadcrumb and Tabs
Added checklist to description so we can mark off progress on the different work items associated with this ticket. Marked 'templated notifications' and 'notifications on job start' as complete. Not sure about the status of the other items. |
I removed the |
@jladdjr @beeankha have we finished everything we agreed on re: notifications in the next release? If so, @wenottingham maybe we should put this in |
@ryanpetrello - I'm still working with @tvo318 on docs, otherwise that's a yes for me |
@wenottingham can you file new distinct issues for these if you still care about tracking them? |
If they end up being needed, I can; this can be closed when it's done. |
For what it's worth, we're also interested on an While the playbook doesn't have a "changed", you should be able to see if the playbook changed anything by filtering through the hosts/tasks the changed, no? |
You can probably get this by just looking at the summary event. I'm not sure if any of this is super relevant here. You can take this event as a webhook and then introspect the summary event to know if the host you were talking to |
The three features that made this card are now tested and merged.
As suggested above I am closing this one card, and for any new feature a new card should be open. |
AWX Feature Spec - Expanded notifications
User Persona
Automation user
Usage Cases
There are a variety of ways that notifications could be made more useful for users. Among them:
The notification system should notify on assorted AWX/Tower events (license related, ENOSPC, cluster health, etc.)(removed due to new metrics endpoint)API Considerations
Significant.
UI/UX Considerations
All of this will need to be configurable.
Docs
QA Suggestions
Notes
Updates/Changelog
2017-09-08: Initial version
The text was updated successfully, but these errors were encountered: