Skip to content
This repository was archived by the owner on Sep 1, 2025. It is now read-only.

Commit 64d2486

Browse files
committed
add logs endpoint
1 parent 6d20048 commit 64d2486

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

mcp-analytics/pipes/api_logs.pipe

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
TOKEN "prometheus" READ
2+
3+
NODE logs
4+
SQL >
5+
%
6+
SELECT *
7+
FROM mcp_monitoring
8+
WHERE
9+
datetime between parseDateTimeBestEffort({{DateTime(from_date)}}) and parseDateTimeBestEffort({{DateTime(to_date)}})
10+
ORDER BY datetime desc
11+
LIMIT {{Int32(page_size, 100)}}
12+
OFFSET {{Int32(page, 0) * Int32(page_size, 100)}}

0 commit comments

Comments
 (0)