Integration with Snowflake (Beta)
The Integrator writes every monitor result (status, response time, location, host, metric and details) to a Snowflake table. Results are grouped into batches of up to 5,000 rows, written when the batch is full or when the write interval (60 seconds by default) ends.
By default the batches go through Snowpipe Streaming: no warehouse runs, and Snowflake bills the volume of data received. An INSERT mode, run by a warehouse, remains for accounts where Snowpipe Streaming is not available.
Snowflake runs independently of the other outputs. It can be enabled alone or together with InfluxDB, and an unreachable Snowflake never slows down InfluxDB, Kafka or the alerting.
Beta
Before you start
- A Snowflake account and a role allowed to create a database, a role and a user (
ACCOUNTADMINon a new account). - The Integrator must reach, on port 443,
https://<account>.snowflakecomputing.comand the account’s ingest host (<account>.<region>.ingest.snowflakecomputing.com, returned by Snowflake at sign-in). Open both in a firewall or proxy allow list. - Your account identifier, in the form
orgname-accountname. In a Snowsight worksheet:
SELECT CURRENT_ORGANIZATION_NAME() || '-' || CURRENT_ACCOUNT_NAME();
Create a key pair
Since the 2026 strong-authentication rollout, Snowflake refuses a password from a service user on production accounts, and Snowpipe Streaming accepts only key-pair sign-in. Create a key pair on any machine with OpenSSL:
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out mugnsoft_snowflake.p8 -nocrypt
openssl rsa -in mugnsoft_snowflake.p8 -pubout -out mugnsoft_snowflake.pub
Keep mugnsoft_snowflake.p8 private: it is pasted in the Integrator settings and nowhere else.
Prepare Snowflake
Run in a Snowsight worksheet. Paste the public key on one line, without the BEGIN and END lines.
USE ROLE ACCOUNTADMIN;
CREATE DATABASE IF NOT EXISTS MUGNSOFT;
-- Table created once, by an owner role
CREATE TABLE IF NOT EXISTS MUGNSOFT.PUBLIC.MUGNSOFT_METRICS (
TS TIMESTAMP_NTZ NOT NULL,
MON_TYPE VARCHAR(64),
NAME VARCHAR(512),
LOCATION VARCHAR(256),
STATUS VARCHAR(64),
STATUS_INT VARCHAR(16),
HOSTNAME VARCHAR(512),
METRIC VARCHAR(256),
VALUE FLOAT,
HAS_VALUE BOOLEAN,
ATTRS VARCHAR(16777216),
EVENT_ID VARCHAR(36)
);
-- The Integrator may only insert (this is all Snowpipe Streaming needs)
CREATE ROLE IF NOT EXISTS MUGNSOFT_INTEGRATOR;
GRANT USAGE ON DATABASE MUGNSOFT TO ROLE MUGNSOFT_INTEGRATOR;
GRANT USAGE ON SCHEMA MUGNSOFT.PUBLIC TO ROLE MUGNSOFT_INTEGRATOR;
GRANT INSERT ON TABLE MUGNSOFT.PUBLIC.MUGNSOFT_METRICS TO ROLE MUGNSOFT_INTEGRATOR;
CREATE USER IF NOT EXISTS MUGNSOFT_INTEGRATOR
TYPE = SERVICE
RSA_PUBLIC_KEY = '<public key on one line>'
DEFAULT_ROLE = MUGNSOFT_INTEGRATOR;
GRANT ROLE MUGNSOFT_INTEGRATOR TO USER MUGNSOFT_INTEGRATOR;
On the first write, Snowflake creates the table’s default streaming pipe (MUGNSOFT_METRICS-STREAMING) by itself: there is no pipe to create or grant.
For the INSERT mode only, add a warehouse:
CREATE WAREHOUSE IF NOT EXISTS MUGNSOFT_WH
WAREHOUSE_SIZE = XSMALL AUTO_SUSPEND = 60 AUTO_RESUME = TRUE INITIALLY_SUSPENDED = TRUE;
GRANT USAGE ON WAREHOUSE MUGNSOFT_WH TO ROLE MUGNSOFT_INTEGRATOR;
Note:
CREATE TABLE on the schema. With the INSERT-only role above, create the table yourself as shown.
Configure the Integrator
In the Mugnsoft web UI, open the Integrator settings, then External Integration → Snowflake (Beta):
| Field | Value |
|---|---|
| Ingestion | Snowpipe Streaming (default), or INSERT through a warehouse |
| Account | orgname-accountname |
| User | MUGNSOFT_INTEGRATOR |
| Password | trial and reader accounts, INSERT mode only; leave empty with a key |
| Warehouse | MUGNSOFT_WH, INSERT mode only |
| Database | MUGNSOFT |
| Schema | PUBLIC (default) |
| Role | MUGNSOFT_INTEGRATOR (optional: the user’s default role otherwise) |
| Table name | MUGNSOFT_METRICS (default) |
| Write every (seconds) | 60 (default), from 5 to 3600 |
| Private key | the content of mugnsoft_snowflake.p8 |
Press the test button, then switch the tile on and save. The test writes nothing:
- Snowpipe Streaming: it signs in to the streaming service, then checks the table (and creates it if it is missing and the role may).
- INSERT: it signs in and runs an INSERT that writes no row, which proves the table exists, the role may insert into it and the warehouse runs.
The table
One row per monitor result, and per metric for Sentinel results.
| Column | Content |
|---|---|
TS |
Time of the check, UTC |
MON_TYPE |
eum, url, api, tcp, ping, nslookup, websocket, workload, db, sys, snmp, wmi, disco, app |
NAME, LOCATION |
Monitor name and probe location |
STATUS, STATUS_INT |
Status as shown in Mugnsoft, and its number |
HOSTNAME, METRIC |
Sentinel results: host and metric |
VALUE, HAS_VALUE |
Response time or metric value; HAS_VALUE is false for application statuses |
ATTRS |
JSON details: timings for URL and API checks (dnsLookup, tcpConnTime, tlsHandshake, serverTime, responseTime), jitter and loss for ping |
EVENT_ID |
Unique identifier of the result |
Example, the hourly average response time per URL over a day:
SELECT NAME, DATE_TRUNC('hour', TS) AS HOUR, AVG(VALUE) AS AVG_MS
FROM MUGNSOFT.PUBLIC.MUGNSOFT_METRICS
WHERE MON_TYPE = 'url' AND TS > DATEADD('day', -1, CURRENT_TIMESTAMP())
GROUP BY 1, 2 ORDER BY 1, 2;
Timing details are read with PARSE_JSON(ATTRS):serverTime::FLOAT.
Duplicates
Snowpipe Streaming delivers at least once: when a write times out after Snowflake accepted it, the Integrator sends it again and the rows can land twice. Every row carries its EVENT_ID, so a query, or a view, can keep one copy:
CREATE OR REPLACE VIEW MUGNSOFT.PUBLIC.MUGNSOFT_METRICS_UNIQUE AS
SELECT * FROM MUGNSOFT.PUBLIC.MUGNSOFT_METRICS
QUALIFY ROW_NUMBER() OVER (PARTITION BY EVENT_ID ORDER BY TS) = 1;
When Snowflake is unreachable
- A failed batch is retried, with Snowflake’s rules for Snowpipe Streaming (busy and server errors are retried, an expired token is renewed), then written to disk under
snowflake_buffer/in the Integrator folder and sent again every 30 seconds, oldest first, until Snowflake accepts it. - At most 500 batches are kept on disk; beyond that the oldest one is dropped, and the drop is counted.
- The queue in memory holds 50,000 results. If Snowflake cannot keep up, new results are dropped and counted, and monitoring and alerting carry on unaffected.
- When the Integrator stops, queued results are written first (or spilled to disk).
Checking it works
- The Integrator topology shows a Snowflake (Beta) node, red after a failed write and green again after the next successful one.
- The Integrator
/uptimeanswer carries asnowflakeblock: the mode, rows queued, written, dropped, failed writes, batches waiting on disk, queue length, the last error, and the time per write (lastWriteMs,avgWriteMs). - The Integrator log has one
snowflake - statsline every 5 minutes while results flow, and asnowflake - write failedline for each failed write. - With Snowpipe Streaming, rows become queryable a few seconds after the write is acknowledged.
Example of the /uptime block (illustrative values):
"snowflake": {
"mode": "streaming",
"enqueued": 18240, "written": 18000, "dropped": 0, "failed": 0,
"spilled": 0, "redelivered": 0, "buffered": 0, "queueLen": 240,
"batches": 4, "lastWriteMs": 212, "avgWriteMs": 230,
"lastSuccess": "2026-11-28T18:40:00Z", "healthy": true
}
Cost
Snowpipe Streaming is billed per uncompressed gigabyte of data values received (see the current rate in Snowflake’s consumption table). No warehouse runs, so the write interval does not change the cost: it only sets how fresh the data is. To follow the consumption:
SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.METERING_HISTORY
WHERE SERVICE_TYPE = 'SNOWPIPE_STREAMING'
ORDER BY START_TIME DESC;
INSERT mode: each write is one INSERT, and it wakes the warehouse. Snowflake bills a warehouse for every second it runs, with a minimum of 60 seconds each time it resumes, then keeps it running for its AUTO_SUSPEND time after the last statement. An X-Small warehouse uses 1 credit per running hour, so the write interval sets the cost:
| Write every | Warehouse with AUTO_SUSPEND = 60 |
X-Small, per day |
|---|---|---|
| 60 s (default) | never suspends | about 24 credits |
| 300 s | runs about 1 minute in 5 | about 5 credits |
| 900 s | runs about 1 minute in 15 | about 1.7 credits |
The interval only delays results: nothing is lost while they wait (the queue holds 50,000 results, and a batch of 5,000 is written at once).