An application to ingest and manage Sumo Logic history.
Sumo Logic is fabulous at collecting, processing, and aggregates logs and metrics. It's not so great at sharing downstream. I have a need to send some data from Sumo Logic into Snowflake. Since there is no direct intregration, this application is a connector of sorts.
- Use Docker Hub for Mac.
- Use the official Postgres image.
- Set POSTGRES_PASSWORD variable.
CREATE DATABASE sumo;
CREATE TABLE alerts (
id SERIAL PRIMARY KEY,
message TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
export DATABASE_URL="postgresql://{your_user}:{your_password}@localhost/sumo"
make run
- String message:
curl -X POST "http://127.0.0.1:8000/alert" -H "Content-Type: application/json" -d '{"message": "This is a test alert"}' | jq
- JSON string message:
curl -X POST "http://127.0.0.1:8000/alert" -H "Content-Type: application/json" -d '{"message": "{\"type\":\"critical\",\"environment\":\"prod\"}"}' | jq
SELECT * FROM alerts;