0xB10C / peer-observer

Tool to monitor for P2P anomalies and attacks using Bitcoin Core honeynodes
https://public.peer.observer
MIT License
12 stars 2 forks source link

Detect if the extractor didn't receive any events in X amount of time and error #62

Closed 0xB10C closed 2 weeks ago

0xB10C commented 2 weeks ago

This could mean Bitcoin Core has been restarted or is offline. We should exit the process. E.g. systemd can then restart it.

0xB10C commented 2 weeks ago

We should log a warning first, after maybe 2 minutes. Error after 5 minutes.

0xB10C commented 2 weeks ago

Went with 1 minute to warning and 3 minutes until exit in #63.

2024-11-08T09:28:48.295Z INFO  [extractor] Startup successful. Starting to extract events from '/path/to/bitcoind'..
2024-11-08T09:33:13.594Z WARN  [extractor] No events received in the last 60s. Is bitcoind or the network down?
2024-11-08T09:35:13.745Z ERROR [extractor] No events received in the last 180s.
2024-11-08T09:35:13.745Z WARN  [extractor] The bitcoind process might be down, has restarted and changed PIDs, or the network might be down.
2024-11-08T09:35:13.745Z WARN  [extractor] The extractor will exit. Please restart it