https://github.com/slashnephy/mackerel-plugin-switchbot
A Mackerel plugin to collect SwitchBot metrics
https://github.com/slashnephy/mackerel-plugin-switchbot
mackerel mackerel-plugin switchbot
Last synced: 7 days ago
JSON representation
A Mackerel plugin to collect SwitchBot metrics
- Host: GitHub
- URL: https://github.com/slashnephy/mackerel-plugin-switchbot
- Owner: SlashNephy
- License: mit
- Created: 2023-11-10T14:52:28.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-08-17T08:39:14.000Z (10 months ago)
- Last Synced: 2025-08-17T10:19:49.037Z (10 months ago)
- Topics: mackerel, mackerel-plugin, switchbot
- Language: Go
- Homepage:
- Size: 83 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mackerel-plugin-switchbot
A Mackerel plugin to collect metrics from various SwitchBot devices.
A list of supported devices can be found [here](https://github.com/SlashNephy/mackerel-plugin-switchbot/blob/bc21153161af32cef22be649879691ace2d58d7b/metrics/metrics.go#L144).
## Example Metrics
```console
$ mackerel-plugin-switchbot
switchbot.battery.XXXXX-battery 95 1699895326
switchbot.battery.YYYYY-battery 97 1699895326
switchbot.battery.ZZZZZ-battery 100 1699895326
switchbot.temperature.XXXXX-temperature 27.800000 1699895326
switchbot.humidity.XXXXX-humidity 42 1699895326
```
## Usage
1. Install via mkr / or download releases directly
```console
$ mkr plugin install SlashNephy/mackerel-plugin-switchbot
```
2. Append following configuration to `mackerel-agent.conf`
```conf
[plugin.metrics.switchbot]
command = "/opt/mackerel-agent/plugins/bin/mackerel-plugin-switchbot --open-token XXX --secret-key XXX"
```
mackerel-plugin-switchbot has some command-line options. Check the help for details.
```console
$ /opt/mackerel-agent/plugins/bin/mackerel-plugin-switchbot --help
```