{"id":18466301,"url":"https://github.com/ritreshgirdhar/iot-devicemonitoring","last_synced_at":"2026-05-17T06:43:52.773Z","repository":{"id":78314202,"uuid":"209496656","full_name":"RitreshGirdhar/IOT-DeviceMonitoring","owner":"RitreshGirdhar","description":"Sample application to capture MQTT Events from IOT devices and monitors it through ELK","archived":false,"fork":false,"pushed_at":"2020-05-07T07:45:11.000Z","size":1994,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T14:54:14.124Z","etag":null,"topics":["capture-events","elasticsearch","elk","iot","iot-device","iot-platform","kibana","logstash","logstash-forwarder","logstash-plugin","mosquitto","mosquitto-pub","mqtt","mqtt-broker","rabbitmq"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RitreshGirdhar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-19T08:01:54.000Z","updated_at":"2021-02-11T15:54:55.000Z","dependencies_parsed_at":"2023-04-20T20:08:17.996Z","dependency_job_id":null,"html_url":"https://github.com/RitreshGirdhar/IOT-DeviceMonitoring","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RitreshGirdhar/IOT-DeviceMonitoring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RitreshGirdhar%2FIOT-DeviceMonitoring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RitreshGirdhar%2FIOT-DeviceMonitoring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RitreshGirdhar%2FIOT-DeviceMonitoring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RitreshGirdhar%2FIOT-DeviceMonitoring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RitreshGirdhar","download_url":"https://codeload.github.com/RitreshGirdhar/IOT-DeviceMonitoring/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RitreshGirdhar%2FIOT-DeviceMonitoring/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008578,"owners_count":26084480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capture-events","elasticsearch","elk","iot","iot-device","iot-platform","kibana","logstash","logstash-forwarder","logstash-plugin","mosquitto","mosquitto-pub","mqtt","mqtt-broker","rabbitmq"],"created_at":"2024-11-06T09:15:59.030Z","updated_at":"2025-10-11T20:14:30.143Z","avatar_url":"https://github.com/RitreshGirdhar.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# IOT Device Monitoring Sample Application\nSample application to capture Events from IOT devices and monitors it through ELK or store it in events-store or some time-series database for further processing.\n\nPre-requisite\n* Basic knowledge of Git + Docker + Mqtt + Rabbit MQ \n\n\nHere i am taking a very basic example of capturing weather temperature city-wise. You could use it for any another event capturing.\n\nPurpose of this application is to give you enough idea to set up your own message broker \u0026 device-monitoring.\n\nBelow are the most Popular Internet of Things Protocols and standard communication technologies :\n* MQTT\n* DDS\n* AMQP\n* Bluetooth\n* Zigbee\n\nIn this tutorial i am using MQTT protocol. To capture events from IOT devices we require mqtt broker to consume the generated events and store it for further processing. \n\nI am using RabbitMQ as MQTT broker ([read it](https://dzone.com/articles/top-10-criteria-for-selecting-a-mqtt-broker-1))and to simulate behavior of IOT devices event generation i will use mosquitto's publisher.  \nRefer [this](https://youtu.be/deG25y_r6OY) to understand basic understanding of RabbitMQ.\n\nPre-requisites :\n1. Basic understanding of RabbitMQ and ELK.\n2. Install RabbitMQ Server.\n3. Install mosquitto package.\n4. Set up ELK on your machine.\n\nRabbit MQ Configuration. \n** Make sure to enable mqtt plugin in rabbitmq using below command:\n```\nrabbitmq-plugins enable rabbitmq_mqtt\n```\n\n1. Creating Queue:\n![Creating Queue](images/Rabbitmq-1.png)\n\n2. Binding exchange with Queue by routing Key :\n![Binding Exchange with queue](images/Rabbitmq-2.png)\n\n3. Publising message \n![Publishing message with routing key](images/Rabbitmq-3.png)\n\n4. Message received\n![Message recieved](images/Rabbitmq-4.png)\n\n\nHope you have installed mosquitto package. Now let's try to send some message through mosquitto_pub.\n\n```\nmosquitto_pub  -h 127.0.0.1 -t weather.mumbai -m \"{\"temperature\":{\"min\":21,\"max\":29,\"unit\":\"celsius\"},\"time\":1568881230}\" -u guest -P guest -p 1883 -d\n```\n\nLet's check weather events queue in Rabbit MQ.\n\n![Message recieved](images/Message-Received.png)\n\nStart logstash with configuration i.e logstash-rabbitmq.conf. It is a basic configuration,which will read from RabbitMQ and dump events into weather index in Elastic Search.\n\npaste below conf in logstash-rabbitmq.conf file\n```\ninput {\n    rabbitmq {\n        host =\u003e \"localhost\"\n        port =\u003e 15672\n        heartbeat =\u003e 30\n        durable =\u003e true\n        exchange =\u003e \"amq.topic\"\n        exchange_type =\u003e \"topic\"\n        key =\u003e \"weather.*\"\n    }\n}\noutput {\n    elasticsearch {\n        hosts =\u003e \"localhost:9200\"\n        index =\u003e \"weather\"\n    }\n    stdout {}\n}\n```\n\nStart logstash \n```\nlogstash -f \u003cpath\u003e/logstash-rabbitmq.conf\n```\n\nAfter logstash startup , you will see logstash queue get created and binded with weather* events in RabbitMQ \n\n![Logstash configured](images/Logstash-bind.png)\n\nLet's publish some test messages through RabbitMQ GUI\n\n![Publish test message](images/publish-message.png)\n\nNow let's check kibana dashboard of weather-index. As you could see in below Kibana search that our weather-mumbai event received by Elastic-Search through logstash.\n\n![Kibana received Message](images/Kibana-read-weather-index.png)\n\nNow let's test it through MQTT client/IOT Device (in our case its mosquitto_pub)\n\n```\n$ mosquitto_pub  -h 127.0.0.1 -t weather.mumbai -m '{\"temperature\":{\"min\":21,\"max\":32,\"unit\":\"celsius\"},\"timestamp\":\"2019-09-19T18:59:00\"}' -u guest -P guest -p 1883 -d\n```\n\n![Kibana received Message 1](images/mosquito-msg-consumer.png)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fritreshgirdhar%2Fiot-devicemonitoring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fritreshgirdhar%2Fiot-devicemonitoring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fritreshgirdhar%2Fiot-devicemonitoring/lists"}