Skip to content
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

adding notification to monitor task #42

Open
gabriel-blankenship opened this issue Nov 8, 2023 · 0 comments
Open

adding notification to monitor task #42

gabriel-blankenship opened this issue Nov 8, 2023 · 0 comments

Comments

@gabriel-blankenship
Copy link

gabriel-blankenship commented Nov 8, 2023

Trying to figure out how to add a notification to a particular monitor task in ansible so that it can all be generated at the same time. Any ideas?

An example task I'm working on:

 - name: Add SSL check for all domain certificates
   lucasheld.uptime_kuma.monitor:
     api_url: "{{ kuma_api_url }}"
     api_token: "{{ api_token }}"
     name: "SSL Verify: {{ item }}"
     url: https://{{ item }}
     type: http
     expiryNotification: true
     state: present
     interval: 86400
   tags:
     - kuma_monitors

I want to create a slack notification via a webhook. Does the slack notification need to be created first and register the output to grab an id from it and then add that to the above task? Going to try and test via this documentation https://github.com/lucasheld/ansible-uptime-kuma/wiki/monitor_info with notificationIDList that currently is the only thing I'm seeing that might be the route I should be taking.

I plan to add a debug task after the notification task is ran to see if it gives me an id, if so then will add that to a task via the notificationIDList.

I also posted this question here sorry if this doesn't exactly fit here but wasn't sure where else I could post and get a response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant