Skip to content

bootjp/switchbot-exporter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

switchbot-exporter

!!Currently only supports temperature/humidity comming from switchbot meter!!

Prometheus Configuration

The switchbot exporter needs to be passed the target ID as a parameter, this can be done with relabelling (like blackbox exporter)

Example Config:

scrape_configs:
  - job_name: 'switchbot'
    scrape_interval: 5m # not to reach API rate limit
    metrics_path: /metrics
    static_configs:
      - targets:
        - DFA0029F2622 # Target switchbot meter
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 127.0.0.1:8080 # The switchbot exporter's real ip/port

Limitation

switchbot API's request limit

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Go 94.8%
  • Dockerfile 5.2%