Skip to content

Instantly share code, notes, and snippets.

@lazureykis
lazureykis / uptime-monitoring-log.csv
Last active July 10, 2023 05:27
Incoming requests from different monitoring tools
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 10.
"Timestamp","IP Address","User-Agent"
"2023-07-10T05:18:00.152611786Z","148.251.23.119","UptimeMonitor/1.0 (eu-germany https://uptime-monitor.io)"
"2023-07-10T05:18:09.920019414Z","65.108.66.61","UptimeMonitor/1.0 (eu-finland https://uptime-monitor.io)"
"2023-07-10T05:18:10.698810477Z","35.205.234.10","GoogleStackdriverMonitoring-UptimeChecks(https://cloud.google.com/monitoring)"
"2023-07-10T05:18:18.621089354Z","35.173.69.86","FreshpingBot/1.0 (+https://freshping.io/)"
"2023-07-10T05:18:20.140957859Z","69.10.35.226","UptimeMonitor/1.0 (us-east https://uptime-monitor.io)"
"2023-07-10T05:18:21.120640750Z","45.63.121.159","Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/98 Safari/537.4 (StatusCake)"
"2023-07-10T05:18:22.796193571Z","35.186.176.31","GoogleStackdriverMonitoring-UptimeChecks(https://cloud.google.com/monitoring)"
"2023-07-10T05:18:30.153785692Z","148.251.23.119","UptimeMonitor/1.0 (eu-germany https://uptime-monitor.io)"
"2023-07-10T05:18:39.920119740Z","65.108.66.61
Monitoring Tool Avg delay on Down Avg delay on Up
Uptime Monitor 20s 15s
Cronitor 1m 3s 2m 27s
Google Cloud 2m 10s 1m 26s
UptimeRobot 2m 54s 3m 10s
StatusCake 3m 31s 3m 54s
Freshping 4m 4s 3m 58s
<?xml version="1.0"?>
<yandex>
<!-- Profiles of settings. -->
<profiles>
<!-- Default settings. -->
<default>
<!-- Maximum memory usage for processing single query, in bytes. -->
<!-- 4 GB -->
<max_memory_usage>4294967296</max_memory_usage>
<?xml version="1.0"?>
<!--
NOTE: User and query level settings are set up in "users.xml" file.
If you have accidentially specified user-level settings here, server won't start.
You can either move the settings to the right place inside "users.xml" file
or add <skip_check_for_incorrect_settings>1</skip_check_for_incorrect_settings> here.
-->
<yandex>
<logger>
<!-- Possible levels: https://github.com/pocoproject/poco/blob/poco-1.9.4-release/Foundation/include/Poco/Logger.h#L105 -->
use std::sync::mpsc::{channel, Sender};
use std::thread::{self, sleep, JoinHandle};
use std::time::Duration;
enum Message {
CommandAddLine(String),
CommandTick,
CommandStop,
}
use std::sync::mpsc::{channel, Sender};
use std::thread::{self, JoinHandle};
enum Message {
CommandAddLine(String),
CommandStop,
}
#[derive(Debug)]
pub struct Buffer {
use std::sync::mpsc::{channel, Receiver, Sender};
use std::thread::{self, JoinHandle};
enum Message {
// counter consumes commands
CommandIncrement(u64),
CommandValue,
CommandStop,
// counter sends results back
use std::thread::sleep;
use std::time::Duration;
mod counter;
fn main() {
let (counter, _join_handle) = counter::Counter::start();
counter.increment(1);
counter.increment(5);
use std::sync::mpsc::{channel, Receiver, Sender};
use std::thread::{self, JoinHandle};
enum Message {
// counter consumes commands
CommandIncrement(u64),
CommandValue,
// counter sends results back
ResultValue(u64),
use std::thread::sleep;
use std::time::Duration;
mod simple_counter;
fn main() {
let (sender, join_handle) = simple_counter::start_counter();
sender.send(1).unwrap();
sender.send(5).unwrap();