Daily
Run daily checks that open Jira tickets when something fails
Each day your SSL certificates and key endpoints are checked, and any new problem opens a Jira ticket and sends you an email.
- Runs
- Daily
- Apps
- Gmail, Jira
- AI
- Not needed
- Access
- Jira create issues; gmail.send
Send this to your assistant
Create a ClickRuntime automation: every morning, check our domains' SSL certificates expire in more than 21 days and our health endpoints respond; for each new problem, open a ticket in OPS and email me.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small SaaS company had its website go dark for an afternoon because an SSL certificate expired. The renewal email had gone to someone who had left. Similar slow-burn problems, like a nightly job silently failing, are found only when a customer complains.
A daily set of checks that opens a ticket when something is wrong gives these problems an owner before they become outages. The email makes sure someone sees it, and the ticket makes sure it is tracked to a fix.
What you get out of it
Expiry dates are not missed
Certificates are flagged three weeks before they expire. Renewal happens calmly, not during an outage.
Problems become tracked work
Each failure opens a ticket. It is assigned, worked and closed like any other task.
One ticket per problem
Known problems are remembered and not ticketed again each day. The ticket closes the loop when it is fixed.
Easy to extend
Add checks for anything you can test from the web, such as a nightly export file or an API usage limit.
How it works
What happens, step by step
Every morning, ClickRuntime runs your list of checks, such as certificate expiry and whether key pages respond.
It compares each failure with the problems it already knows about.
For each new problem, it opens a ticket in your Jira project.
You get an email listing the new problems and their tickets.
Before it runs live
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
- Connect Jira
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Gmail and Jira steps into one automation
Under the hood
The code that runs this automation
from datetime import datetime, timezone
from clickruntime import on_trigger, credentials, http, notify, state
JIRA, SITE = "https://api.atlassian.com/ex/jira/your-cloud-id", "https://acme.atlassian.net/browse/"
adf = lambda text: {"type": "doc", "version": 1, "content": [{"type": "paragraph", "content": [{"type": "text", "text": text}]}]}
def jira(method, path, **kw):
resp = http.request(method, JIRA + path, headers={"Authorization": f"Bearer {credentials.connection('jira', 'work')}", "Accept": "application/json"}, **kw)
return resp.raise_for_status() or (resp.json() if resp.content else None)
DOMAINS, HEALTH = ["acme.example", "app.acme.example"], ["https://app.acme.example/health"]
def cert_days(host):
resp = http.get(f"https://{host}", stream=True, timeout=10)
not_after = resp.raw.connection.sock.getpeercert()["notAfter"]
resp.close()
return (datetime.strptime(not_after, "%b %d %H:%M:%S %Y %Z").replace(tzinfo=timezone.utc) - datetime.now(timezone.utc)).days
@on_trigger
def run(event):
problems = {}
for d in DOMAINS:
if (days := cert_days(d)) < 21:
problems[f"ssl:{d}"] = f"SSL certificate for {d} expires in {days} days"
for url in HEALTH:
try:
ok = http.get(url, timeout=10).ok
except Exception:
ok = False
if not ok:
problems[f"health:{url}"] = f"Health check failed for {url}"
known = state.get("known") or {}
created = []
for key, text in problems.items():
if key not in known:
known[key] = jira("POST", "/rest/api/3/issue", json={"fields": {"project": {"key": "OPS"}, "issuetype": {"name": "Task"}, "summary": text}})["key"]
created.append(f"{known[key]} {text}")
if created:
notify.email_me(f"{len(created)} new monitoring problems", "\n".join(created))
state.set("known", {k: v for k, v in known.items() if k in problems})
return {"problems": len(problems), "new": len(created)}FAQ
Common questions
What kinds of checks can it run?
What happens when a problem is fixed?
Can it post to Slack as well?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Email assignees and leads about overdue Jira tickets
Each morning, people with overdue or blocked tickets get one email listing them, with their lead copied, and nobody is emailed about the same ticket twice in a row.
See how it worksEmail a weekly sprint report to stakeholders
Every Friday stakeholders get an email with the sprint's progress: what is done, in progress and at risk, with a short written summary.
See how it worksTurn vendor security advisories into Jira tickets
New security advisories from the vendors you rely on become Jira tickets, and you get an email for each one.
See how it worksKeep exploring
Set up “Run daily checks that open Jira tickets when something fails” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.