Hourly
Get warned if your index loses records
If your vector count falls below a floor or drops sharply since yesterday, you hear about it in Slack within the hour.
- Runs
- Hourly
- Apps
- Pinecone
- AI
- Not needed
- Access
- API key
Send this to your assistant
Create a ClickRuntime automation: every hour, check the record count in my Pinecone index docs-search and post to #ops in Slack if it drops below 100,000 or falls more than 10% from yesterday.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A retrieval system built on Pinecone assumes the index holds what you put in it. Then a bad deployment deletes a namespace, a cleanup script uses the wrong filter, or an ingestion job overwrites records with an empty batch. Search quality drops, users see worse answers, and the team spends days wondering why before anyone looks at the vector count.
Every hour, the index's stats are described to get the current total number of vectors. The number is compared with a threshold and with the figure stored from the previous check, and if it falls sharply, a Slack message is posted. A steady or growing count produces no noise. Hourly checks suit teams without a dedicated on-call rotation for data systems.
It is aimed at engineers who run production search or an assistant and want a tripwire for accidental deletions.
What you get out of it
Catch accidental deletions within an hour
A sudden drop in vectors is a clear sign something has gone wrong. Hourly checks cap the time a broken cleanup job can run before someone is told. The earlier you know, the smaller the repair job becomes.
Protect answer quality
Missing records mean missing answers. Discovering and restoring them quickly keeps users from seeing a degraded assistant that quietly stops finding relevant material. Missing records mean missing answers. Quick discovery keeps users from seeing a degraded assistant that silently stops finding relevant material, which damages trust far more slowly than it can be rebuilt.
Works regardless of the cause
Whether the loss came from a bug, a mistaken delete call or a failed upsert, the count shows it. You do not need to predict every failure mode in advance.
Time to restore from a backup
An early alert means a recent backup can be restored with little loss. Waiting a week to notice makes the gap much harder to fill and to explain. The sooner you know, the less you lose between that backup and the failure.
A guard for team handoffs
When new engineers run scripts against the index, a safety net helps. A message in Slack tells the whole team something changed, so no one is blamed for a silent failure.
How it works
What happens, step by step
Every hour, ClickRuntime checks how many records are in your Pinecone index.
It compares the count with your minimum, such as 100,000, and with yesterday's count.
If the count is below the minimum or has dropped by more than 10% since yesterday, it posts to #ops in Slack with today's and yesterday's numbers.
Before it runs live
- Connect Pinecone
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 Pinecone steps into one automation
Under the hood
The code that runs this automation
from datetime import date
from clickruntime import on_trigger, credentials, notify, http, state
HOST = "https://docs-search-abc123.svc.us-east-1-aws.pinecone.io" # index docs-search
MIN_RECORDS = 100_000
@on_trigger
def run(event):
stats = http.post(f"{HOST}/describe_index_stats", json={},
headers={"Api-Key": credentials.secret("PINECONE_API_KEY")}).json()
count = stats["totalVectorCount"]
daily = state.get("daily") or {}
yesterday = daily.get("count") if daily.get("date") != date.today().isoformat() else daily.get("prev")
if daily.get("date") != date.today().isoformat():
state.set("daily", {"date": date.today().isoformat(), "count": count, "prev": daily.get("count")})
if count < MIN_RECORDS or (yesterday and count < yesterday * 0.9):
notify.slack(f"Pinecone docs-search has {count:,} records (yesterday {yesterday or 'unknown'}).", channel="#ops")
return {"count": count}FAQ
Common questions
How is a sharp drop defined?
Will it work with namespaces?
Does a planned bulk delete trigger the alert?
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
Keep your index in sync with your website
Every week new and edited pages are re-added, removed pages are deleted, and you get an email with the counts.
See how it worksBack up your index every week
Every week a fresh backup of your index is created and you get an email with its ID.
See how it worksKnow the moment your website goes down
Your team hears in Slack when the site stops responding or slows down, and again when it's back.
See how it worksKeep exploring
Set up “Get warned if your index loses records” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.