Getting started
Quickstart
Add your domain, get an alert when it goes down and send your first log, in about five minutes.
This guide takes you from no account to a monitored website, an alert channel and your first log. Each step links to the full guide when you want more.
Monitor your website
- Sign in Sign in to Logdash with GitHub or Google. The Hobby plan is free and needs no card.
- Add your domain Enter your website address, such as
example.com, and press Start monitoring. Logdash checks it right away, then every 5 minutes on the Hobby plan. - Monitor more addresses Under Monitor more, add the other URLs your users open, such as
api.example.comor a health check endpoint, then press Done. See Uptime monitors for what counts as up.
Get alerted
A new monitor alerts the channels of its domain. When the domain has none yet, Logdash adds an email channel for the address you signed in with, so you hear about downtime without any setup. To get alerts on Telegram or to call your own webhook, open your domain, go to Settings and press Add channel in the Alerts card. See Alerts for every channel and what the messages look like.
Send your first log
Go to Logs, pick your language and press Copy prompt. Paste the prompt into your coding agent, and it installs the SDK and adds logging with your ingest key. To do it by hand, follow the steps below.
- Copy the ingest key Open Settings and press Copy in the Ingest key card. Keep it in an environment variable, such as
LOGDASH_API_KEY. It can only write, so a leaked key cannot read your data. - Install the SDK Pick your language. The tab you pick stays picked on every page.
npm install @logdash/nodepip install logdashgo get github.com/logdash-io/go-sdk/logdashdotnet add package Logdash// build.gradle dependencies { implementation 'io.logdash:logdash:0.2.0' }cargo add logdashgem install logdashcomposer require logdash/php-sdk - Send a log Logs show up in Logs within a second. Without an SDK, send the same log with one HTTP request.
import { Logdash } from '@logdash/node'; const logdash = new Logdash(process.env.LOGDASH_API_KEY); logdash.info('Application started successfully'); logdash.error('An unexpected error occurred'); logdash.warn('Low disk space warning');import os from logdash import create_logdash logdash = create_logdash({"api_key": os.environ["LOGDASH_API_KEY"]}) logger = logdash.logger logger.info("Application started successfully") logger.error("An unexpected error occurred") logger.warn("Low disk space warning")package main import ( "context" "os" "time" "github.com/logdash-io/go-sdk/logdash" ) func main() { ld := logdash.New(logdash.WithAPIKey(os.Getenv("LOGDASH_API_KEY"))) logger := ld.Logger logger.Info("Application started successfully") logger.Error("An unexpected error occurred") logger.Warn("Low disk space warning") // Every level has an ...F() counterpart, like fmt.Printf. logger.InfoF("Processing %v of %v item", 1, 10) // Shutdown waits for every enqueued log, metric and event to flush. ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() ld.Shutdown(ctx) }logdash.Info("This is info message"); logdash.Warn("This is warn message"); logdash.Error("This is an error message"); logdash.Debug("This is a debug message");import java.util.Map; logger.info("Application started"); logger.error("Database connection failed"); // Structured logging with context logger.info("Payment processed", Map.of( "userId", 12345, "amount", 29.99, "currency", "USD" ));let (logger, _) = logdash::create_logdash(logdash::Config::default()); // Send an info log message logger.info("Rust SDK example");logger.info('Application started successfully') logger.error('An unexpected error occurred') logger.warn('Low disk space warning')$logger->error('Application error occurred'); $logger->warn('This is a warning message'); $logger->info('User logged in successfully');curl -X POST https://api.logdash.io/logs \ -H "project-api-key: $LOGDASH_API_KEY" \ -H "Content-Type: application/json" \ -d '{"message": "Application started successfully", "level": "info", "createdAt": "'"$(date -u +%FT%TZ)"'"}'
Short-lived processes, such as cron jobs and serverless functions, can exit before the SDK sends what it queued. Flush before you exit, as the page for your SDK shows.