https://github.com/tkmru/remo_to_mackerel
https://github.com/tkmru/remo_to_mackerel
aws-lambda aws-lambda-python mackerel nature-remo smarthome
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tkmru/remo_to_mackerel
- Owner: tkmru
- Created: 2019-06-01T16:37:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-06T10:30:11.000Z (over 6 years ago)
- Last Synced: 2025-02-01T16:13:26.693Z (8 months ago)
- Topics: aws-lambda, aws-lambda-python, mackerel, nature-remo, smarthome
- Language: Python
- Size: 120 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# remo to mackerel
This code get my room temperature from [Nature Remo](https://nature.global/), and post it as service metrics to [Mackerel](https://mackerel.io/ja/) by AWS Lambda.
## Usage
set Nature Remo api token, Mackerel api key to environment variable.```
$ export REMOTOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
$ export MACKERELKEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
$ pip install requests
$ python lambda_function.py
```### work on AWS Lambda

```
$ mkdir packages
$ cd packages/
$ pip install requests -t .
$ zip -r9 ../function.zip .
$ zip -g function.zip lambda_function.py
```and upload function.zip to AWS Lambda.