The LAST free Semurg nodes EVER: the first 1,000 are free, for a limited time. After that, every node is US$139, paid once.

Blog / How-to guides

The latest reading of any series in one read

12 October 2026 · Semurg · 2 min read · Markdown

Last checked on r11.168.20261114.da3a8f8 (14 Nov 2026): every command below ran on a fresh node of that release. The current release is r11.173.20261116.3006727 (16 Nov 2026), and the commands have not been re-checked on it yet (how)

time-seriesdatabasehow-to

Much of what a monitoring screen or a trading desk asks a time-series store is one question, many times: what is the latest reading of this series, now? Semurg keeps, for every series, a small record that always points at its newest reading, so that question is one read whatever the history behind it.

It answers that question: write readings for many series in one call, and read the latest value of each series by name.

You write readings for many series in one call; the latest reading of any series comes back in one read, however long its history, and older readings stay stored.Readings for manyseries, one callEvery reading keptLatest of each series:one read, whatever thehistory

Write readings

Each reading is a row of three or four whole numbers after the series name: the time in milliseconds, the value, and optionally a size or count. Values are integers, so keep a price in cents or a percentage in hundredths. One call can carry readings for many series:

bash
export SEMURG_API_TOKEN=<your token>
curl -sS http://localhost:4000/v1/query \
  -H "Authorization: Bearer $SEMURG_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"op": "ts_ingest",
       "rows": [["cpu.host1.usage", 1760259600000, 4210],
                ["cpu.host1.usage", 1760259660000, 4385],
                ["cpu.host2.usage", 1760259600000, 1970]]}'

Expected: three readings for two series are written

The reply counts the rows you sent and the series they touched, and how many of those series it had not seen before. If two rows in one call name the same series and the same time, the last one wins.

Read the latest reading of each series

bash
export SEMURG_API_TOKEN=<your token>
curl -sS http://localhost:4000/v1/query \
  -H "Authorization: Bearer $SEMURG_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"op": "ts_latest", "series": ["cpu.host1.usage", "cpu.host2.usage", "cpu.host9.usage"]}'

Expected: host1's newest reading, host2's only reading, and host9 marked absent

The answers come back in the order you asked, each with its time, value and size, or absent for a series with no readings. The latest reading only moves forward in time: a reading older than the newest one is stored, but does not replace it.

What it keeps

Each reading is stored once, and a series' newest reading comes back in one read however long the series grows.

Next

What Semurg is: Give Claude Code, Cursor and your other AI agents a memory that lasts: install Semurg on your own machine in one line.

Why use it: your agent recalls the facts it needs, each with its source, instead of re-reading the project.

What it solves today: agents that forget between sessions, and data that must stay on your own machines.

This post was written with AI assistance. Every result in it is checked against a published release or record before the post goes out.

How these commands were checked

Our test farm ran each of the 2 command blocks marked runnable, exactly as written, with the answer checked against the expectation printed under it, against a fresh node of the published release r11.168.20261114.da3a8f8. A post is published only when every one of them passed there.

Related