The paper at hand proposes BSIEM-IoT, a Security Information and Event Management solution (SIEM) for the Internet of Things (IoT) relying on blockchain to store and access security events. The security events included in the blockchain are contributed by a number of IoT sentinels in charge of protecting a group of IoT devices. A key feature here is that the blockchain guarantees a secure registry of security events. Additionally, the proposal permits SIEM functional components to be assigned to different miners servers composing a resilient and distributed SIEM. Our proposal is implemented using Ethereum and validated through different use cases and experiments.