Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maximemoreillon/mqtt_logger
Storing data received via MQTT in InfluxDB
https://github.com/maximemoreillon/mqtt_logger
express influxdb mongodb mqtt
Last synced: 4 days ago
JSON representation
Storing data received via MQTT in InfluxDB
- Host: GitHub
- URL: https://github.com/maximemoreillon/mqtt_logger
- Owner: maximemoreillon
- License: mit
- Created: 2022-07-09T03:50:56.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-20T22:22:41.000Z (4 months ago)
- Last Synced: 2025-01-22T08:13:41.983Z (4 days ago)
- Topics: express, influxdb, mongodb, mqtt
- Language: TypeScript
- Homepage: https://articles.maximemoreillon.com/articles/5aa92bbf-956c-43a9-8f3c-e0bdacd6412d
- Size: 295 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MQTT Logger
[](https://hub.docker.com/repository/docker/moreillon/mqtt-logger)
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/moreillon)](https://artifacthub.io/packages/search?repo=moreillon)Stores data sent over MQTT into an InfluxDB time series database.
An article about this project is available [here](https://articles.maximemoreillon.com/articles/5aa92bbf-956c-43a9-8f3c-e0bdacd6412d)
## API
| Endpoint | Method | query/body | Description |
| -------------------------- | ------ | ---------- | ---------------------------------------------------- |
| /sources | GET | - | Returns list of sources |
| /sources | POST | name | Create a new source |
| /sources/:source_id | GET | - | Returns the source identified by ID :source_id |
| /sources/:source_id | PATCH | - | Updates the source identified by ID :source_id |
| /sources/:source_id | DELETE | - | Deletes the source identified by ID :source_id |
| /sources/:source_id/points | GET | - | Returns points of source identified by ID :source_id |## Environment variables
| Variable | Description |
| ------------------------- | ---------------------------------------------- |
| MQTT_URL | URL of the MQTT Broker |
| MQTT_USERNAME | Username to access the MQTT broker |
| MQTT_PASSWORD | Password to access the MQTT broker |
| MONGODB_CONNECTION_STRING | Connection string for the the MongoDB instance |
| INFLUXDB_URL | URL of the InfluxDB instance |
| INFLUXDB_ORG | Organization used in InfluxDB |
| INFLUXDB_BUCKET | Bucket used in InfluxDB |
| INFLUXDB_TOKEN | Token used to access InfluxDB |
| IDENTIFICATION_URL | URL for user identification (Optional) |Note: Authentication is enables if IDENTIFICATION_URL is set