ImOK

Simple Device Status Monitoring

How It Works

1

Generate a unique device ID by entering your email address. This ID will be used to track your device's status.

2

Set up your device (computer, server, IoT device) to periodically ping our service using the provided URL.

3

Validate your email to receive notifications if your device stops responding for more than 5 minutes.

Use Cases

Server Monitoring

Monitor your servers' uptime and get instant notifications if they go down.

IoT Devices

Keep track of your IoT devices and ensure they're functioning properly.

Cron Jobs

Monitor scheduled tasks and get notified if they fail to run.

Network Monitoring

Track network connectivity and detect outages quickly.

Setup Examples

Windows PowerShell

Create a new file named monitor.ps1 with this content:

while ($true) {
    try {
        Invoke-RestMethod "https://imok.lv/u/your-device-id"
        Write-Host "Ping sent successfully at $(Get-Date)"
    } catch {
        Write-Host "Error sending ping: $_"
    }
    Start-Sleep -Seconds 60
}

Linux/Mac Bash Script

1. Create a new file named monitor.sh:

#!/bin/bash while true; do curl -s https://imok.lv/u/your-device-id echo "Ping sent at $(date)" sleep 60 done

2. Make it executable and run:

chmod +x monitor.sh ./monitor.sh

Docker Container

Add to your Dockerfile:

# Add monitoring script COPY monitor.sh /monitor.sh RUN chmod +x /monitor.sh # Run your application and the monitor CMD ["/bin/bash", "-c", "/monitor.sh & your-main-application"]

Or use Docker Compose:

services: your-service: image: your-image healthcheck: test: ["CMD", "curl", "-f", "https://imok.lv/u/your-device-id"] interval: 60s timeout: 3s retries: 1

Important Notes:

  • Replace your-device-id with the ID generated above
  • Scripts will run continuously until stopped
  • Consider running scripts as a service for production use
  • Ensure your device has a stable internet connection
  • The 60-second interval is recommended to avoid missing the 5-minute notification threshold

Frequently Asked Questions

How often should my device ping?

We recommend a 60-second interval. The system will send you an email if no ping is received for 5 minutes.

Is there a rate limit?

Yes, pings are limited to once per minute per device to prevent system overload.

How do notifications work?

Once your email is validated, you'll receive email alerts when your device goes offline for more than 5 minutes.

ImOK - Simple Device Status Monitoring

Need help? Contact ralfs@artificial.lv